From 45fd38f0fcee9fc14c4e7304eb07b57a72ae7eff Mon Sep 17 00:00:00 2001 From: shawn_he Date: Wed, 8 Mar 2023 13:54:40 +0800 Subject: [PATCH] update doc Signed-off-by: shawn_he --- en/application-dev/dfx/apprecovery-guidelines.md | 2 +- en/application-dev/dfx/errormanager-guidelines.md | 10 +++++----- .../reference/apis/js-apis-system-configuration.md | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/en/application-dev/dfx/apprecovery-guidelines.md b/en/application-dev/dfx/apprecovery-guidelines.md index b2992e7c99..bae804c558 100644 --- a/en/application-dev/dfx/apprecovery-guidelines.md +++ b/en/application-dev/dfx/apprecovery-guidelines.md @@ -134,7 +134,7 @@ After the callback triggers **appRecovery.saveAppState()**, **onSaveState(state, - Restore data. -After the callback triggers **appRecovery.restartApp()**, the application is restarted. After the restart, **onSaveState(state, wantParams)** of **MainAbility** is called, and the saved data is in **parameters** of **want**. +After the callback triggers **appRecovery.restartApp()**, the application is restarted. After the restart, **onCreate(want, launchParam)** of **MainAbility** is called, and the saved data is in **parameters** of **want**. ```ts storage: LocalStorage diff --git a/en/application-dev/dfx/errormanager-guidelines.md b/en/application-dev/dfx/errormanager-guidelines.md index 631445b862..a43d7c1fce 100644 --- a/en/application-dev/dfx/errormanager-guidelines.md +++ b/en/application-dev/dfx/errormanager-guidelines.md @@ -37,10 +37,10 @@ When an asynchronous callback is used, the return value can be processed directl ## Development Example ```ts import Ability from '@ohos.application.Ability' -import errorManager from '@ohos.application.errorManager' +import errorManager from '@ohos.app.ability.errorManager'; -var registerId = -1; -var callback = { +let registerId = -1; +let callback = { onUnhandledException: function (errMsg) { console.log(errMsg); } @@ -48,13 +48,13 @@ var callback = { export default class MainAbility extends Ability { onCreate(want, launchParam) { console.log("[Demo] MainAbility onCreate") - registerId = errorManager.registerErrorObserver(callback); + registerId = errorManager.on("error", callback); globalThis.abilityWant = want; } onDestroy() { console.log("[Demo] MainAbility onDestroy") - errorManager.unregisterErrorObserver(registerId, (result) => { + errorManager.off("error", registerId, (result) => { console.log("[Demo] result " + result.code + ";" + result.message) }); } diff --git a/en/application-dev/reference/apis/js-apis-system-configuration.md b/en/application-dev/reference/apis/js-apis-system-configuration.md index 934ceb0204..ddc277722b 100644 --- a/en/application-dev/reference/apis/js-apis-system-configuration.md +++ b/en/application-dev/reference/apis/js-apis-system-configuration.md @@ -50,4 +50,3 @@ Defines attributes of the current locale. | language | string | Yes | No | Language, for example, **zh**.| | countryOrRegion | string | Yes | No | Country or region, for example, **CN** or **US**.| | dir | string | Yes | No | Text layout direction. The value can be:
- **ltr**: from left to right
- **rtl**: from right to left| -| unicodeSetting5+ | string | Yes | No | Unicode language key set determined by the locale. If current locale does not have a specific key set, an empty set is returned.
For example, **{"nu":"arab"}** indicates that current locale uses Arabic numerals.| -- GitLab