提交 a621e5d1 编写于 作者: E ester.zhou 提交者: Gitee

Merge branch 'master' of gitee.com:openharmony/docs into TR-9431

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
......@@ -92,7 +92,7 @@ After the preceding code is executed, the **startAbility()** API is called to st
- If the Service ability is not running, the system calls **onStart()** to initialize the Service ability, and then calls **onCommand()** on the Service ability.
- If the Service ability is running, the system directly calls **onCommand()** on the Service ability.
The following code snippet shows how to start a Service ability running on the remote device. For details about **getRemoteDeviceId()**, see [Connecting to a Remote Service Ability](#connecting-to-a-remote-service-ability-applying-only-to-system-applications).
The following code snippet shows how to start a Service ability running on the remote device. For details about **getRemoteDeviceId()**, see [Connecting to a Remote Service Ability](#connecting-to-a-remote-service-ability).
```javascript
import featureAbility from '@ohos.ability.featureAbility';
......
......@@ -9,15 +9,15 @@ You can use APIs provided in the following table to obtain the system language a
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.i18n | getSystemLanguage(): string | Obtains the system language. |
| ohos.i18n | getSystemRegion(): string | Obtains the system region. |
| ohos.i18n | getSystemLocale(): string | Obtains the system locale. |
| ohos.i18n | isRTL(locale: string): boolean<sup>7+</sup> | Checks whether the locale uses a right-to-left (RTL) language. |
| ohos.i18n | is24HourClock(): boolean<sup>7+</sup> | Checks whether the system uses a 24-hour clock. |
| ohos.i18n | getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string | Obtains the localized display of a language. |
| ohos.i18n | getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string | Obtains the localized display of a country name. |
| ohos.i18n | getSystemLanguage(): string | Obtains the system language. |
| ohos.i18n | getSystemRegion(): string | Obtains the system region. |
| ohos.i18n | getSystemLocale(): string | Obtains the system locale. |
| ohos.i18n | isRTL(locale: string): boolean<sup>7+</sup> | Checks whether the locale uses a right-to-left (RTL) language. |
| ohos.i18n | is24HourClock(): boolean<sup>7+</sup> | Checks whether the system uses a 24-hour clock. |
| ohos.i18n | getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string | Obtains the localized display of a language. |
| ohos.i18n | getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string | Obtains the localized display of a country name. |
### How to Develop
......@@ -26,7 +26,7 @@ You can use APIs provided in the following table to obtain the system language a
Call the **getSystemLanguage** method to obtain the system language (**i18n** is the name of the imported module).
```js
var language = i18n.getSystemLanguage();
```
......@@ -42,7 +42,7 @@ You can use APIs provided in the following table to obtain the system language a
3. Obtain the system locale.
Call the **getSystemLocale** method to obtain the system locale.
```js
var locale = i18n.getSystemLocale();
```
......@@ -51,7 +51,7 @@ You can use APIs provided in the following table to obtain the system language a
Call the **isRTL** method to check whether the locale's language is RTL.
```js
var rtl = i18n.isRTL("zh-CN");
```
......@@ -67,7 +67,7 @@ You can use APIs provided in the following table to obtain the system language a
6. Obtain the localized display of a language.
Call the **getDisplayLanguage** method to obtain the localized display of a language. **language** indicates the language to be localized, **locale** indicates the locale, and **sentenceCase** indicates whether the first letter of the result must be capitalized.
```js
var language = "en";
var locale = "zh-CN";
......@@ -78,7 +78,7 @@ You can use APIs provided in the following table to obtain the system language a
7. Obtain the localized display of a country.
Call the **getDisplayCountry** method to obtain the localized display of a country name. **country** indicates the country code (a two-letter code in compliance with ISO-3166, for example, CN), **locale** indicates the locale, and **sentenceCase** indicates whether the first letter of the result must be capitalized.
```js
var country = "US";
var locale = "zh-CN";
......@@ -116,7 +116,7 @@ You can use APIs provided in the following table to obtain the system language a
Call the **getCalendar** method to obtain the time zone object of a specific locale and type (**i18n** is the name of the imported module). **type** indicates the valid calendar type, for example, **buddhist**, **chinese**, **coptic**, **ethiopic**, **hebrew**, **gregory**, **indian**, **islamic_civil**, **islamic_tbla**, **islamic_umalqura**, **japanese**, and **persian**. If **type** is left unspecified, the default calendar type of the locale is used.
```js
var calendar = i18n.getCalendar("zh-CN", "gregory");
```
......@@ -135,7 +135,7 @@ You can use APIs provided in the following table to obtain the system language a
3. Set the year, month, day, hour, minute, and second for the **Calendar** object.
Call the **set** method to set the year, month, day, hour, minute, and second for the **Calendar** object.
```js
calendar.set(2021, 12, 21, 6, 0, 0)
```
......@@ -144,7 +144,7 @@ You can use APIs provided in the following table to obtain the system language a
Call the **setTimeZone** and **getTimeZone** methods to set and obtain the time zone for the **Calendar** object. The **setTimeZone** method requires an input string to indicate the time zone to be set.
```js
calendar.setTimeZone("Asia/Shanghai");
var timezone = calendar.getTimeZone();
......@@ -163,7 +163,7 @@ You can use APIs provided in the following table to obtain the system language a
6. Set and obtain the minimum count of days in the first week for the **Calendar** object.
Call the **setMinimalDaysInFirstWeek** and **getMinimalDaysInFirstWeek** methods to set and obtain the minimum count of days in the first week for the **Calendar** object.
```js
calendar.setMinimalDaysInFirstWeek(3);
var minimalDaysInFirstWeek = calendar.getMinimalDaysInFirstWeek();
......@@ -173,7 +173,7 @@ You can use APIs provided in the following table to obtain the system language a
Call the **getDisplayName** method to obtain the localized display of the **Calendar** object.
```js
var localizedName = calendar.getDisplayName("zh-CN");
```
......@@ -196,11 +196,11 @@ You can use APIs provided in the following table to obtain the system language a
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.i18n | constructor(country: string, options?: PhoneNumberFormatOptions)<sup>8+</sup> | Instantiates a **PhoneNumberFormat** object. |
| ohos.i18n | isValidNumber(number: string): boolean<sup>8+</sup> | Checks whether the value of **number** is a phone number in the correct format. |
| ohos.i18n | format(number: string): string<sup>8+</sup> | Formats the value of **number** based on the specified country and style. |
| ohos.i18n | constructor(country: string, options?: PhoneNumberFormatOptions)<sup>8+</sup> | Instantiates a **PhoneNumberFormat** object. |
| ohos.i18n | isValidNumber(number: string): boolean<sup>8+</sup> | Checks whether the value of **number** is a phone number in the correct format. |
| ohos.i18n | format(number: string): string<sup>8+</sup> | Formats the value of **number** based on the specified country and style. |
### How to Develop
......@@ -209,7 +209,7 @@ You can use APIs provided in the following table to obtain the system language a
Call the **PhoneNumberFormat** constructor to instantiate a **PhoneNumberFormat** object. The country code and formatting options of the phone number need to be passed into this constructor. The formatting options are optional, including a style option. Values of this option include: **E164**, **INTERNATIONAL**, **NATIONAL**, and **RFC3966**.
```js
var phoneNumberFormat = new i18n.PhoneNumberFormat("CN", {type: "E164"});
```
......@@ -223,7 +223,7 @@ You can use APIs provided in the following table to obtain the system language a
3. Format a phone number.
Call the **format** method of **PhoneNumberFormat** to format the input phone number.
```js
var formattedNumber = phoneNumberFormat.format("15812341234");
```
......@@ -236,15 +236,15 @@ The **unitConvert** API is provided to help you implement measurement conversion
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.i18n | unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string, style?: string): string<sup>8+</sup> | Converts one measurement unit (**fromUnit**) into another (**toUnit**) and formats the unit based on the specified locale and style. |
| ohos.i18n | unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string, style?: string): string<sup>8+</sup> | Converts one measurement unit (**fromUnit**) into another (**toUnit**) and formats the unit based on the specified locale and style. |
### How to Develop
1. Convert a measurement unit.
Call the [unitConvert](../reference/apis/js-apis-i18n.md#unitconvert8) method to convert a measurement unit and format the display result.
Call the [unitConvert](../reference/apis/js-apis-i18n.md#unitconvert9) method to convert a measurement unit and format the display result.
```js
......@@ -254,7 +254,7 @@ The **unitConvert** API is provided to help you implement measurement conversion
var locale = "en-US";
var style = "long";
i18n.Util.unitConvert(fromUtil, toUtil, number, locale, style);
```
```
## Alphabet Index
......@@ -278,7 +278,7 @@ The **unitConvert** API is provided to help you implement measurement conversion
Call the **getInstance** method to instantiate an **IndexUtil** object for a specific locale. When the **locale** parameter is empty, instantiate an **IndexUtil** object of the default locale.
```js
var indexUtil = i18n.getInstance("zh-CN");
```
......@@ -294,7 +294,7 @@ The **unitConvert** API is provided to help you implement measurement conversion
3. Add an index.
Call the **addLocale** method to add the alphabet index of a new locale to the current index list.
```js
indexUtil.addLocale("ar")
```
......@@ -302,7 +302,7 @@ The **unitConvert** API is provided to help you implement measurement conversion
4. Obtain the index of a string.
Call the **getIndex** method to obtain the alphabet index of a string.
```js
var text = "access index";
indexUtil.getIndex(text);
......@@ -336,7 +336,7 @@ When a text is displayed in more than one line, [BreakIterator8](../reference/ap
Call the **getLineInstance** method to instantiate a **BreakIterator** object.
```js
var locale = "en-US"
var breakIterator = i18n.getLineInstance(locale);
......@@ -357,7 +357,7 @@ When a text is displayed in more than one line, [BreakIterator8](../reference/ap
Call the **current** method to obtain the current position of the **BreakIterator** object in the text being processed.
```js
var pos = breakIterator.current();
```
......@@ -383,7 +383,9 @@ When a text is displayed in more than one line, [BreakIterator8](../reference/ap
Call the **isBoundary** method to determine whether a position is a break point. If yes, **true** is returned and the **BreakIterator** object is moved to this position. If no, **false** is returned and the **BreakIterator** object is moved to a break point after this position.
```js
var isboundary = breakIterator.isBoundary(5);
```
```
\ No newline at end of file
......@@ -13,13 +13,13 @@ Use [Locale](../reference/apis/js-apis-intl.md#locale) APIs to maximize or minim
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.intl | constructor()<sup>8+</sup> | Instantiates a **Locale** object. |
| ohos.intl | constructor(locale?: string, options?: options) | Instantiates a **Locale** object based on the locale parameter and options. |
| ohos.intl | toString(): string | Converts locale information into a string. |
| ohos.intl | maximize(): Locale | Maximizes locale information. |
| ohos.intl | minimize(): Locale | Minimizes locale information. |
| ohos.intl | constructor()<sup>8+</sup> | Instantiates a **Locale** object. |
| ohos.intl | constructor(locale?: string, options?: options) | Instantiates a **Locale** object based on the locale parameter and options. |
| ohos.intl | toString(): string | Converts locale information into a string. |
| ohos.intl | maximize(): Locale | Maximizes locale information. |
| ohos.intl | minimize(): Locale | Minimizes locale information. |
### How to Develop
......@@ -81,13 +81,13 @@ Use [DateTimeFormat](../reference/apis/js-apis-intl.md#datetimeformat) APIs to f
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **DateTimeFormat** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: DateTimeOptions) | Creates a **DateTimeFormat** object and sets the locale and other formatting-related attributes. |
| ohos.intl | format(date: Date): string | Calculates the date and time based on the locale and other formatting-related attributes of the **DateTimeFormat** object. |
| ohos.intl | formatRange(startDate: Date, endDate: Date): string | Calculates the period based on the locale and other formatting-related attributes of the **DateTimeFormat** object. |
| ohos.intl | resolvedOptions(): DateTimeOptions | Obtains the related attributes of the **DateTimeFormat** object. |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **DateTimeFormat** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: DateTimeOptions) | Creates a **DateTimeFormat** object and sets the locale and other formatting-related attributes. |
| ohos.intl | format(date: Date): string | Calculates the date and time based on the locale and other formatting-related attributes of the **DateTimeFormat** object. |
| ohos.intl | formatRange(startDate: Date, endDate: Date): string | Calculates the period based on the locale and other formatting-related attributes of the **DateTimeFormat** object. |
| ohos.intl | resolvedOptions(): DateTimeOptions | Obtains the related attributes of the **DateTimeFormat** object. |
### How to Develop
......@@ -144,12 +144,12 @@ Use [NumberFormat](../reference/apis/js-apis-intl.md#numberformat) APIs to forma
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **NumberFormat** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: NumberOptions) | Creates a **NumberFormat** object and sets the locale and other formatting-related attributes. |
| ohos.intl | format(number: number): string | Calculates the number based on the locale and other formatting-related attributes of the **NumberFormat** object. |
| ohos.intl | resolvedOptions(): NumberOptions | Obtains attributes of the **NumberFormat** object. |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **NumberFormat** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: NumberOptions) | Creates a **NumberFormat** object and sets the locale and other formatting-related attributes. |
| ohos.intl | format(number: number): string | Calculates the number based on the locale and other formatting-related attributes of the **NumberFormat** object. |
| ohos.intl | resolvedOptions(): NumberOptions | Obtains attributes of the **NumberFormat** object. |
### How to Develop
......@@ -195,12 +195,12 @@ Use [Collator](../reference/apis/js-apis-intl.md#collator8) APIs to sort strings
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **Collator** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: CollatorOptions)<sup>8+</sup> | Creates a **Collator** object and sets the locale and other related attributes. |
| ohos.intl | compare(first: string, second: string): number<sup>8+</sup> | Calculates the comparison result of two strings based on the locale and other attributes of the **Collator** object. |
| ohos.intl | resolvedOptions(): CollatorOptions<sup>8+</sup> | Obtains attributes of the **Collator** object. |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **Collator** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: CollatorOptions)<sup>8+</sup> | Creates a **Collator** object and sets the locale and other related attributes. |
| ohos.intl | compare(first: string, second: string): number<sup>8+</sup> | Calculates the comparison result of two strings based on the locale and other attributes of the **Collator** object. |
| ohos.intl | resolvedOptions(): CollatorOptions<sup>8+</sup> | Obtains attributes of the **Collator** object. |
### How to Develop
......@@ -214,7 +214,7 @@ Use [Collator](../reference/apis/js-apis-intl.md#collator8) APIs to sort strings
var collator = new intl.Collator();
```
Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions8).
Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions9).
```js
var collator= new intl.Collator("zh-CN", {localeMatcher: "best fit", usage: "sort"});
......@@ -246,11 +246,11 @@ Use [PluralRules](../reference/apis/js-apis-intl.md#pluralrules8) APIs to determ
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **PluralRules** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: PluralRulesOptions)<sup>8+</sup> | Creates a **PluralRules** object and sets the locale and other related attributes. |
| ohos.intl | select(n: number): string<sup>8+</sup> | Determines the singular-plural type based on the locale and other formatting-related attributes of the **PluralRules** object. |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **PluralRules** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: PluralRulesOptions)<sup>8+</sup> | Creates a **PluralRules** object and sets the locale and other related attributes. |
| ohos.intl | select(n: number): string<sup>8+</sup> | Determines the singular-plural type based on the locale and other formatting-related attributes of the **PluralRules** object. |
### How to Develop
......@@ -264,7 +264,7 @@ Use [PluralRules](../reference/apis/js-apis-intl.md#pluralrules8) APIs to determ
var pluralRules = new intl.PluralRules();
```
Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions8).
Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions9).
```js
var pluralRules = new intl.PluralRules("zh-CN", {localeMatcher: "best fit", type: "cardinal"});
......@@ -287,13 +287,13 @@ Use [RelativeTimeFormat](../reference/apis/js-apis-intl.md#relativetimeformat8)
### Available APIs
| Module | API | Description |
| Module | API | Description |
| -------- | -------- | -------- |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **RelativeTimeFormat** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: RelativeTimeFormatInputOptions)<sup>8+</sup> | Creates a **RelativeTimeFormat** object and sets the locale and other formatting-related attributes. |
| ohos.intl | format(value: number, unit: string): string<sup>8+</sup> | Calculates the relative time format based on the locale and other formatting-related attributes of the **RelativeTimeFormat** object. |
| ohos.intl | formatToParts(value: number, unit: string): Array&lt;object&gt;<sup>8+</sup> | Returns each part of the relative time format based on the locale and other formatting-related attributes of the **RelativeTimeFormat** object. |
| ohos.intl | resolvedOptions(): RelativeTimeFormatResolvedOptions<sup>8+</sup> | Obtains attributes of the **RelativeTimeFormat** object. |
| ohos.intl | constructor()<sup>8+</sup> | Creates a **RelativeTimeFormat** object. |
| ohos.intl | constructor(locale: string \| Array&lt;string&gt;, options?: RelativeTimeFormatInputOptions)<sup>8+</sup> | Creates a **RelativeTimeFormat** object and sets the locale and other formatting-related attributes. |
| ohos.intl | format(value: number, unit: string): string<sup>8+</sup> | Calculates the relative time format based on the locale and other formatting-related attributes of the **RelativeTimeFormat** object. |
| ohos.intl | formatToParts(value: number, unit: string): Array&lt;object&gt;<sup>8+</sup> | Returns each part of the relative time format based on the locale and other formatting-related attributes of the **RelativeTimeFormat** object. |
| ohos.intl | resolvedOptions(): RelativeTimeFormatResolvedOptions<sup>8+</sup> | Obtains attributes of the **RelativeTimeFormat** object. |
### How to Develop
......@@ -307,7 +307,7 @@ Use [RelativeTimeFormat](../reference/apis/js-apis-intl.md#relativetimeformat8)
var relativeTimeFormat = new intl.RelativeTimeFormat();
```
Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions8).
Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions9).
```js
var relativeTimeFormat = new intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"});
......
......@@ -19,5 +19,5 @@ import StartOptions from '@ohos.application.StartOptions';
| Name| Readable| Writable| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | -------- | -------- |
| [windowMode](js-apis-application-abilityConstant.md#AbilityConstant.WindowMode) | Yes| No| number | No| Window mode.|
| [windowMode](js-apis-application-abilityConstant.md#abilityconstantwindowmode) | Yes| No| number | No| Window mode.|
| displayId | Yes| No| number | No| Display ID.|
# Battery Info
>![](../../public_sys-resources/icon-note.gif) **NOTE:**
>**NOTE**
>
>The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The Battery Info module provides APIs for querying the charger type, battery health status, and battery charging status.
......@@ -25,7 +26,7 @@ Describes battery information.
| batterySOC | number | Yes | No | Battery state of charge (SoC) of the current device, in unit of percentage. |
| chargingStatus | [BatteryChargeState](#batterychargestate) | Yes | No | Battery charging state of the current device. |
| healthStatus | [BatteryHealthState](#batteryhealthstate) | Yes | No | Battery health state of the current device. |
| pluggedType | [BatteryPluggedType](#batterypluggertype) | Yes | No | Charger type of the current device. |
| pluggedType | [BatteryPluggedType](#batterypluggedtype) | Yes | No | Charger type of the current device. |
| voltage | number | Yes | No | Battery voltage of the current device, in unit of microvolt. |
| technology | string | Yes | No | Battery technology of the current device. |
| batteryTemperature | number | Yes | No | Battery temperature of the current device, in unit of 0.1°C. |
......@@ -43,12 +44,12 @@ var batterySoc = batteryInfo.batterySOC;
Enumerates charger types.
| Name | Default Value | Description |
| -------- | ------------- | ---------------- |
| NONE | 0 | Unknown type |
| AC | 1 | AC charger |
| USB | 2 | USB charger |
| WIRELESS | 3 | Wireless charger |
| Name | Default Value | Description |
| -------- | ------------- | ----------------- |
| NONE | 0 | Unknown type. |
| AC | 1 | AC charger. |
| USB | 2 | USB charger. |
| WIRELESS | 3 | Wireless charger. |
## BatteryChargeState
......
......@@ -500,6 +500,7 @@ Returns properties reflecting the locale and collation options of a **Collator**
| [CollatorOptions](#collatoroptions) | Properties of the **Collator** object.|
**Example**
```
var collator = new Intl.Collator("zh-Hans");
var options = collator.resolvedOptions();
......
......@@ -29,15 +29,15 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description|
| ---------- | ------ | ---- | ---- |
| volumeUuid | string | Yes | UUID of the volume.|
| Name | Type | Mandatory| Description|
| ---------- | ------ | ---- | ---- |
| volumeUuid | string | Yes | UUID of the volume.|
**Return value**
| Type | Description |
| --------------------- | ---------------- |
| Promise&lt;number&gt; | Promise used to return the total size of the volume.|
| Type | Description |
| --------------------- | ---------------- |
| Promise&lt;number&gt; | Promise used to return the total size of the volume.|
**Example**
......@@ -66,10 +66,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------ | ---- | -------------------------- |
| volumeUuid | string | Yes | UUID of the volume. |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the total size of the volume.|
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------ | ---- | -------------------------- |
| volumeUuid | string | Yes | UUID of the volume. |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the total size of the volume.|
**Example**
......@@ -97,15 +97,15 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description|
| ---------- | ------ | ---- | ---- |
| volumeUuid | string | Yes | UUID of the volume.|
| Name | Type | Mandatory| Description|
| ---------- | ------ | ---- | ---- |
| volumeUuid | string | Yes | UUID of the volume.|
**Return value**
| Type | Description |
| --------------------- | ------------------ |
| Promise&lt;number&gt; | Promise used to return the available space of the volume.|
| Type | Description |
| --------------------- | ------------------ |
| Promise&lt;number&gt; | Promise used to return the available space of the volume.|
**Example**
......@@ -135,10 +135,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------ | ---- | ---------------------------- |
| volumeUuid | string | Yes | UUID of the volume. |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the available space of the volume.|
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------ | ---- | ---------------------------- |
| volumeUuid | string | Yes | UUID of the volume. |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the available space of the volume.|
**Example**
......@@ -166,15 +166,15 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | ------ | ---- | -------- |
| packageName | string | Yes | Bundle name of the application.|
| Name | Type | Mandatory| Description |
| ----------- | ------ | ---- | -------- |
| packageName | string | Yes | Bundle name of the application.|
**Return value**
| Type | Description |
| ------------------------------------------ | -------------------------- |
| Promise&lt;[Bundlestats](#bundlestats)&gt; | Promise used to return the space information obtained.|
| Type | Description |
| ------------------------------------------ | -------------------------- |
| Promise&lt;[Bundlestats](#bundlestats)&gt; | Promise used to return the space information obtained.|
**Example**
......@@ -203,10 +203,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------------------ |
| packageName | string | Yes | Bundle name of the application.|
| callback | callback:AsyncCallback&lt;[Bundlestats](#bundlestats)&gt; | Yes | Callback invoked to return the space information obtained.|
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------------------ |
| packageName | string | Yes | Bundle name of the application.|
| callback | callback:AsyncCallback&lt;[Bundlestats](#bundlestats)&gt; | Yes | Callback invoked to return the space information obtained.|
**Example**
......@@ -228,9 +228,9 @@ Asynchronously obtains space information of the current third-party application.
**Return value**
| Type | Description |
| ------------------------------------------ | -------------------------- |
| Promise&lt;[Bundlestats](#bundlestats)&gt; | Promise used to return the space information obtained. |
| Type | Description |
| ------------------------------------------ | -------------------------- |
| Promise&lt;[Bundlestats](#bundlestats)&gt; | Promise used to return the space information obtained. |
**Example**
......@@ -249,9 +249,9 @@ Asynchronously obtains space information of the current third-party application.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------------------ |
| callback | callback:AsyncCallback&lt;[BundleStats](#bundlestats)&gt; | Yes | Callback invoked to return the space information obtained. |
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------------------ |
| callback | callback:AsyncCallback&lt;[BundleStats](#bundlestats)&gt; | Yes | Callback invoked to return the space information obtained. |
**Example**
......@@ -294,9 +294,9 @@ This is a system API and cannot be called by third-party applications.
**Return value**
| Type | Description |
| --------------------- | ------------------ |
| Promise&lt;number&gt; | Promise used to return the total space of the built-in memory card. |
| Type | Description |
| --------------------- | ------------------ |
| Promise&lt;number&gt; | Promise used to return the total space of the built-in memory card. |
**Example**
......@@ -321,9 +321,9 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------------------------------------ | ---- | ------------------------ |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the total space of the built-in memory card.|
| Name | Type | Mandatory | Description |
| -------- | ------------------------------------ | ---- | ------------------------ |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the total space of the built-in memory card.|
**Example**
......@@ -351,9 +351,9 @@ This is a system API and cannot be called by third-party applications.
**Return value**
| Type | Description |
| --------------------- | ------------------ |
| Promise&lt;number&gt; | Promise used to return the available space of the built-in memory card.|
| Type | Description |
| --------------------- | ------------------ |
| Promise&lt;number&gt; | Promise used to return the available space of the built-in memory card.|
**Example**
......@@ -379,9 +379,9 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------ | ---- | ------------------------- |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the available space of the built-in memory card.|
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------ | ---- | ------------------------- |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the available space of the built-in memory card.|
**Example**
......@@ -408,9 +408,9 @@ This is a system API and cannot be called by third-party applications.
**Return value**
| Type | Description |
| --------------------- | ---------------- |
| Promise&lt;number&gt; | Promise used to return the system space obtained.|
| Type | Description |
| --------------------- | ---------------- |
| Promise&lt;number&gt; | Promise used to return the system space obtained.|
**Example**
......@@ -438,9 +438,9 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------ | ---- | -------------------------- |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback used to return the system space obtained.|
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------ | ---- | -------------------------- |
| callback | callback:AsyncCallback&lt;number&gt; | Yes | Callback used to return the system space obtained.|
**Example**
......@@ -467,15 +467,15 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description|
| ---------- | ------ | ---- | ---- |
| userId | number | No | User ID.<br>Value:<br>-&nbsp; Set this parameter to the ID of the user to be queried.<br>-&nbsp; If no value is specified, information about the current user is queried.|
| Name | Type | Mandatory| Description|
| ---------- | ------ | ---- | ---- |
| userId | number | No | User ID.<br>Value:<br>-&nbsp; Set this parameter to the ID of the user to be queried.<br>-&nbsp; If no value is specified, information about the current user is queried.|
**Return value**
| Type | Description |
| --------------------- | ---------------- |
| Promise&lt;[StorageStats](#StorageStats)&gt; | Promise used to return the information obtained.|
| Type | Description |
| --------------------- | ---------------- |
| Promise&lt;[StorageStats](#storagestats9)&gt; | Promise used to return the information obtained.|
**Example**
......@@ -504,10 +504,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------ | ---- | -------------------------- |
| userId | number | No | User ID.<br>Value:<br>-&nbsp; Set this parameter to the ID of the user to be queried.<br>-&nbsp; If no value is specified, information about the current user is queried. |
| callback | callback:AsyncCallback&lt;[StorageStats](#StorageStats)&gt; | Yes | Callback invoked to return the information obtained.|
| Name | Type | Mandatory| Description |
| ---------- | ------------------------------------ | ---- | -------------------------- |
| userId | number | No | User ID.<br>Value:<br>-&nbsp; Set this parameter to the ID of the user to be queried.<br>-&nbsp; If no value is specified, information about the current user is queried. |
| callback | callback:AsyncCallback&lt;[StorageStats](#storagestats9)&gt; | Yes | Callback invoked to return the information obtained.|
**Example**
......
# animate<a name="EN-US_TOPIC_0000001127125042"></a>
# animate
The **<animate\>** component is used to apply animation to an **<svg\>** component.
>![](../../public_sys-resources/icon-note.gif) **NOTE:**
>![](../../public_sys-resources/icon-note.gif) **NOTE**
>
>This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Required Permissions<a name="section11257113618419"></a>
## Required Permissions
None
## Child Components<a name="section9288143101012"></a>
## Child Components
Not supported
## Attributes<a name="section2907183951110"></a>
## Attributes
<a name="table20633101642315"></a>
<table><thead align="left"><tr id="row663331618238"><th class="cellrowborder" valign="top" width="23.119999999999997%" id="mcps1.1.6.1.1"><p id="aaf1247770b244944bbcc9f28d9a6f00b"><a name="aaf1247770b244944bbcc9f28d9a6f00b"></a><a name="aaf1247770b244944bbcc9f28d9a6f00b"></a>Name</p>
......@@ -193,7 +194,7 @@ Not supported
</tbody>
</table>
## Example<a name="section360556124815"></a>
## Example
```
<!-- xxx.hml -->
......
......@@ -89,4 +89,4 @@ struct PathExample {
}
```
![zh-cn_image_0000001219744193](figures/zh-cn_image_0000001219744193.png)
![en-us_image_0000001219744193](figures/en-us_image_0000001219744193.png)
......@@ -2031,6 +2031,8 @@ Resets the existing transformation matrix and creates a new transformation matri
![en-us_image_0000001193872526](figures/en-us_image_0000001193872526.png)
### translate
### translate
translate(x: number, y: number): void
......
......@@ -4,31 +4,31 @@
The framework provides four pixel units, with vp as the reference data unit.
| Name | Description |
| Name | Description |
| -------- | -------- |
| px | Physical pixel unit of the screen. |
| vp | Pixels specific to the screen density, which are converted into physical pixels of the screen based on the screen pixel density. |
| fp | Font pixel, which is similar to vp and varies according to the system font size. |
| lpx | Logical pixel unit of the window. It is the ratio of the actual screen width to the logical width (configured by [designWidth](../ui/ts-framework-js-tag.md)). For example, if designWidth is set to 720, then 1lpx is equal to 2px for a screen with an actual width of 1440 physical pixels. |
| px | Physical pixel unit of the screen. |
| vp | Pixels specific to the screen density, which are converted into physical pixels of the screen based on the screen pixel density. |
| fp | Font pixel, which is similar to vp and varies according to the system font size. |
| lpx | Logical pixel unit of the window. It is the ratio of the actual screen width to the logical width (configured by [designWidth](../quick-start/package-structure.md)). For example, if designWidth is set to 720, then 1lpx is equal to 2px for a screen with an actual width of 1440 physical pixels. |
## Pixel Unit Conversion
Conversion from other pixel units to px is supported.
| API | Description |
| API | Description |
| -------- | -------- |
| vp2px(value : number) : number | Converts a value in units of vp to a value in units of px. |
| px2vp(value : number) : number | Converts a value in units of px to a value in units of vp. |
| fp2px(value : number) : number | Converts a value in units of fp to a value in units of px. |
| px2fp(value : number) : number | Converts a value in units of px to a value in units of fp. |
| lpx2px(value : number) : number | Converts a value in units of lpx to a value in units of px. |
| px2lpx(value : number) : number | Converts a value in units of px to a value in units of lpx. |
| vp2px(value : number) : number | Converts a value in units of vp to a value in units of px. |
| px2vp(value : number) : number | Converts a value in units of px to a value in units of vp. |
| fp2px(value : number) : number | Converts a value in units of fp to a value in units of px. |
| px2fp(value : number) : number | Converts a value in units of px to a value in units of fp. |
| lpx2px(value : number) : number | Converts a value in units of lpx to a value in units of px. |
| px2lpx(value : number) : number | Converts a value in units of px to a value in units of lpx. |
## Example
```ts
// xxx.ets
@Entry
......
# Code of Conduct<a name="EN-US_TOPIC_0000001055368056"></a>
# Code of Conduct
The OpenHarmony community complies with the code of conduct specified in [Contributor Covenant](https://contributor-covenant.org/) of the open source community. For details, see [https://www.contributor-covenant.org/version/1/4/code-of-conduct/](https://www.contributor-covenant.org/version/1/4/code-of-conduct/).
......
# How to Contribute<a name="EN-US_TOPIC_0000001055208082"></a>
# How to Contribute
## Contributing Code<a name="en-us_topic_0000001053868136_section10170447161315"></a>
## Contributing Code
## Before You Start<a name="en-us_topic_0000001053868136_section2734837154520"></a>
## Before You Start
**Signing the Developer Certificate of Origin**
......@@ -12,25 +12,25 @@ Click [here](https://dco.openharmony.cn/#/sign) to sign the DCO, and click [here
**Code of Conduct**
OpenHarmony is an open source community that relies entirely on the friendly, welcoming environment of the community. Read and abide by the community's [Code of Conduct](code-of-conduct.md#EN-US_TOPIC_0000001055368056) before contributing to the community.
OpenHarmony is an open source community that relies entirely on the friendly, welcoming environment of the community. Read and abide by the community's [Code of Conduct](code-of-conduct.md) before contributing to the community.
## **Finding the SIG Group You Are Interested**
For details about how to participate in Special Interest Group (SIG), see **SIG Governance**.
## Starting Contributing<a name="en-us_topic_0000001053868136_section184321756134618"></a>
## Starting Contributing
For details about how to contribute to code, see [Code Contributing ](code-contribution.md).
For details about how to contribute to code, see [Code Contributing ](code-contribution.md).
## Auto-Test
For details about how to develop test cases based on test requirements, see [Test Subsystem](../readme/test.md).
## Contributing Documents<a name="en-us_topic_0000001053868136_section11234185012131"></a>
## Contributing Documents
For details, see [Documentation Contribution](documentation-contribution.md).
For details, see [Documentation Contribution](documentation-contribution.md).
## Communication in Community<a name="en-us_topic_0000001053868136_section98614457153"></a>
## Communication in Community
For details, see [Communication in Community](communication-in-community.md#EN-US_TOPIC_0000001054608107).
For details, see [Communication in Community](communication-in-community.md).
......@@ -96,7 +96,7 @@ import call from '@ohos.telephony.call';
| Name | Type | Readable| Writable| Description |
| ---------------- | ----------------------------------------- | ---- | ---- | ------------------------------------------ |
| pluggedType | [BatteryPluggedType](#batterypluggedtype) | Yes | No | Charger type of the current device. |
| pluggedType | [BatteryPluggedType]\(#batterypluggedtype) | Yes | No | Charger type of the current device. |
| isBatteryPresent | boolean | Yes | No | Whether the battery is supported or present.|
## Methods
......@@ -270,7 +270,7 @@ The following is an example of the custom type of a key-value pair.
| Name | Type | Readable| Writable| Description |
| ------------ | ------------------- | ---- | ---- | ------------------------------------------------------------ |
| parameterUrl | string | Yes | Yes | Media output URI. Supported:<br>1. Relative path whose protocol type is `internal`. Example: <br/>Temporary directory: internal://cache/test.mp4<br>2. Absolute path. Example:<br/>file:///data/data/ohos.xxx.xxx/files/test.mp4|
| parameterOne | [CustomEnum](#Enumeration)| Yes | Yes | Describe the attributes. The requirements are similar to those for the parameter description. |
| parameterOne | [CustomEnum](#enums) | Yes | Yes | Describe the attributes. The requirements are similar to those for the parameter description. |
## Change History
| Change Description| Date|
......
# Video Recording<a name="EN-US_TOPIC_0000001054754827"></a>
## When to Use<a name="en-us_topic_0000001051451869_section186634310418"></a>
Use the camera module APIs to capture video streams.
## Available APIs<a name="en-us_topic_0000001051451869_section125479541744"></a>
For details, see the available APIs described in development guidelines on photographing.
## Limitations and Constraints<a name="en-us_topic_0000001051451869_section1165911177314"></a>
None
## How to Develop<a name="en-us_topic_0000001051451869_section1196016315516"></a>
1. Perform step 1 through step 4 described in development guidelines on photographing.
2. Obtain the **FrameConfig** instance for audio recording.
```
/* Obtain the surface from the recorder. */
Surface *surface = recorder_->GetSurface(0);
surface->SetWidthAndHeight(1920, 1080);
surface->SetQueueSize(3);
surface->SetSize(1024 * 1024);
/* Add the surface to the FrameConfig instance. */
FrameConfig *fc = new FrameConfig(FRAME_CONFIG_RECORD);
fc->AddSurface(*surface);
```
3. Start and stop video recording.
```
stateCallback->camera_->TriggerLoopingCapture(*fc); // Start recording.
stateCallback->camera_->StopLoopingCapture(); // Stop recording.
```
# Use Case<a name="EN-US_TOPIC_0000001055686082"></a>
- For details about the development board, compilation, burning, and image running, see [Quick Start](../quick-start/Readme-EN.md). A compilation result file of sample code is stored in **out/ipcamera\_hi3518ev300/dev\_tools/bin/camera\_sample**. You can copy the file to a TF card, or modify the compilation script of **camera\_sample** to copy the result to **rootfs.img**.
Modify **output\_dir** in **applications/sample/camera/media/BUILD.gn**.
- Before: **output\_dir = "$root\_out\_dir/dev\_tools"**
- After: **output\_dir = "$root\_out\_dir/"**
Recompile the source code repository and burn the code into the development board. Then you can find the **camera\_sample** file in the **bin** directory of the board.
- The sample code for camera development is stored in **applications/sample/camera/media/camera\_sample.cpp**.
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>You should insert a TF card \(maximum capacity: 128 GB\) for photographing and video recording functions. After the system is started, the TF card is automatically mounted to the **/sdcard** directory. If the TF card is inserted after the system is started, you have to manually mount the TF card. To view the photos and videos in the TF card, copy the content to a computer. The preview function does not require a TF card.
1. Run the **cd** command to go to the end path of the executable program and start **camera\_sample** by running the command in the following figure.
**Figure 1** Starting camera\_sample<a name="en-us_topic_0000001055301733_fig380985885020"></a>
![](figures/starting-camera_sample.png "starting-camera_sample")
The control commands are displayed as shown in the preceding figure. Press **S** to stop the current operation \(including video recording and preview\), and press **Q** to exit the program.
2. Press **1** to take a photo in JPG format. The photo is saved in the **/sdcard** directory and named **Capture\***.
**Figure 2** Serial port logs displayed after the photographing command is executed<a name="en-us_topic_0000001055301733_fig17819185018384"></a>
![](figures/serial-port-logs-displayed-after-the-photographing-command-is-executed.png "serial-port-logs-displayed-after-the-photographing-command-is-executed")
To view the saved file, exit the program and enter the file system. To start the program again, return to the previous step.
**Figure 3** Saved files<a name="en-us_topic_0000001055301733_fig166391743154619"></a>
![](figures/saved-files.png "saved-files")
3. Press **2** to start recording. The video file is in MP4 format and saved in the **/sdcard** directory with the name **Record\***. Press **S** to stop recording.
**Figure 4** Serial port logs displayed after the recording command is executed<a name="en-us_topic_0000001055301733_fig6340814174317"></a>
![](figures/serial-port-logs-displayed-after-the-recording-command-is-executed.png "serial-port-logs-displayed-after-the-recording-command-is-executed")
4. Press **Q** to exit.
**Figure 5** Serial port logs displayed after the exit command is executed<a name="en-us_topic_0000001055301733_fig1755682174514"></a>
![](figures/serial-port-logs-displayed-after-the-exit-command-is-executed.png "serial-port-logs-displayed-after-the-exit-command-is-executed")
# Camera Control Overview<a name="EN-US_TOPIC_0000001055366100"></a>
This document describes how to use the IoT camera development board and the built-in camera of the development kit to implement photographing and video recording.
You can perform operations provided in [Use Case](device-iotcamera-control-example.md) to learn more about development board peripheral control and then develop devices such as cameras.
If you want to view the sample effect first, see [Use Case](device-iotcamera-control-example.md). To customize application behavior, modify the sample code by referring to APIs described in the next section.
For details about basic concepts for camera development, see [Camera Overview](../subsystems/subsys-multimedia-camera-overview.md).
# Kernel Coding Specification<a name="EN-US_TOPIC_0000001079036432"></a>
# Kernel Coding Specification
This kernel coding specification is developed based on the general programming specifications in the industry. It defines the programming styles for kernel developers to follow.
......
......@@ -24,7 +24,7 @@ The CPU architecture includes two layers: general architecture definition layer
| Header file name| los_&lt;function&gt;.h | los_arch_&lt;function&gt;.h |
| Function name| Halxxxx | Halxxxx |
LiteOS-M supports mainstream architectures, such as ARM Cortex-M3, ARM Cortex-M4, ARM Cortex-M7, ARM Cortex-M33, and RISC-V. If you need to expand the CPU architecture, see [Chip Architecture Adaptation](../porting/porting-chip-kernel-overview.md).
LiteOS-M supports mainstream architectures, such as ARM Cortex-M3, ARM Cortex-M4, ARM Cortex-M7, ARM Cortex-M33, and RISC-V.
## Working Principles
......
......@@ -16,7 +16,7 @@ The kernel used by module chips is LiteOS Cortex-M, which consists of four modul
**Figure 1** Architecture of the LiteOS Cortex-M kernel<a name="fig10838105524917"></a>
<img src="figures/architecture-of-the-liteos-cortex-m-kernel.png" style="zoom:75%;" />
![architecture-of-the-liteos-cortex-m-kernel.png](figures/architecture-of-the-liteos-cortex-m-kernel.png)
The directory structure of the kernel is described as follows:
......
......@@ -94,7 +94,7 @@ For device with 128 KB to 128 MB of memory, the OpenHarmony lite kernel is recom
- Secure boot must be enabled, and the trusted root must be in the chip and cannot be modified. In addition, you must consider the impact of secure upgrade (if available) on secure boot, that is, the signature or hash value of an image file must be updated after a secure upgrade.
## Data security
## Data Security
### Security Mechanism
......
# Privacy Protection<a name="EN-US_TOPIC_0000001083754024"></a>
# Privacy Protection
## Overview<a name="section13200134331414"></a>
## Overview
Personal data plays an increasingly important role in social economy and daily life along with the development of the Internet and informatization. Meanwhile, personal data leakage risks are increasing. As consumer product developers, you shall take more effective measures to protect users' personal data and improve their trust in your products. To protect consumers' privacy and improve their experience on privacy, you should set high-level privacy protection policies for your product.
......@@ -49,7 +49,7 @@ Personal data plays an increasingly important role in social economy and daily l
- Users provide information proactively, such as scenarios where a user enters their identification number and bank card number to bind the bank card.
## Data Classification<a name="section2371104991511"></a>
## Data Classification
Data is classified into five levels: very high, high, moderate, low, and public based on the data protection objectives and consequences \(the impact of legal risks caused by data leakage or damage on individuals, organizations, or the public\).
......@@ -116,7 +116,7 @@ Data is classified into five levels: very high, high, moderate, low, and public
Note: For details about the definitions of privacy protection and data classification, see GDPR.
## General Privacy Design Rules<a name="section10354102411162"></a>
## General Privacy Design Rules
To help you better complete privacy design for OpenHarmony products, we sort out general privacy design requirements.
......@@ -133,7 +133,7 @@ When collecting personal data, clearly and explicitly notify users of the data t
Guided by the preceding principles, we have designed some examples for your reference. The figures below are examples of a privacy notice and a privacy statement, respectively.
**Figure 1** Examples of a privacy notice and a privacy statement<a name="fig1611815442274"></a>
**Figure 1** Examples of a privacy notice and a privacy statement
![](figure/privacy-notice.png)![](figure/privacy-statement.png)
......@@ -190,9 +190,9 @@ You shall obtain consent from users and comply with applicable laws and regulati
Data processing security shall be ensured in technical terms, which include encrypted data storage and secure data transfer. Security mechanisms or measures shall be enabled by default for a system.
- A protection mechanism shall be available for personal data access, including identity authentication and access control. Identity authentication \(such as username and password\) allows only authenticated users to access data in multi-user scenarios. Access control \(for example, [permission control](security-guidelines-overall.md#section852593153614)\) can be applied to restrict access to applications.
- A protection mechanism shall be available for personal data access, including identity authentication and access control. Identity authentication \(such as username and password\) allows only authenticated users to access data in multi-user scenarios. Access control \(for example, [permission control](../security/security-guidelines-overall.md)\) can be applied to restrict access to applications.
- Secure storage of personal data on distributed devices must meet Huawei Universal Keystore \(HUKS\) requirements, including secure storage of keys and data.
- The transfer of personal data between distributed devices must meet the trust binding relationship between devices and security requirements of data transmission channels. For details, see [Security Guidelines](security-guidelines-overall.md#section26153183616).
- The transfer of personal data between distributed devices must meet the trust binding relationship between devices and security requirements of data transmission channels. For details, see [Device Interconnection Security](../security/security-guidelines-overall.md#device-interconnection-security).
- Authentication data \(such as passwords and fingerprints\) shall be encrypted before being stored.
**Localization**
......@@ -203,7 +203,7 @@ User data shall be preferentially processed on the local device. Data that canno
If your product is designed for minors or you can identify, based on the collected user age data, that the end user is a minor, you shall particularly analyze issues related to minors' personal data protection based on relevant national laws in the target market. Your product shall obtain explicit consent from the holders of parental responsibility over minors.
## **Privacy Protection Requirements for Special Categories**<a name="section118861450201618"></a>
## **Privacy Protection Requirements for Special Categories**
In addition to these general privacy requirements, consumer hardware products have the following requirements for special categories. You shall comply with these requirements during product design.
......
# AI Framework Development Guide
# AI Framework Development
## **Overview**
......
# HiTraceChain Development<a name="EN-US_TOPIC_0000001186134310"></a>
# HiTraceChain Development
## Overview<a name="section3986195420436"></a>
## Overview
HiTraceChain tracks the call chain with the same **traceid** throughout the inter-device, inter-process, and inter-thread service processes. It associates and displays the call relationship and various output information during the entire process, helping you analyze and locate faults and optimize the system.
## Use Cases<a name="section134561822574"></a>
## Use Cases
HiTraceChain can be used for the following purposes:
......@@ -14,32 +14,36 @@ HiTraceChain can be used for the following purposes:
- Works with the IDE to debug the detailed service process and time consumption distribution for system optimization.
**Figure 1** Use cases of HiTraceChain<a name="fig179241023125715"></a>
**Figure 1** Use cases of HiTraceChain
![](figure/use-cases-of-hitrace.png "use-cases-of-hitrace")
### Usage Example<a name="section63861653124417"></a>
### Usage Example
**Figure 2** Service calling process \(inter-device and inter-process synchronous call\)
**Figure 2** Service calling process \(inter-device and inter-process synchronous call\)<a name="fig173491014145819"></a>
![](figure/service-calling-process-(inter-device-and-inter-process-synchronous-call).png "service-calling-process-(inter-device-and-inter-process-synchronous-call)")
1. Display the call relationship in the service process, analyze key paths and function dependency, and determine the time consumption and call frequency at each call point to detect performance bottlenecks.
1. Display the call relationship in the service process, analyze key paths and function dependency, and determine the time consumption and call frequency at each call point to detect performance bottlenecks.
**Figure 3** Service calling process
**Figure 3** Service calling process<a name="fig205051834145813"></a>
![](figure/service-calling-process.png "service-calling-process")
![](figure/service-calling-process.png "service-calling-process")
**Figure 4** Time delay in the service calling process<a name="fig1212812422586"></a>
![](figure/time-delay-in-the-service-calling-process.png "time-delay-in-the-service-calling-process")
**Figure 4** Time delay in the service calling process
![](figure/time-delay-in-the-service-calling-process.png "time-delay-in-the-service-calling-process")
2. Add **traceid** to logs and events automatically to facilitate comprehensive analysis and quick fault location.
## Available APIs<a name="section1517945334617"></a>
## Available APIs
HiTraceChain provides C++ and C APIs. The upper-layer services mainly use HiTraceChain to start and stop call chain tracing.
HiTraceChain is implemented at layer C. It works by transferring **traceid** throughout the service calling process. Before service processing, HiTraceChain sets **traceid** in the thread local storage \(TLS\) of the calling thread. During service processing, HiTraceChain obtains **traceid** from the contextual TLS of the calling thread and automatically adds it to the log and event information. After service processing is complete, HiTraceChain clears **traceid** from the TLS of the calling thread.
### Java, C++, and C APIs<a name="section932504474"></a>
### Java, C++, and C APIs
**Table 1** Description of C++ and C APIs
......@@ -195,7 +199,7 @@ HiTraceChain is implemented at layer C. It works by transferring **traceid** t
</tbody>
</table>
### Parameters of C++ APIs<a name="section2514638125"></a>
### Parameters of C++ APIs
**Table 2** Parameters of C++ APIs
......@@ -428,7 +432,7 @@ HiTraceChain is implemented at layer C. It works by transferring **traceid** t
</tbody>
</table>
## Call Chain Processing<a name="section11257133933"></a>
## Call Chain Processing
Inter-device, inter-process, and inter-thread calls are implemented through the communication mechanism. **HiTraceChain** requires transfer of **traceid** in the communication mechanism.
......@@ -438,7 +442,8 @@ The following figure shows the process of transferring **traceid** in synchron
Extended communication mechanisms can also follow this implementation.
**Figure 5** Call chain tracing in synchronous communication<a name="fig36822045171020"></a>
**Figure 5** Call chain tracing in synchronous communication
![](figure/call-chain-tracing-in-synchronous-communication.png "call-chain-tracing-in-synchronous-communication")
The process is as follows:
......@@ -471,9 +476,9 @@ The process is as follows:
8. The service module on the client processes the transact reply response.
9. When the process ends, the service module on the client calls the **end\(\)** function to stop call chain tracing.
## How to Develop<a name="section14310412491"></a>
## How to Develop
### C++<a name="section114916381509"></a>
### C++
1. Develop the source code.
......@@ -499,7 +504,7 @@ The process is as follows:
```
### C<a name="section108292107514"></a>
### C
1. Develop the source code.
......
# Telephony Development<a name="EN-US_TOPIC_0000001167051994"></a>
# Telephony Development
## Initializing a Modem Vendor Library<a name="section211mcpsimp"></a>
## Initializing a Modem Vendor Library
### When to Use<a name="section213mcpsimp"></a>
### When to Use
Initializing a modem vendor library means to implement **const HRilOps \*RilInitOps\(const struct HRilReport \*reportOps\)** function in the vendor library. This function is mainly used to:
......@@ -10,17 +10,17 @@ Initializing a modem vendor library means to implement **const HRilOps \*RilInit
- Create a thread for reading modem nodes. In this thread, the data reported by the modem is read cyclically and parsed as a specific service event for reporting.
- Return the function pointer of the service request API to RIL Adapter.
### Available APIs<a name="section811343241215"></a>
### Available APIs
The following table describes the API for initializing a modem vendor library.
**Table 1** API for initializing a modem vendor library
| API | Description |
| API | Description |
| -------- | -------- |
| const&nbsp;HRilOps&nbsp;\*RilInitOps(const&nbsp;struct&nbsp;HRilReport&nbsp;\*&nbsp;reportOps) | Provides an entry for running a modem vendor library.<br>Input parameter:<br>**reportOps**: Specifies the pointer to the event callback function, which is passed by RIL Adapter.<br/>Return result: function pointer of the service request API. |
| const&nbsp;HRilOps&nbsp;\*RilInitOps(const&nbsp;struct&nbsp;HRilReport&nbsp;\*&nbsp;reportOps) | Provides an entry for running a modem vendor library.<br>Input parameter:<br>**reportOps**: Specifies the pointer to the event callback function, which is passed by RIL Adapter.<br/>Return result: function pointer of the service request API. |
### How to Develop<a name="section51031144122"></a>
### How to Develop
1. Set the event callback function pointers passed by RIL Adapter through **RilInitOps**.
......@@ -37,7 +37,7 @@ The following table describes the API for initializing a modem vendor library.
```
1. Create the **g\_reader** main thread to enable message looping.
2. Create the **g\_reader** main thread to enable message looping.
```
pthread_attr_t t;
......@@ -47,7 +47,7 @@ The following table describes the API for initializing a modem vendor library.
```
1. In the **g\_eventListeners** thread, use **open\(\)** to open a modem node and then create the **g\_reader** thread to read and process messages reported by the modem.
3. In the **g\_eventListeners** thread, use **open\(\)** to open a modem node and then create the **g\_reader** thread to read and process messages reported by the modem.
```
g_fd = open(g_devicePath, O_RDWR); // Open the device node specified by g_devicePath.
......@@ -57,7 +57,7 @@ The following table describes the API for initializing a modem vendor library.
```
1. Return the function pointer of the service request API.
4. Return the function pointer of the service request API.
```
// Structure for the service request API of the call module
......@@ -105,9 +105,9 @@ The following table describes the API for initializing a modem vendor library.
```
### Debugging and Verification<a name="section5351151517132"></a>
### Debugging and Verification
1. Use the [hdc\_std](../subsystems/subsys-toolchain-hdc-guide.md#preparations) tool to connect to a debugging device. Then, run the following command to send the generated **libril\_vendor.z.so** library file to the **/system/lib/** directory of the device. For details about how to integrate a library file, see [Integrating Modem Vendor Libraries](#section590mcpsimp).
1. Use the [hdc\_std](../subsystems/subsys-toolchain-hdc-guide.md#how-to-obtain) tool to connect to a debugging device. Then, run the following command to send the generated **libril\_vendor.z.so** library file to the **/system/lib/** directory of the device. For details about how to integrate a library file, see [Integrating Modem Vendor Libraries](#integrating-modem-vendor-libraries).
```
hdc_std file send libril_vendor.z.so /system/lib/
......@@ -128,24 +128,24 @@ The following table describes the API for initializing a modem vendor library.
```
## Responding to Modem Service Requests<a name="section295mcpsimp"></a>
## Responding to Modem Service Requests
### When to Use<a name="section297mcpsimp"></a>
### When to Use
After receiving a specific telephony service request, RIL Adapter calls the target function pointer obtained in modem vendor library initialization to send a specific service request to the vendor library. Then, the vendor library processes the request based on the request ID.
### Available APIs<a name="section9503155219134"></a>
### Available APIs
The following table describes the APIs for responding to modem service requests, with the dial module as an example.
**Table 2** APIs for responding to modem service requests
| API | Description |
| API | Description |
| -------- | -------- |
| void&nbsp;ReqDial(ReqDataInfo&nbsp;\*requestInfo,&nbsp;const&nbsp;void&nbsp;\*data,&nbsp;size_t&nbsp;dataLen); | Processes number dial requests.<br>Input parameters:<br>**requestInfo**: request type<br/>**data**: called number<br/>**dataLen**: data length<br/>Return value: none |
| void&nbsp;(\*OnCallReport)(struct&nbsp;ReportInfo&nbsp;reportInfo,&nbsp;const&nbsp;void&nbsp;\*data,&nbsp;size_t&nbsp;dataLen); | Reports the execution result of a service request to RIL Adapter.<br>Input parameters:<br>**reportInfo**: request type<br/>**data**: called number<br/>**dataLen**: data length<br/>Return value: none |
| void&nbsp;ReqDial(ReqDataInfo&nbsp;\*requestInfo,&nbsp;const&nbsp;void&nbsp;\*data,&nbsp;size_t&nbsp;dataLen); | Processes number dial requests.<br>Input parameters:<br>**requestInfo**: request type<br/>**data**: called number<br/>**dataLen**: data length<br/>Return value: none |
| void&nbsp;(\*OnCallReport)(struct&nbsp;ReportInfo&nbsp;reportInfo,&nbsp;const&nbsp;void&nbsp;\*data,&nbsp;size_t&nbsp;dataLen); | Reports the execution result of a service request to RIL Adapter.<br>Input parameters:<br>**reportInfo**: request type<br/>**data**: called number<br/>**dataLen**: data length<br/>Return value: none |
### How to Develop<a name="section17190412101414"></a>
### How to Develop
1. Implement processing of dial requests in the **ReqDial\(\)** API.
......@@ -199,9 +199,9 @@ The following table describes the APIs for responding to modem service requests,
```
### Debugging and Verification<a name="section10207938171413"></a>
### Debugging and Verification
1. Use the [hdc\_std](../subsystems/subsys-toolchain-hdc-guide.md#preparations) tool to connect to a debugging device. Then, run the following command to send the generated **libril\_vendor.z.so** library file to the **/system/lib/** directory of the device.
1. Use the [hdc\_std](../subsystems/subsys-toolchain-hdc-guide.md#how-to-obtain) tool to connect to a debugging device. Then, run the following command to send the generated **libril\_vendor.z.so** library file to the **/system/lib/** directory of the device.
```
hdc_std file send libril_vendor.z.so /system/lib/
......@@ -242,23 +242,23 @@ The following table describes the APIs for responding to modem service requests,
```
## Reporting Modem Events<a name="section390mcpsimp"></a>
## Reporting Modem Events
### When to Use<a name="section401mcpsimp"></a>
### When to Use
A modem node thread reads the messages reported by the modem cyclically, parses the messages into specific events, and then reports the events to RIL Adapter.
### Available APIs<a name="section191193791518"></a>
### Available APIs
The following table describes the API for reporting modem events.
**Table 3** API for reporting modem events
| API | Description |
| API | Description |
| -------- | -------- |
| void&nbsp;OnNotifyOps(const&nbsp;char&nbsp;\*s,&nbsp;const&nbsp;char&nbsp;\*smsPdu) | Distributes the events reported by the modem.<br>Input parameters:<br/>**s**: AT command prefix<br/>**smsPdu**: PDU of the SMS message<br/>Return value: none |
| void&nbsp;OnNotifyOps(const&nbsp;char&nbsp;\*s,&nbsp;const&nbsp;char&nbsp;\*smsPdu) | Distributes the events reported by the modem.<br>Input parameters:<br/>**s**: AT command prefix<br/>**smsPdu**: PDU of the SMS message<br/>Return value: none |
### How to Develop<a name="section16394112401512"></a>
### How to Develop
1. Call **OnNotifyOps\(\)** in the g\_reader thread of the modem device node to parse reported modem events. On determining the command type, call **OnXxxReport\(\)** to report the parsed module events to the hril layer.
......@@ -290,7 +290,7 @@ The following table describes the API for reporting modem events.
```
1. Distribute the reported events from the **hril** layer to the Telephony Service layer.
2. Distribute the reported events from the **hril** layer to the Telephony Service layer.
```
// Report the call status proactively.
......@@ -316,9 +316,9 @@ The following table describes the API for reporting modem events.
```
### Debugging and Verification<a name="section16999174401516"></a>
### Debugging and Verification
1. Use the [hdc\_std](../subsystems/subsys-toolchain-hdc-guide.md#preparations) tool to connect to a debugging device. Then, run the following command to send the generated **libril\_vendor.z.so** library file to the **/system/lib/** directory of the device.
1. Use the [hdc\_std](../subsystems/subsys-toolchain-hdc-guide.md#how-to-obtain) tool to connect to a debugging device. Then, run the following command to send the generated **libril\_vendor.z.so** library file to the **/system/lib/** directory of the device.
```
hdc_std file send libril_vendor.z.so /system/lib/
......@@ -370,18 +370,18 @@ The following table describes the API for reporting modem events.
```
### Development Examples<a name="section33444350167"></a>
### Development Examples
- **Outgoing Call**
The following figure shows the API calling for an outgoing call.
**Figure 1** Time sequence of API calling for an outgoing call<a name="fig494mcpsimp"></a>
![](figure/en-us_image_0000001171507146.png)
When an application initiates an outgoing call, RIL Adapter receives a call request, and the **hril** layer invokes the **ReqDial\(\)** function. In **ReqDial\(\)**, the data passed by the Telephony Service is encapsulated as an AT command and sent to the modem. After executing the dial command, the modem reports the execution result to RIL Adapter through **OnCallReport\(\)**.
When an application initiates an outgoing call, RIL Adapter receives a call request, and the **hril** layer invokes the **ReqDial\(\)** function. In **ReqDial\(\)**, the data passed by the Telephony Service is encapsulated as an AT command and sent to the modem. After executing the dial command, the modem reports the execution result to RIL Adapter through **OnCallReport\(\)**.
```
// Callback function pointer of the call module
......@@ -456,13 +456,13 @@ The following table describes the API for reporting modem events.
The following figure shows the API calling of an incoming call.
**Figure 2** Time sequence of API calling for an incoming call<a name="fig556mcpsimp"></a>
![](figure/en-us_image_0000001214727595.png)
The **g\_reader** thread cyclically reads the messages reported by the modem. When the modem receives an incoming call event, it actively reports the information about the incoming call.
The **g\_reader** thread cyclically reads the messages reported by the modem. When the modem receives an incoming call event, it actively reports the information about the incoming call.
The **g\_reader** thread calls **OnNotifyOps\(\)** to parse the reported information. If the parsed data reported by the modem starts with characters such as **+CRING** or **RING**, it indicates that an incoming call event exists. In this case, the event is reported to RIL Adapter through **OnCallReport\(reportInfo, NULL, 0\)**.
The **g\_reader** thread calls **OnNotifyOps\(\)** to parse the reported information. If the parsed data reported by the modem starts with characters such as **+CRING** or **RING**, it indicates that an incoming call event exists. In this case, the event is reported to RIL Adapter through **OnCallReport\(reportInfo, NULL, 0\)**.
```
// Parse the data reported by the modem as events proactively reported by the corresponding module.
......@@ -492,11 +492,11 @@ The following table describes the API for reporting modem events.
```
## Integrating Modem Vendor Libraries<a name="section590mcpsimp"></a>
## Integrating Modem Vendor Libraries
### Configuring Compilation Information<a name="section592mcpsimp"></a>
### Configuring Compilation Information
Compile the modem vendor library into a dynamic library by using **BUILD.gn**. Upon startup, RIL Adapter loads the dynamic library to the system in dlopen mode and then initializes the library. For details about how to implement vendor library initialization, see [Initializing a Modem Vendor Library](#section211mcpsimp). The following is an example of **BUILD.gn**:
Compile the modem vendor library into a dynamic library by using **BUILD.gn**. Upon startup, RIL Adapter loads the dynamic library to the system in dlopen mode and then initializes the library. For details about how to implement vendor library initialization, see [Initializing a Modem Vendor Library](#initializing-a-modem-vendor-library). The following is an example of **BUILD.gn**:
```
import("//build/ohos.gni")
......@@ -523,7 +523,7 @@ ohos_shared_library("ril_vendor") { // Modem vendor library
}
```
### Debugging and Verification<a name="section620mcpsimp"></a>
### Debugging and Verification
1. Compile the code.
2. Check whether **libril\_vendor.z.so** exists in the **/out/{device_name}/telephony/ril\_adapter** directory. If yes, the integration is successful. Otherwise, correct the error and perform debugging and verification again.
......
......@@ -395,6 +395,7 @@
- [Doubly Linked List](kernel/kernel-small-apx-dll.md)
- [Bitwise Operation](kernel/kernel-small-apx-bitwise.md)
- [Standard Library](kernel/kernel-small-apx-library.md)
- [Kernel Coding Specification](kernel/kernel-mini-appx-code.md)
- Kernel for Standard Systems
- [Linux Kernel Overview](kernel/kernel-standard-overview.md)
- [Applying Patches on OpenHarmony Development Boards](kernel/kernel-standard-patch.md)
......@@ -450,6 +451,7 @@
- Peripheral Driver Usage
- [Audio](driver/driver-peripherals-audio-des.md)
- [Camera](driver/driver-peripherals-camera-des.md)
- [Codec](driver/driver-peripherals-codec-des.md)
- [Facial Authentication](driver/driver-peripherals-face_auth-des.md)
- [Fingerprint Authentication](driver/driver-peripherals-fingerprint_auth-des.md)
- [LCD](driver/driver-peripherals-lcd-des.md)
......@@ -502,21 +504,7 @@
- [Utils Overview](subsystems/subsys-utils-overview.md)
- [Utils Development](subsystems/subsys-utils-guide.md)
- [Utils FAQ](subsystems/subsys-utils-faqs.md)
- AI Framework
- [AI Engine Framework](subsystems/subsys-aiframework-guide.md)
- [Development Environment](subsystems/subsys-aiframework-envbuild.md)
- Technical Specifications
- [Code Management](subsystems/subsys-aiframework-tech-codemanage.md)
- [Naming](subsystems/subsys-aiframework-tech-name.md)
- [API Development](subsystems/subsys-aiframework-tech-interface.md)
- Development Guidelines
- [SDK](subsystems/subsys-aiframework-devguide-sdk.md)
- [Plug-in](subsystems/subsys-aiframework-devguide-plugin.md)
- [Configuration File](subsystems/subsys-aiframework-devguide-conf.md)
- Development Examples
- [KWS SDK](subsystems/subsys-aiframework-demo-sdk.md)
- [KWS Plug-in](subsystems/subsys-aiframework-demo-plugin.md)
- [KWS Configuration File](subsystems/subsys-aiframework-demo-conf.md)
- [AI Framework Development](subsystems/subsys-ai-aiframework-devguide.md)
- Data Management
- RDB
- [RDB Overview](subsystems/subsys-data-relational-database-overview.md)
......@@ -547,7 +535,7 @@
- [Development on Application Permission Management](subsystems/subsys-security-rightmanagement.md)
- [Development on IPC Authentication](subsystems/subsys-security-communicationverify.md)
- [Development on Device Security Level Management](subsystems/subsys-security-devicesecuritylevel.md)
- [Development on HUKS](subsystems/subsys-security-huks-guide.md)
- Startup
- [Startup](subsystems/subsys-boot-overview.md)
- init Module
......@@ -561,11 +549,11 @@
- [bootstrap Module](subsystems/subsys-boot-bootstrap.md)
- [FAQs](subsystems/subsys-boot-faqs.md)
- [Reference](subsystems/subsys-boot-ref.md)
- DFX
- DFX
- [DFX](subsystems/subsys-dfx-overview.md)
- [HiLog Development](subsystems/subsys-dfx-hilog-rich.md)
- [HiLog\_Lite Development](subsystems/subsys-dfx-hilog-lite.md)
- [HiTrace Development](subsystems/subsys-dfx-hitrace.md)
- [HiTraceChain Development](subsystems/subsys-dfx-hitracechain.md)
- [HiCollie Development](subsystems/subsys-dfx-hicollie.md)
- HiSysEvent Development
- [HiSysEvent Logging Configuration](subsystems/subsys-dfx-hisysevent-logging-config.md)
......@@ -577,7 +565,7 @@
- [HiChecker Development](subsystems/subsys-dfx-hichecker.md)
- [FaultLogger Development](subsystems/subsys-dfx-faultlogger.md)
- [Hiview Development](subsystems/subsys-dfx-hiview.md)
- Featured Topics
- HPM Part
- [HPM Part Overview](hpm-part/hpm-part-about.md)
......@@ -592,13 +580,6 @@
- WLAN-connected Products
- [LED Peripheral Control](guide/device-wlan-led-control.md)
- [Third-Party SDK Integration](guide/device-wlan-sdk.md)
- Cameras Without a Screen
- Camera Control
- [Overview](guide/device-iotcamera-control-overview.md)
- Development Guidelines
- [Photographing](guide/device-iotcamera-control-demo-photodevguide.md)
- [Video Recording](guide/device-iotcamera-control-demo-videodevguide.md)
- [Use Case](guide/device-iotcamera-control-example.md)
- Cameras with a Screen
- Screen and Camera Control
- [Overview](guide/device-camera-control-overview.md)
......@@ -643,11 +624,7 @@
- [Kernel](faqs/faqs-kernel.md)
- [Porting](faqs/faqs-porting.md)
- [Startup](faqs/faqs-startup.md)
- [System Applications](faqs/faqs-system-applications.md)
- [System Applications](faqs/faqs-system-applications.md)
......
# AI<a name="EN-US_TOPIC_0000001087226912"></a>
# AI
## Introduction<a name="section187321516154516"></a>
## Introduction
The AI subsystem is the part of OpenHarmony that provides native distributed AI capabilities. At the heart of the subsystem is a unified AI engine framework, which implements quick integration of AI algorithm plug-ins. The framework consists of the plug-in management, module management, and communication management modules, fulfilling lifecycle management and on-demand deployment of AI algorithms. Under this framework, AI algorithm APIs will be standardized to facilitate distributed calling of AI capabilities. In addition, unified inference APIs will be provided to adapt to different inference framework hierarchies.
**Figure 1** AI engine framework<a name="fig17296164711526"></a>
![](figures/ai-engine-framework.png "ai-engine-framework")
## Directory Structure<a name="section571610913453"></a>
## Directory Structure
```
/foundation/ai/engine # Home directory of the AI subsystem
......@@ -32,7 +32,7 @@ The AI subsystem is the part of OpenHarmony that provides native distributed AI
│ │ └── server_executor # Executor of the server module
```
## Constraints<a name="section5748426453"></a>
## Constraints
* **Programming language**: C/C++
......@@ -40,7 +40,7 @@ The AI subsystem is the part of OpenHarmony that provides native distributed AI
* **Others**: The System Ability Manager \(Samgr\) has been started and is running properly.
## Usage<a name="section6370123616447"></a>
## Usage
1. Compile the AI subsystem.
......@@ -406,7 +406,7 @@ The AI subsystem is the part of OpenHarmony that provides native distributed AI
```
## Repositories Involved<a name="section10492183517430"></a>
## Repositories Involved
[AI subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/ai.md)
......@@ -420,8 +420,8 @@ Dependency repositories:
[startup\_init\_lite](https://gitee.com/openharmony/startup_init_lite/blob/master/README.md)
## Reference<a name="section6808423133718"></a>
## Reference
[AI Engine Framework Development Guide](https://gitee.com/openharmony/docs/blob/master/en/device-dev/subsystems/subsys-aiframework-guide.md)
[AI Framework Development](https://gitee.com/openharmony/docs/blob/master/en/device-dev/subsystems/subsys-ai-aiframework-devguide.md)
# Startup<a name="EN-US_TOPIC_0000001124561621"></a>
# Startup
## Introduction<a name="section11660541593"></a>
## Introduction
The startup subsystem is responsible for starting key system processes and services after the kernel is started and before applications are started. The subsystem consists of the following modules:
......@@ -8,7 +8,7 @@ The startup subsystem is responsible for starting key system processes and servi
This module can be used on platforms powered by LiteOS Cortex-A or Linux kernel.
The module starts system service processes from the time the kernel loads the first user-space process to the time the first application is started. In addition to loading key system processes, it needs to configure their permissions during the startup and keep the specified process alive after sub-processes are started. If a key process exits abnormally, the module needs to perform a system restart. For details, see [init Module](../device-dev/subsystems/subsys-boot-init.md).
The module starts system service processes from the time the kernel loads the first user-space process to the time the first application is started. In addition to loading key system processes, it needs to configure their permissions during the startup and keep the specified process alive after sub-processes are started. If a key process exits abnormally, the module needs to perform a system restart. For details, see [init Module](../device-dev/subsystems/subsys-boot-init-cfg.md).
- appspawn
......@@ -27,58 +27,22 @@ The startup subsystem is responsible for starting key system processes and servi
This module obtains and sets system attributes.
The module can be used on all platforms. Supported system attributes consist of default, OEM-specified, and custom system attributes. OEM-specified system attributes provide only default values. The specific values need to be adjusted as required. For details, see [syspara Module](../device-dev/subsystems/subsys-boot-syspara.md).
The module can be used on all platforms. Supported system attributes consist of default, OEM-specified, and custom system attributes. OEM-specified system attributes provide only default values. The specific values need to be adjusted as required. For details, see [syspara Module](../device-dev/subsystems/subsys-boot-init-sysparam.md).
## Directory Structure<a name="section161941989596"></a>
## Directory Structure
**Table 1** Directory structure of the source code for the startup subsystem
<a name="table2977131081412"></a>
<table><thead align="left"><tr id="row7977610131417"><th class="cellrowborder" valign="top" width="20.880000000000003%" id="mcps1.2.4.1.1"><p id="p18792459121314"><a name="p18792459121314"></a><a name="p18792459121314"></a>Directory</p>
</th>
<th class="cellrowborder" valign="top" width="65.2%" id="mcps1.2.4.1.2"><p id="p77921459191317"><a name="p77921459191317"></a><a name="p77921459191317"></a>Description</p>
</th>
<th class="cellrowborder" valign="top" width="13.919999999999998%" id="mcps1.2.4.1.3"><p id="p101617019356"><a name="p101617019356"></a><a name="p101617019356"></a>Applicable Platform</p>
</th>
</tr>
</thead>
<tbody><tr id="row17977171010144"><td class="cellrowborder" valign="top" width="20.880000000000003%" headers="mcps1.2.4.1.1 "><p id="p2793159171311"><a name="p2793159171311"></a><a name="p2793159171311"></a>base/startup/appspawn_lite</p>
</td>
<td class="cellrowborder" valign="top" width="65.2%" headers="mcps1.2.4.1.2 "><p id="p879375920132"><a name="p879375920132"></a><a name="p879375920132"></a>appspawn module of the Lite edition for spawning application processes. It receives Ability Manager Service (AMS) messages via IPC, parses the messages, starts application processes based on the parsing result, and grants permissions to them.</p>
</td>
<td class="cellrowborder" valign="top" width="13.919999999999998%" headers="mcps1.2.4.1.3 ">Platforms using the LiteOS Cortex-A kernel
</td>
</tr>
<tr id="row17977171010144"><td class="cellrowborder" valign="top" width="20.880000000000003%" headers="mcps1.2.4.1.1 "><p id="p2793159171311"><a name="p2793159171311"></a><a name="p2793159171311"></a>base/startup/appspawn_standard</p>
</td>
<td class="cellrowborder" valign="top" width="65.2%" headers="mcps1.2.4.1.2 "><p id="p879375920132"><a name="p879375920132"></a><a name="p879375920132"></a>appspawn module of the Standard version for spawning application processes. It receives Ability Manager Service (AMS) messages via IPC, parses the messages, starts application processes based on the parsing result, and grants permissions to them.</p>
</td>
<td class="cellrowborder" valign="top" width="13.919999999999998%" headers="mcps1.2.4.1.3 ">Platforms using the Linux kernel
</td>
</tr>
<tr id="row6978161091412"><td class="cellrowborder" valign="top" width="20.880000000000003%" headers="mcps1.2.4.1.1 "><p id="p37931659101311"><a name="p37931659101311"></a><a name="p37931659101311"></a>base/startup/bootstrap_lite</p>
</td>
<td class="cellrowborder" valign="top" width="65.2%" headers="mcps1.2.4.1.2 "><p id="p6793059171318"><a name="p6793059171318"></a><a name="p6793059171318"></a>bootstrap module for starting all services except core system services.</p>
</td>
<td class="cellrowborder" valign="top" width="13.919999999999998%" headers="mcps1.2.4.1.3 ">Platforms using the LiteOS Cortex-M kernel
</td>
</tr>
<tr id="row6978201031415"><td class="cellrowborder" align="left" valign="top" width="20.880000000000003%" headers="mcps1.2.4.1.1 "><p id="p117935599130"><a name="p117935599130"></a><a name="p117935599130"></a>base/startup/init_lite</p>
</td>
<td class="cellrowborder" valign="top" width="65.2%" headers="mcps1.2.4.1.2 "><p id="p0793185971316"><a name="p0793185971316"></a><a name="p0793185971316"></a>init_lite module for implementing the init process, which is the first user-space process loaded after the kernel is initialized. Upon startup, the process parses the configuration file in **/etc/init.cfg**. Based on the parsing result, the process then starts other key system processes and grants required permissions to them.</p>
</td>
<td class="cellrowborder" valign="top" width="13.919999999999998%" headers="mcps1.2.4.1.3 ">Platforms using the LiteOS Cortex-A or Linux kernel</td>
</tr>
<tr id="row1897841071415"><td class="cellrowborder" valign="top" width="20.880000000000003%" headers="mcps1.2.4.1.1 "><p id="p469782418557"><a name="p469782418557"></a><a name="p469782418557"></a>base/startup/syspara_lite</p>
</td>
<td class="cellrowborder" valign="top" width="65.2%" headers="mcps1.2.4.1.2 "><p id="p15697102412558"><a name="p15697102412558"></a><a name="p15697102412558"></a>syspara module that provides APIs to obtain device information, including the product name, brand name, category name, and manufacturer name.</p>
</td>
<td class="cellrowborder" valign="top" width="13.919999999999998%" headers="mcps1.2.4.1.3 ">All platforms</td>
</tr>
</tbody>
</table>
| Directory | Description | Applicable Platform |
| ------------------------------ | ------------------------------------------------------------ | --------------------------------------------------- |
| base/startup/appspawn_lite | appspawn module of the Lite edition for spawning application processes. It receives Ability Manager Service (AMS) messages via IPC, parses the messages, starts application processes based on the parsing result, and grants permissions to them. | Platforms using the LiteOS Cortex-A kernel |
| base/startup/appspawn_standard | appspawn module of the Standard version for spawning application processes. It receives Ability Manager Service (AMS) messages via IPC, parses the messages, starts application processes based on the parsing result, and grants permissions to them. | Platforms using the Linux kernel |
| base/startup/bootstrap_lite | bootstrap module for starting all services except core system services. | Platforms using the LiteOS Cortex-M kernel |
| base/startup/init_lite | init_lite module for implementing the init process, which is the first user-space process loaded after the kernel is initialized. Upon startup, the process parses the configuration file in **/etc/init.cfg**. Based on the parsing result, the process then starts other key system processes and grants required permissions to them. | Platforms using the LiteOS Cortex-A or Linux kernel |
| base/startup/syspara_lite | syspara module that provides APIs to obtain device information, including the product name, brand name, category name, and manufacturer name. | All platforms |
```
......@@ -111,7 +75,7 @@ base/startup/
└── simulator # Simulator adaptation
```
## Repositories Involved<a name="section1371113476307"></a>
## Repositories Involved
[Startup subsystem](../device-dev/subsystems/subsys-boot-overview.md)
......@@ -123,4 +87,4 @@ base/startup/
[startup_init_lite](https://gitee.com/openharmony/startup_init_lite)
[startup\_syspara\_lite](https://gitee.com/openharmony/startup_syspara_lite)
[startup\_syspara\_lite](https://gitee.com/openharmony/startup_syspara_lite)
\ No newline at end of file
......@@ -77,7 +77,7 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| -------- | -------- |
| [I4AJEN](https://gitee.com/openharmony/third_party_freetype/issues/I4AJEN) | Fixed the CVE-2020-15999 security vulnerability of the third_party_freetype component.|
| [I4AJ6T](https://gitee.com/openharmony/third_party_mbedtls/issues/I4AJ6T) | Fixed the CVE-2020-36475 and CVE-2020-36478 security vulnerabilities of the third_party_mbedtls component.|
| [I4AIYJ](https://gitee.com/openharmony/device_hisilicon_third_party_uboot/issues/I4AIYJ?from=project-issue) | Fixed the CVE-2021-27138 and CVE-2021-27097 security vulnerabilities of the third_party_uboot component.|
| I4AIYJ | Fixed the CVE-2021-27138 and CVE-2021-27097 security vulnerabilities of the third_party_uboot component.|
| [I4HUM6](https://gitee.com/openharmony/third_party_lwip/issues/I4HUM6?from=project-issue) | Fixed the CVE-2020-22284 security vulnerability of the third_party_lwip component.|
| I4QTVZ | Fixed the CVE-2021-44732 and CVE-2021-45450 security vulnerabilities of the third_party_mbedtls component.|
| [I46RRM](https://gitee.com/openharmony/third_party_wpa_supplicant/issues/I46RRM?from=project-issue) | Fixed copying of secondary device types for the P2P group client.|
......
......@@ -179,6 +179,6 @@ Table 5 Issues resolved for the standard system
| [I48IM7](https://gitee.com/openharmony/hiviewdfx_hilog/issues/I48IM7) | During the hilog pressure test, **hilogd** restarts unexpectedly, and the **hilog** command cannot be used.| In the pressure test, there is a low probability that the log output is abnormal. The log output is normal in the commissioning scenario.| October 30|
| I48YPH | [DSoftBus - Networking] During the testing of the getting-offline - discovery - networking cycle, there are 3 failures among all the 110 attempts.| There is a low probability that this issue occurs. If a networking failure occurs, initiate the networking again.| October 30|
| [I4BVVW](https://gitee.com/openharmony/communication_dsoftbus/issues/I4BVVW) | [DSoftBus - Networking] The success rate of self-networking between a standard-system device and mobile phone is 97%.| There is a low probability that the networking fails.| October 30|
| [I4BXWY](https://gitee.com/openharmony/multimedia_media_standard/issues/I4BXWY) | For Hi3516, noises occur during playback of an audio recording.| This issue occurs only when this development board is used.| October 30|
| [I4BXY1](https://gitee.com/openharmony/multimedia_camera_standard/issues/I4BXY1) | There is no sound in the first few seconds of a video recording, the sound and image are out of sync, frame freezing occurs, and noises occur when the audio source was far away during recording.| This issue occurs only when this development board is used.| October 30|
| I4BXWY | For Hi3516, noises occur during playback of an audio recording.| This issue occurs only when this development board is used.| October 30|
| I4BXY1 | There is no sound in the first few seconds of a video recording, the sound and image are out of sync, frame freezing occurs, and noises occur when the audio source was far away during recording.| This issue occurs only when this development board is used.| October 30|
| [3ZJ1D](https://gitee.com/openharmony/kernel_liteos_a/issues/I3ZJ1D) | There is a possibility that the user mode fails in the XTS pressure test of the permission case.| There is a low probability that the UID of a child process fails to be set in the XTS pressure test scenario where child processes are repeatedly created.| October 30|
......@@ -83,27 +83,27 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| [I4BJFU](https://gitee.com/openharmony/kernel_liteos_a/issues/I4BJFU) | An error occurs when the dyload_posix module removes a file.|
| [I42N33](https://gitee.com/openharmony/third_party_mksh/issues/I42N33) | During the integration test, the Ctrl+C operation does not function after the **cat** command is run. A device restart is required.|
| [I4C8BO](https://gitee.com/openharmony/docs/issues/I4C8BO?from=project-issue) | The basic functions of the media subsystem (on a mini- or small-system device) are abnormal when Hi3516D V300 or Hi3518E V300 is burnt and configured by following the instructions in the official website.|
| [I4BWKC](https://gitee.com/openharmony/drivers_framework/issues/I4BWKC) | The camera driver on the Hi3516D V300 board does not function properly in the pressure test.|
| [I4BW0G](https://gitee.com/openharmony/drivers_framework/issues/I4BW0G) | The **ResetDriver** interface of the Hi3516D V300 board fails to be called.|
| I4BWKC | The camera driver on the Hi3516D V300 board does not function properly in the pressure test.|
| I4BW0G | The **ResetDriver** interface of the Hi3516D V300 board fails to be called.|
| [I4C7ZK](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4C7ZK) | For Hi3516D V300, the resident memory of the small system exceeds the baseline.|
| [I434P1](https://gitee.com/openharmony/multimedia_camera_lite/issues/I434P1) | For Hi3518E V300, the resident memory exceeds the baseline.|
| [I48IM7](https://gitee.com/openharmony/hiviewdfx_hilog/issues/I48IM7) | During the HiLog pressure test, the hilogd restarts unexpectedly, and the hilog commands cannot be used.|
| [I4EGMD](https://gitee.com/openharmony/aafwk_aafwk_lite/issues/I4EGMD) | The serialization and deserialization methods of **Want** are defective.|
| I4EGMD | The serialization and deserialization methods of **Want** are defective.|
| [I4CED3](https://gitee.com/openharmony/account_os_account/issues/I4CED3) | The JS API returns both "err" and "data" in one message.|
| [I4BXZ1](https://gitee.com/openharmony/app_samples/issues/I4BXZ1) | The **\<Picker>** component does not respond to clicks.|
| [I4CMMH](https://gitee.com/openharmony/ace_ace_engine/issues/I4CMMH) | The display effect of the **\<Toggle>** component is abnormal.|
| [I4CE7D](https://gitee.com/openharmony/miscservices_inputmethod/issues/I4CE7D) | The response time of the edit box is inappropriate.|
| I4BXZ1 | The **\<Picker>** component does not respond to clicks.|
| I4CMMH | The display effect of the **\<Toggle>** component is abnormal.|
| I4CE7D | The response time of the edit box is inappropriate.|
| [I4HI4C](https://gitee.com/openharmony/ai_engine/issues/I4HI4C) | There is a failed item of the TDD test on a small-system device. This failure is caused by the inappropriate test case comparison time range.|
| [I4EUOW](https://gitee.com/openharmony/ai_engine/issues/I4EUOW) | The number of case execution threads is inappropriate.|
| [I4HTFS](https://gitee.com/openharmony/appexecfwk_appexecfwk_lite/issues/I4HTFS) | BMS adaptation for the mini system is not supported.|
| I4HTFS | BMS adaptation for the mini system is not supported.|
| [I4C3BE](https://gitee.com/openharmony/communication_dsoftbus/issues/I4C3BE) | During passive Bluetooth Low Energy (BLE) discovery, the Bluetooth advertisement is frequently updated and, when the Bluetooth resources are used up, automatically disabled.|
| [I4I7QL](https://gitee.com/openharmony/developtools_packing_tool/issues/I4I7QL) | Packing fails when an ability has two widgets.|
| [I4BW0G](https://gitee.com/openharmony/drivers_framework/issues/I4BW0G) | There is a possibility that the Wi-Fi **ResetDriver** interface fails to be called.|
| I4BW0G | There is a possibility that the Wi-Fi **ResetDriver** interface fails to be called.|
| [I4GBB6](https://gitee.com/openharmony/device_qemu/issues/I4GBB6) | The RISC-V QEMU emulator fails to run.|
| [I4CE7E](https://gitee.com/openharmony/kernel_liteos_a/issues/I4CE7E) | **drivers/mtd/multi_partition/** in the LiteOS-A kernel is implemented by using the driver functions in **device/hisilicon**.|
| [I4JBEH](https://gitee.com/openharmony/drivers_framework/issues/I4JBEH) | Memory leakage occurs when the DMA transmission interface of HDF is repeatedly used.|
| [I4IGQ0](https://gitee.com/openharmony/drivers_framework/issues/I4IGQ0) | Resources are released after component detection fails.|
| [I4JPCG](https://gitee.com/openharmony/drivers_framework/issues/I4JPCG) | The PWM backlight cannot be set to 0.|
| I4JBEH | Memory leakage occurs when the DMA transmission interface of HDF is repeatedly used.|
| I4IGQ0 | Resources are released after component detection fails.|
| I4JPCG | The PWM backlight cannot be set to 0.|
| [I4ERM4](https://gitee.com/openharmony/drivers_peripheral/issues/I4ERM4) | A test case fails to be displayed.|
| [I4CMUY](https://gitee.com/openharmony/drivers_adapter_khdf_linux/issues/I4CMUY) | The hdf\_peripheral\_wlan\_test\_performance.bin test suite fails to run.|
| [I4FIP2](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FIP2) | The **ioctl** function of the LiteOS_A kernel does not support the **SIOCGIFBRDADDR** option.|
......@@ -118,7 +118,7 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| [I4C5RW](https://gitee.com/openharmony/kernel_liteos_m/issues/I4C5RW) | The error indicating that the **OS_TASK_STACK_PROTECT_SIZE** macro is not defined occurs when the MPU is enabled to protect the task stack.|
| [I4G4VK](https://gitee.com/openharmony/kernel_liteos_m/issues/I4G4VK) | Some macros are inappropriate. If they (for example, **inet_addr**) are changed to functions, the lwIP header file is not required for external calling.|
| [I4FVGV](https://gitee.com/openharmony/kernel_liteos_m/issues/I4FVGV) | The default lwIP configuration of the LiteOS_M kernel is inappropriate.|
| [I4CE7D](https://gitee.com/openharmony/miscservices_inputmethod/issues/I4CE7D) | There is no necessary to start the input method after a 3-second delay.|
| I4CE7D | There is no necessary to start the input method after a 3-second delay.|
| [I4CFOO](https://gitee.com/openharmony/multimedia_media_lite/issues/I4CFOO) | After an application running on the Linux system records videos for multiple times, the size of the last recording file is 0 when the system is restarted without exiting the application.|
| [I4CLGW](https://gitee.com/openharmony/kernel_liteos_a/issues/I4CLGW) | The page cache is inappropriate.|
| [I4HKQ2](https://gitee.com/openharmony/vendor_hisilicon/issues/I4HKQ2) | The mechanism for the LiteOS running on a mini-system board to obtain the UDID is inappropriate.|
......@@ -132,24 +132,24 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| [I4BX4J](https://gitee.com/openharmony/hiviewdfx_hicollie/issues/I4BX4J?from=project-issue) | The Hi3516D V300 board fails to call the **hicollie** interface.|
| [I4BX1X](https://gitee.com/openharmony/hiviewdfx_hitrace/issues/I4BX1X?from=project-issue) | The Hi3516D V300 board fails to call the **hitrace** interface.|
| [I4BVUL](https://gitee.com/openharmony/communication_wifi/issues/I4BVUL?from=project-issue) | When access points (APs) are changed, the success rate for networking between standard-system devices and mobile phones is 91%, lower than the expected value (98%).|
| [I4BW6E](https://gitee.com/openharmony/security_deviceauth/issues/I4BW6E) | During the test for networking between standard-system devices and mobile phones, when the mobile phone disables and enables the network access repeatedly for around 30 times, the networking fails.|
| I4BW6E | During the test for networking between standard-system devices and mobile phones, when the mobile phone disables and enables the network access repeatedly for around 30 times, the networking fails.|
| [I4BVVW](https://gitee.com/openharmony/communication_dsoftbus/issues/I4BVVW) | During the test for networking between standard-system devices and mobile phones, when the Wi-Fi switch is turned on and off repeatedly, the networking success rate is 97%, lower than the expected value.|
| [I48YPH](https://gitee.com/openharmony/security_deviceauth/issues/I48YPH?from=project-issue) | During the test for discovery and networking performance, 3 out of 110 networking attempts fails.|
| I48YPH | During the test for discovery and networking performance, 3 out of 110 networking attempts fails.|
| [I4492M](https://gitee.com/openharmony/communication_dsoftbus/issues/I4492M) | The offline device detection takes about 30s longer than the specifications.|
| [I44W7U](https://gitee.com/openharmony/graphic_standard/issues/I44W7U?from=project-issue) | The child window does not support zooming. As a result, the progress bar is hidden during video playback.|
| I44W7U | The child window does not support zooming. As a result, the progress bar is hidden during video playback.|
| [I480Z1](https://gitee.com/openharmony/communication_dsoftbus/issues/I480Z1?from=project-issue) | Softbus_server crashes when executing **socketfuzz**.|
| [I4BGLS](https://gitee.com/openharmony/security_deviceauth/issues/I4BGLS?from=project-issue) | The key imported by using `import_signed_auth_info_hilink` is used for identifying the HiChain connection. After the key is imported, it is encrypted and stored in the file and is not cleared from the heap after being returned.|
| I4BGLS | The key imported by using `import_signed_auth_info_hilink` is used for identifying the HiChain connection. After the key is imported, it is encrypted and stored in the file and is not cleared from the heap after being returned.|
| [I4A10Q](https://gitee.com/openharmony/startup_appspawn/issues/I4A10Q?from=project-issue) | The performance of Hi3516 3.0.0.6 static KPIs deteriorates severely.|
| [I4BXYT](https://gitee.com/openharmony/developtools_hdc_standard/issues/I4BXYT) | After device restart, developers must run the **hdc_std kill** command to discover the device again.|
| [I4KUTY](https://gitee.com/openharmony/ace_engine_lite/issues/I4KUTY) | There are invalid return values.|
| [I4DMFV](https://gitee.com/openharmony/ark_js_runtime/issues/I4DMFV) | The conversion from UTF-16 to UTF-8 is inappropriate.|
| I4BXYT | After device restart, developers must run the **hdc_std kill** command to discover the device again.|
| I4KUTY | There are invalid return values.|
| I4DMFV | The conversion from UTF-16 to UTF-8 is inappropriate.|
| [I4HGVM](https://gitee.com/openharmony/communication_dsoftbus/issues/I4HGVM) | The dependency on mbedTLS is missing for the standard system.|
| [I4DLV2](https://gitee.com/openharmony/drivers_framework/issues/I4DLV2) | An invalid memory access error occurs due to the HidInfo\* type.|
| I4DLV2 | An invalid memory access error occurs due to the HidInfo\* type.|
| [I4CIJJ](https://gitee.com/openharmony/third_party_flutter/issues/I4CIJJ) | ACE does not support GPU rendering.|
| [I4G31Z](https://gitee.com/openharmony/third_party_freetype/issues/I4G31Z) | An update for the font engine version from 2.10.1 to 2.10.4 is unavailable.|
| [I4H06M](https://gitee.com/openharmony/third_party_harfbuzz/issues/I4H06M) | An update for the OpenType text shaping engine from 2.6.1 to 2.8.1 is unavailable.|
| [I4FS7V](https://gitee.com/openharmony/third_party_lwip/issues/I4FS7V) | The **LWIP\_NETCONN\_FULLDUPLEX** macro is not used to control the initialization of **conn-&gt;mbox\_threads\_waiting**.|
| [I43KL7](https://gitee.com/openharmony/graphic_standard/issues/I43KL7) | The synthesizer does not support GPU synthesis.|
| I43KL7 | The synthesizer does not support GPU synthesis.|
## Known Issues
......@@ -164,4 +164,4 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| [I4OWWM](https://gitee.com/openharmony/xts_acts/issues/I4OWWM) | The JSON file corresponding to the WeekPluralNumbertest module is incorrectly configured. During case execution, the error message "required device does not exist" is displayed.| The JSON file configuration is incorrect. This issue does not affect functions.| 2022/01/15 |
| [I4MSVV](https://gitee.com/openharmony/xts_acts/issues/I4MSVV?from=project-issue) | During the XTS test on the standard system, there are three failed items of the HiCollieCppTest cases in the ActsHiCollieCppTest module.| The test suite name is changed. As a result, the test case with the text verification function fails. This issue does not affect functions.| 2022/01/15 |
| [I4MSWM](https://gitee.com/openharmony/xts_acts/issues/I4MSWM?from=project-issue) | During the XTS test on the standard system, there is one failed item for faultloggertest in the ActsFaultLoggerTest module.| The test suite name is changed. As a result, the test case with the text verification function fails. This issue does not affect functions.| 2022/01/15 |
| [I4NODO](https://gitee.com/openharmony/device_manager/issues/I4NODO) | During the test for the Hi3516 board running on a standard-system device, the E2E test of the distributed service hopping fails.| The DM component fails to repeatedly create a group. This issue affects the services that use hopping in the same way as that described in the issue details. Other services are not affected.| 2022/01/30 |
| I4NODO | During the test for the Hi3516 board running on a standard-system device, the E2E test of the distributed service hopping fails.| The DM component fails to repeatedly create a group. This issue affects the services that use hopping in the same way as that described in the issue details. Other services are not affected.| 2022/01/30 |
......@@ -85,7 +85,7 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| [I4V2DN](https://gitee.com/openharmony/xts_acts/issues/I4V2DN?from=project-issue) | The execution of two test cases times out during the ActsLwipTest module test.|
| [I4V3KC](https://gitee.com/openharmony/xts_acts/issues/I4V3KC?from=project-issue) | The test case testPublish0010 fails in the Distributed Scheduler.|
| [I4URGA](https://gitee.com/openharmony/applications_sample_camera/issues/I4URGA?from=project-issue) | A blue screen may appear when users search for WLAN signals on the **Settings** page.|
| [I4SDCK](https://gitee.com/openharmony/aafwk_aafwk_lite/issues/I4SDCK?from=project-issue) | An empty path or garbled characters are returned when users run **GetSrcPath** or **GetDataPath** on the Hi3516 development board of a small-system device.|
| I4SDCK | An empty path or garbled characters are returned when users run **GetSrcPath** or **GetDataPath** on the Hi3516 development board of a small-system device.|
| [I4T6KZ](https://gitee.com/openharmony/communication_dsoftbus/issues/I4T6KZ) | The execution of **SendMessage** and **SendData4Data** fails during the transmission test.|
| I4UOUS | Plaintext passwords are printed in the logs of the serial port interface on the Hi3516 development board of a small-system device.|
| [I4OWZO](https://gitee.com/openharmony/third_party_toybox/issues/I4OWZO) | An error message is displayed when the **toybox mv** command is run to move a file in the NFS path.|
......@@ -97,7 +97,7 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| [I4R4D3](https://gitee.com/openharmony/kernel_liteos_m/issues/I4R4D3) | The **detach** attribute is not set for the thread created by **pthread_create**. After the thread proactively exits and **OsGetAllTskInfo** is invoked, the related task name contains garbled characters.|
| [I4R4A5](https://gitee.com/openharmony/kernel_liteos_m/issues/I4R4A5) | Compute overflow occurs in the implementation of the **pthread_cond_timedwait** interface.|
| [I4QJT4](https://gitee.com/openharmony/drivers_adapter_khdf_linux/issues/I4QJT4) | The UartRead test case fails.|
| [I4U1DM](https://gitee.com/openharmony/distributedschedule_samgr_lite/issues/I4U1DM) | No lock is added when the LFQUE_Pop function is invoked by the QUEUE_Popfunction of samgr, causing potential data competition.|
| I4U1DM | No lock is added when the LFQUE_Pop function is invoked by the QUEUE_Popfunction of samgr, causing potential data competition.|
**Table 4** Issues resolved for the standard system
......@@ -106,7 +106,7 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| [I4UJNU](https://gitee.com/openharmony/applications_settings/issues/I4UJNU) | The WLAN password is displayed in plaintext in the hilog when the WLAN is connected.|
| [I4MSWM](https://gitee.com/openharmony/xts_acts/issues/I4MSWM?from=project-issue) | During the XT test, there is one failed item in the faultloggertest case of the ActsFaultLoggerTest module.|
| [I4MSVV](https://gitee.com/openharmony/xts_acts/issues/I4MSVV?from=project-issue) | During the XTS test, there are three failed items in the HiCollieCppTest case of the ActsHiCollieCppTest module.|
| [I4PPXV](https://gitee.com/openharmony/appexecfwk_standard/issues/I4PPXV?from=project-issue) | The application icon is missing after a user opens an application, exits the application, and then returns to the home screen.|
| I4PPXV | The application icon is missing after a user opens an application, exits the application, and then returns to the home screen.|
| [I4OF9A](https://gitee.com/openharmony/distributeddatamgr_file/issues/I4OF9A?from=project-issue) | The **text** value read by the **file.readText** interface is unstable.|
| [I4OWWM](https://gitee.com/openharmony/xts_acts/issues/I4OWWM) | The JSON file corresponding to the WeekPluralNumbertest module is incorrectly configured. When a test case is executed, "required device does not exist" is reported, and the test suite cannot be executed.|
| [I4OUVQ](https://gitee.com/openharmony/xts_tools/issues/I4OUVQ?from=project-issue) | During repeated pressure tests of XTS JS cases, the system stops responding and the test cannot continue.|
......
......@@ -10,12 +10,12 @@ OpenHarmony 3.0.3 LTS is a maintenance version of OpenHarmony 3.0 LTS. This vers
**Table 1** Version mapping of software and tools
| Software/Tool| Version| Remarks|
| Software/Tool| Version| Remarks|
| -------- | -------- | -------- |
| OpenHarmony | 3.0.3&nbsp;LTS | NA |
| SDK | 3.0.0.0(API&nbsp;Version&nbsp;7&nbsp;release) | NA |
| (Optional) HUAWEI&nbsp;DevEco&nbsp;Studio| 3.0&nbsp;Beta1 | Recommended for developing OpenHarmony applications|
| (Optional) HUAWEI&nbsp;DevEco&nbsp;Device&nbsp;Tool| 2.2&nbsp;Beta2 | Recommended for developing OpenHarmony smart devices|
| OpenHarmony | 3.0.3&nbsp;LTS | NA |
| SDK | 3.0.0.0(API&nbsp;Version&nbsp;7&nbsp;release) | NA |
| (Optional) HUAWEI&nbsp;DevEco&nbsp;Studio| 3.0&nbsp;Beta1 | Recommended for developing OpenHarmony applications|
| (Optional) HUAWEI&nbsp;DevEco&nbsp;Device&nbsp;Tool| 2.2&nbsp;Beta2 | Recommended for developing OpenHarmony smart devices|
## Source Code Acquisition
......@@ -25,7 +25,7 @@ OpenHarmony 3.0.3 LTS is a maintenance version of OpenHarmony 3.0 LTS. This vers
**Method 1 (recommended)**: Use the **repo** tool to download the source code over SSH. (You must have an SSH public key for access to Gitee.)
```
repo init -u git@gitee.com:openharmony/manifest.git -b refs/tags/OpenHarmony-v3.0.3-LTS --no-repo-verify
repo sync -c
......@@ -34,7 +34,7 @@ repo forall -c 'git lfs pull'
**Method 2**: Use the **repo** tool to download the source code over HTTPS.
```
repo init -u https://gitee.com/openharmony/manifest.git -b refs/tags/OpenHarmony-v3.0.3-LTS --no-repo-verify
repo sync -c
......@@ -46,13 +46,13 @@ repo forall -c 'git lfs pull'
**Table 2** Mirrors for acquiring source code
| LTS Code| Version| Mirror| SHA-256 Checksum|
| LTS Code| Version| Mirror| SHA-256 Checksum|
| -------- | -------- | -------- | -------- |
| Full code base (for mini, small, and standard systems)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/code-v3.0.3-LTS.tar.gz)| [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/code-v3.0.3-LTS.tar.gz.sha256)|
| Standard system Hi3516 solution (binary)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/standard.tar.gz) | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/standard.tar.gz.sha256) |
| Mini system Hi3861 solution (binary)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_pegasus.tar.gz) | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_pegasus.tar.gz.sha256) |
| Small system Hi3516 solution - LiteOS (binary)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_taurus.tar.gz) | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_taurus.tar.gz.sha256) |
| Small system Hi3516 solution - Linux (binary)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_taurus_linux.tar.gz) | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_taurus_linux.tar.gz.sha256) |
| Full code base (for mini, small, and standard systems)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/code-v3.0.3-LTS.tar.gz)| [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/code-v3.0.3-LTS.tar.gz.sha256)|
| Standard system Hi3516 solution (binary)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/standard.tar.gz) | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/standard.tar.gz.sha256) |
| Mini system Hi3861 solution (binary)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_pegasus.tar.gz) | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_pegasus.tar.gz.sha256) |
| Small system Hi3516 solution - LiteOS (binary)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_taurus.tar.gz) | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_taurus.tar.gz.sha256) |
| Small system Hi3516 solution - Linux (binary)| 3.0.3 | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_taurus_linux.tar.gz) | [Download](https://repo.huaweicloud.com/harmonyos/os/3.0.3/hispark_taurus_linux.tar.gz.sha256) |
## What's New
......@@ -79,32 +79,32 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
**Table 3** Resolved issues
| Issue No.| Description|
| Issue No.| Description|
| -------- | -------- |
| [I4TUSX](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4TUSX) | When the system camera is used to take a photo in the Hi3516D V300 development board running on a mini-system device, the two edges of the image are truncated.|
| [I4TYOP](https://gitee.com/openharmony/drivers_peripheral/issues/I4TYOP) | After a USB flash drive is inserted into the Hi3516D V300 development board running on a mini-system device, DMA times out and the USB flash drive is unavailable.|
| [I4SM0J](https://gitee.com/openharmony/third_party_harfbuzz/issues/I4SM0J) | The **third_party_harfbuzz** repository uses the CC BY-NC-SA-3.0 license, which restricts the commercial use of the content in the repository.|
| [I4WPQW](https://gitee.com/openharmony/device_hisilicon_hardware/issues/I4WPQW) | The **libdisplay_layer.so** binary file is not updated in the **device_hisilicon_hardware** repository.|
| [I4WIVF](https://gitee.com/openharmony/third_party_boost/issues/I4WIVF) | Some files in the **third_party_boost** repository are incompatible with open-source protocols.|
| [I4WRWM](https://gitee.com/openharmony/aafwk_aafwk_lite/issues/I4WRWM) | Some TDD test cases are unavailable in the **aafwk_aafwk_lite** repository.|
| [I4VPVY](https://gitee.com/openharmony/applications_sample_camera/issues/I4VPVY) | In the Hi3516D V300 development board running on a mini-system device, a user searches for Wi-Fi in **Settings** and touches the back button twice to return to the home screen. No application can be started from the home screen.|
| [I4UTY0](https://gitee.com/openharmony/applications_photos/issues/I4UTY0) | The HP copyright statement exists in the metadata of the **1.jpg** file in **demos**.|
| [I4TP6D](https://gitee.com/openharmony/xts_acts/issues/I4TP6D) | The ActsWorkerJSTest test suite newly added for the Hi3516 development board running on a standard-system device cannot be executed properly.|
| [I4TUSX](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4TUSX) | When the system camera is used to take a photo in the Hi3516D V300 development board running on a mini-system device, the two edges of the image are truncated.|
| [I4TYOP](https://gitee.com/openharmony/drivers_peripheral/issues/I4TYOP) | After a USB flash drive is inserted into the Hi3516D V300 development board running on a mini-system device, DMA times out and the USB flash drive is unavailable.|
| [I4SM0J](https://gitee.com/openharmony/third_party_harfbuzz/issues/I4SM0J) | The **third_party_harfbuzz** repository uses the CC BY-NC-SA-3.0 license, which restricts the commercial use of the content in the repository.|
| [I4WPQW](https://gitee.com/openharmony/device_hisilicon_hardware/issues/I4WPQW) | The **libdisplay_layer.so** binary file is not updated in the **device_hisilicon_hardware** repository.|
| [I4WIVF](https://gitee.com/openharmony/third_party_boost/issues/I4WIVF) | Some files in the **third_party_boost** repository are incompatible with open-source protocols.|
| I4WRWM | Some TDD test cases are unavailable in the **aafwk_aafwk_lite** repository.|
| [I4VPVY](https://gitee.com/openharmony/applications_sample_camera/issues/I4VPVY) | In the Hi3516D V300 development board running on a mini-system device, a user searches for Wi-Fi in **Settings** and touches the back button twice to return to the home screen. No application can be started from the home screen.|
| [I4UTY0](https://gitee.com/openharmony/applications_photos/issues/I4UTY0) | The HP copyright statement exists in the metadata of the **1.jpg** file in **demos**.|
| [I4TP6D](https://gitee.com/openharmony/xts_acts/issues/I4TP6D) | The ActsWorkerJSTest test suite newly added for the Hi3516 development board running on a standard-system device cannot be executed properly.|
**Table 4** Resolved security vulnerabilities
| Issue No.| Description|
| Issue No.| Description|
| -------- | -------- |
| I4U8VB | CVE-2021-3520 security vulnerability of the third_party_lz4 component.|
| I4UX33 | CVE-2021-22569 and CVE-2021-22570 security vulnerabilities of the third_party_protobuf component.|
| I4VRR7 | CVE-2022-23308 security vulnerability of the third_party_libxml2 component.|
| I4U8VB | CVE-2021-3520 security vulnerability of the third_party_lz4 component.|
| I4UX33 | CVE-2021-22569 and CVE-2021-22570 security vulnerabilities of the third_party_protobuf component.|
| I4VRR7 | CVE-2022-23308 security vulnerability of the third_party_libxml2 component.|
**Table 5** Known issues
| Issue No.| Description| Impact| To Be Resolved On|
| Issue No.| Description| Impact| To Be Resolved On|
| -------- | -------- | -------- | -------- |
| [I4YBB0](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4YBB0) | No image is generated and the recorded video cannot be played when the system camera is used to take a photo and record a video. This issue occurs only for the Hi3516D V300 development board running on a small-system device (Linux).| Camera recording does not function.| 2022/04/01 |
| [I4YB87](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4YB87) | No image is generated when the system camera is used to take a photo. This issue occurs only for the Hi3516D V300 development board running on a small-system device (Linux).| Camera photographing does not function.| 2022/04/01 |
| [I4YAGS](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4YAGS?from=project-issue) | A blue screen is displayed when the system camera is accessed. This issue occurs only for the Hi3516D V300 development board running on a small-system device (Linux).| Camera preview does not function.| 2022/04/01 |
| [I4WLBU](https://gitee.com/openharmony/developtools_hdc_standard/issues/I4WLBU?from=project-issue) | In the Hi3516D V300 development board running on a standard-system device, the device cannot be found after burning during the ACTS test, and the message "Device not founded or connected" is reported.| The HDC tool causes the ACTS test to report this error occasionally. The error does not affect the actual function.| 2022/04/10 |
| [I4YBB0](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4YBB0) | No image is generated and the recorded video cannot be played when the system camera is used to take a photo and record a video. This issue occurs only for the Hi3516D V300 development board running on a small-system device (Linux).| Camera recording does not function.| 2022/04/01 |
| [I4YB87](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4YB87) | No image is generated when the system camera is used to take a photo. This issue occurs only for the Hi3516D V300 development board running on a small-system device (Linux).| Camera photographing does not function.| 2022/04/01 |
| [I4YAGS](https://gitee.com/openharmony/multimedia_camera_lite/issues/I4YAGS?from=project-issue) | A blue screen is displayed when the system camera is accessed. This issue occurs only for the Hi3516D V300 development board running on a small-system device (Linux).| Camera preview does not function.| 2022/04/01 |
| I4WLBU | In the Hi3516D V300 development board running on a standard-system device, the device cannot be found after burning during the ACTS test, and the message "Device not founded or connected" is reported.| The HDC tool causes the ACTS test to report this error occasionally. The error does not affect the actual function.| 2022/04/10 |
......@@ -198,9 +198,9 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| Issue No.| Description|
| -------- | -------- |
| [I48IM7](https://gitee.com/openharmony/hiviewdfx_hilog/issues/I48IM7) | During the hilog pressure test, **hilogd** restarts unexpectedly, and the **hilog** command cannot be used.|
| [I48YPH](https://gitee.com/openharmony/security_deviceauth/issues/I48YPH) | [DSoftBus - Networking] During the testing of the getting-offline - discovery - networking cycle, there are 3 failures among all the 110 attempts.|
| I48YPH | [DSoftBus - Networking] During the testing of the getting-offline - discovery - networking cycle, there are 3 failures among all the 110 attempts.|
| [I4BVVW](https://gitee.com/openharmony/communication_dsoftbus/issues/I4BVVW) | [DSoftBus - Networking] The success rate of automatic networking between a standard-system device and mobile phone is 97%.|
| [I4BXY1](https://gitee.com/openharmony/multimedia_camera_standard/issues/I4BXY1) | There is no sound in the first few seconds of a video recording, the sound and image are out of sync, frame freezing occurs, and noises occur when the audio source was far away during recording.|
| I4BXY1 | There is no sound in the first few seconds of a video recording, the sound and image are out of sync, frame freezing occurs, and noises occur when the audio source was far away during recording.|
| [3ZJ1D](https://gitee.com/openharmony/kernel_liteos_a/issues/I3ZJ1D) | There is a possibility that the user mode fails in the XTS pressure test of the permission case.|
......@@ -212,7 +212,7 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| -------- | -------- | -------- | -------- |
| [I4NRS5](https://gitee.com/openharmony/kernel_linux_5.10/issues/I4NRS5) | [Kernel subsystem] A CVE vulnerability exists.| No patch has been released for the Linux kernel. The kernel will be updated after the patch is released in the community.| Depending on the patch release in the community|
| [I4MGJM](https://gitee.com/openharmony/drivers_peripheral/issues/I4MGJM) | [HDF/Camera] The case fails when the RK3568 board runs the camera HDI tests.| The photographing and preview functions are normal. The recording function can be started but cannot be stopped.| 2021/12/31 |
| [I4OECR](https://gitee.com/openharmony/ark_js_runtime/issues/I4OECR) | An Ark stack exception occurs during XTS running (low probability).| There is a low probability that the Ark stack becomes abnormal during the XTS pressure test. This issue occurs only once in 48 hours. The exception stack is reported only in the log and does not affect the functions.| 2022/01/05|
| I4OECR | An Ark stack exception occurs during XTS running (low probability).| There is a low probability that the Ark stack becomes abnormal during the XTS pressure test. This issue occurs only once in 48 hours. The exception stack is reported only in the log and does not affect the functions.| 2022/01/05|
| [I4OBTW](https://gitee.com/openharmony/ability_ability_runtime/issues/I4OBTW) | After all XTS cases are executed and the application is installed, aa start failures occur, affecting the OpenHarmony pipeline stability test.| During the XTS pressure test, when 100 application packages are installed in batches in a short period of time, 2 of them cannot be started. User experience is not affected.| 2022/01/05|
| [I4OLHF](https://gitee.com/openharmony/ark_js_runtime/issues/I4OLHF?from=project-issue) | [Ark subsystem] The test process is abnormal due to the com.amsst.amsMissionSnapshotTest process.| This issue occurs occasionally during high-pressure tests.| 2022/01/05|
| [I4OLUK](https://gitee.com/openharmony/ark_js_runtime/issues/I4OLUK) | [Ark subsystem] The process stack is abnormal due to the com.ohos.systemui process.| This issue occurs occasionally during high-pressure tests.| 2022/01/05|
| I4OLHF | [Ark subsystem] The test process is abnormal due to the com.amsst.amsMissionSnapshotTest process.| This issue occurs occasionally during high-pressure tests.| 2022/01/05|
| I4OLUK | [Ark subsystem] The process stack is abnormal due to the com.ohos.systemui process.| This issue occurs occasionally during high-pressure tests.| 2022/01/05|
......@@ -215,7 +215,7 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| ArkUI | [Drag](https://gitee.com/openharmony/app_samples/tree/master/ETSUI/Drag)| This sample shows the drag operation function.| eTS |
| ArkUI | [Animation](https://gitee.com/openharmony/app_samples/tree/master/ETSUI/ArkUIAnimation)| This sample demonstrates the effect of the **AnimatorProperty** and **Explicit Animation**.| eTS |
| Data management| [Querying the DDM Result Set](https://gitee.com/openharmony/app_samples/tree/master/data/DDMQuery)| This sample shows how to create a query object to query data in a key-value (KV) store and obtain the result set in distributed data management (DDM).| eTS |
| Data management| [eTS RDB](https://gitee.com/openharmony/app_samples/tree/master/data/Rdb)| This sample shows how to use a relational database (RDB) in eTS, including adding, deleting, modifying, and querying data.| eTS |
| Data management| [eTS RDB](https://gitee.com/openharmony/app_samples/tree/master/data/DistributedRdb) | This sample shows how to use a relational database (RDB) in eTS, including adding, deleting, modifying, and querying data.| eTS |
| Common event and notification| [Reminder Agent](https://gitee.com/openharmony/app_samples/tree/master/Notification/AlarmClock)| This sample shows how to use the reminder agent by simulating an alarm clock.| eTS |
| Common event and notification| [Event notification](https://gitee.com/openharmony/app_samples/tree/master/Notification/Emitter)| This sample shows the in-process event notification. After a user selects an offering and submits an order, the selected offering is displayed in the order list.| eTS |
| Connectivity| [RPC](https://gitee.com/openharmony/app_samples/tree/master/Communication/RPC)| This sample shows the data exchange between the frontend and backend of a device. After the offering and quantity are selected at the frontend, the backend calculates the result and displays it at the frontend.| eTS |
......@@ -248,10 +248,10 @@ For more information, visit [Samples](https://gitee.com/openharmony/app_samples)
| Issue No.| Description|
| -------- | -------- |
| [I4MGJM](https://gitee.com/openharmony/drivers_peripheral/issues/I4MGJM) | [HDF/Camera] The case fails when the RK3568 board runs the camera HDI tests.|
| [I4OECR](https://gitee.com/openharmony/ark_js_runtime/issues/I4OECR) | An Ark stack exception occurs during XTS running (low probability).|
| I4OECR | An Ark stack exception occurs during XTS running (low probability).|
| [I4OBTW](https://gitee.com/openharmony/ability_ability_runtime/issues/I4OBTW) | After all XTS cases are executed and the application is installed, aa start failures occur, affecting the pipeline stability test.|
| [I4OLHF](https://gitee.com/openharmony/ark_js_runtime/issues/I4OLHF?from=project-issue) | [ArkUI subsystem] The test process is abnormal due to the com.amsst.amsMissionSnapshotTest process.|
| [I4OLUK](https://gitee.com/openharmony/ark_js_runtime/issues/I4OLUK) | [ArkUI subsystem] The process stack is abnormal due to the com.ohos.systemui process.|
| I4OLHF | [ArkUI subsystem] The test process is abnormal due to the com.amsst.amsMissionSnapshotTest process.|
| I4OLUK | [ArkUI subsystem] The process stack is abnormal due to the com.ohos.systemui process.|
## Known Issues
......
......@@ -148,11 +148,11 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
**Table 4** Resolved issues
| Issue No. | Description |
| Issue No. | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| [I4UUFR](https://gitee.com/openharmony/third_party_e2fsprogs/issues/I4UUFR) | Local image compilation and build may fail for the Hi3516 development board. |
| [I4WDD3](https://gitee.com/openharmony/multimedia_camera_standard/issues/I4WDD3) | [RK3568] A recorded video cannot be viewed. |
| [I50EBB](https://gitee.com/openharmony/docs/issues/I50EBB) | [Hi3516 burning] Images of the Hi3516 development board on a standard-system device cannot be burnt by using DevEco Device Tool. |
| [I4UUFR](https://gitee.com/openharmony/third_party_e2fsprogs/issues/I4UUFR) | Local image compilation and build may fail for the Hi3516 development board. |
| I4WDD3 | [RK3568] A recorded video cannot be viewed. |
| [I50EBB](https://gitee.com/openharmony/docs/issues/I50EBB) | [Hi3516 burning] Images of the Hi3516 development board on a standard-system device cannot be burnt by using DevEco Device Tool. |
## Known Issues
......
......@@ -58,6 +58,8 @@ onBundleAdded(bundleName: string): void
**系统能力**:SystemCapability.Customization.EnterpriseDeviceManager
**系统API**: 此接口为系统接口。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -82,6 +84,8 @@ onBundleRemoved(bundleName: string): void
**系统能力**:SystemCapability.Customization.EnterpriseDeviceManager
**系统API**: 此接口为系统接口。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......
......@@ -11,7 +11,7 @@ GesturePath表示手势路径信息。
## 导入模块
```ts
import GesturePath from "@ohos.accessibility.GesturePath";
import GesturePath from '@ohos.accessibility.GesturePath';
```
## GesturePath
......@@ -43,7 +43,7 @@ constructor(durationTime: number);
**示例:**
```typescript
```ts
let durationTime = 20;
let gesturePath = new GesturePath(durationTime);
```
......@@ -11,7 +11,7 @@ GesturePoint表示手势触摸点。
## 导入模块
```ts
import GesturePoint from "@ohos.accessibility.GesturePoint";
import GesturePoint from '@ohos.accessibility.GesturePoint';
```
## GesturePoint
......@@ -44,7 +44,7 @@ constructor(positionX: number, positionY: number);
**示例:**
```typescript
```ts
let positionX = 1;
let positionY = 2;
let gesturePoint = new GesturePoint(positionX, positionY);
......
......@@ -8,8 +8,8 @@
## 导入模块
```typescript
import config from "@ohos.accessibility.config";
```ts
import config from '@ohos.accessibility.config';
```
## 属性
......@@ -27,171 +27,243 @@ import config from "@ohos.accessibility.config";
| mouseKey | [Config](#config)\<boolean>| 是 | 是 | 表示鼠标键功能启用状态。 |
| mouseAutoClick | [Config](#config)\<number>| 是 | 是 | 表示鼠标自动点击功能启用状态。取值 0~5000,单位为毫秒。 |
| shortkey | [Config](#config)\<boolean>| 是 | 是 | 表示辅助扩展快捷键功能启用状态。 |
| shortkeyTarget | [Config](#config)\<string>| 是 | 是 | 表示辅助扩展快捷键的目标配置。取值为辅助应用的名称,格式为:"bundleName/abilityName"。 |
| shortkeyTarget | [Config](#config)\<string>| 是 | 是 | 表示辅助扩展快捷键的目标配置。取值为辅助应用的名称,格式为:'bundleName/abilityName'。 |
| captions | [Config](#config)\<boolean>| 是 | 是 | 表示辅助字幕功能启用状态。 |
| captionsStyle | [Config](#config)\<[accessibility.CaptionsStyle](./js-apis-accessibility.md#captionsstyle8)>| 是 | 是 | 表示辅助字幕的配置。 |
| captionsStyle | [Config](#config)\<[CaptionsStyle](js-apis-accessibility.md#captionsstyle8)>| 是 | 是 | 表示辅助字幕的配置。 |
## enableAbility
enableAbility(name: string, capability: Array&lt;[accessibility.Capability](./js-apis-accessibility.md#capability)&gt;): Promise&lt;void&gt;;
enableAbility(name: string, capability: Array&lt;accessibility.Capability&gt;): Promise&lt;void&gt;;
启用辅助扩展。
启用辅助扩展,使用Promise异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 辅助应用的名称,格式为:"bundleName/abilityName"。 |
| capability | Array&lt;[accessibility.Capability](./js-apis-accessibility.md#capability)&gt;) | 是 | 辅助应用的能力属性。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 辅助应用的名称,格式为:'bundleName/abilityName'。 |
| capability | Array&lt;[accessibility.Capability](js-apis-accessibility.md#capability)&gt;) | 是 | 辅助应用的能力属性。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | Promise实例,用于返回方法执行结果。 |
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**错误码:**
以下错误码的详细介绍请参见[无障碍子系统错误码](../errorcodes/errorcode-accessibility.md)
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 9300001 | Invalid bundle name or ability name. |
| 9300002 | Target ability already enabled. |
**示例:**
```typescript
config.enableAbility("com.ohos.example/axExtension", ['retrieve'])
.then(() => {
console.info('enable succeed');
}).catch((error) => {
console.error('enable failed');
});
```ts
let name = 'com.ohos.example/axExtension';
let capability = ['retrieve'];
try {
config.enableAbility(name, capability).then(() => {
console.info('enable ability succeed');
}).catch((err) => {
console.error('failed to enable ability, because ' + JSON.stringify(err));
});
} catch (exception) {
console.error('failed to enable ability, because ' + JSON.stringify(exception));
};
```
## enableAbility
enableAbility(name: string, capability: Array&lt;[accessibility.Capability](./js-apis-accessibility.md#capability)&gt;, callback: AsyncCallback&lt;void&gt;): void;
enableAbility(name: string, capability: Array&lt;accessibility.Capability&gt;, callback: AsyncCallback&lt;void&gt;): void;
启用辅助扩展。
启用辅助扩展,使用callback异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 辅助应用的名称,格式为:"bundleName/abilityName"。 |
| capability | Array&lt;[accessibility.Capability](./js-apis-accessibility.md#capability)&gt; | 是 | 辅助应用的能力属性。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数,返回方法执行结果。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 辅助应用的名称,格式为:'bundleName/abilityName'。 |
| capability | Array&lt;[accessibility.Capability](js-apis-accessibility.md#capability)&gt; | 是 | 辅助应用的能力属性。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数。 |
**错误码:**
以下错误码的详细介绍请参见[无障碍子系统错误码](../errorcodes/errorcode-accessibility.md)。
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 9300001 | Invalid bundle name or ability name. |
| 9300002 | Target ability already enabled. |
**示例:**
```typescript
config.enableAbility("com.ohos.example/axExtension", ['retrieve'], (err, data) => {
if (err) {
console.error('enable failed');
return;
}
console.info('enable succeed');
})
```
```ts
let name = 'com.ohos.example/axExtension';
let capability = ['retrieve'];
try {
config.enableAbility(name, capability, (err, data) => {
if (err) {
console.error('failed to enable ability, because ' + JSON.stringify(err));
return;
}
console.info('enable ability succeed');
});
} catch (exception) {
console.error('failed to enable ability, because ' + JSON.stringify(exception));
};
```
## disableAbility
disableAbility(name: string): Promise&lt;void&gt;;
关闭辅助扩展。
关闭辅助扩展,使用Promise异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 辅助应用的名称,格式为:"bundleName/abilityName"。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 辅助应用的名称,格式为:'bundleName/abilityName'。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | Promise实例,用于返回方法执行结果。 |
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**错误码:**
以下错误码的详细介绍请参见[无障碍子系统错误码](../errorcodes/errorcode-accessibility.md)。
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 9300001 | Invalid bundle name or ability name. |
**示例:**
```typescript
config.disableAbility("com.ohos.example/axExtension")
.then(() => {
console.info('disable succeed');
}).catch((error) => {
console.error('disable failed');
});
```
```ts
let name = 'com.ohos.example/axExtension';
try {
config.enableAbility(name).then(() => {
console.info('disable ability succeed');
}).catch((err) => {
console.error('failed to disable ability, because ' + JSON.stringify(err));
});
} catch (exception) {
console.error('failed to disable ability, because ' + JSON.stringify(exception));
};
```
## disableAbility
disableAbility(name: string, callback: AsyncCallback&lt;void&gt;): void;
关闭辅助扩展。
关闭辅助扩展,使用callback异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 辅助应用的名称,格式为:"bundleName/abilityName"。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数,返回方法执行结果。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 辅助应用的名称,格式为:'bundleName/abilityName'。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数。 |
**错误码:**
以下错误码的详细介绍请参见[无障碍子系统错误码](../errorcodes/errorcode-accessibility.md)。
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 9300001 | Invalid bundle name or ability name. |
**示例:**
```typescript
config.disableAbility("com.ohos.example/axExtension", (err, data) => {
if (err) {
console.error('disable failed');
return;
}
console.info('disable succeed');
})
```
```ts
let name = 'com.ohos.example/axExtension';
try {
config.disableAbility(name, (err, data) => {
if (err) {
console.error('failed to enable ability, because ' + JSON.stringify(err));
return;
}
console.info('disable succeed');
});
} catch (exception) {
console.error('failed to enable ability, because ' + JSON.stringify(exception));
};
```
## on('enableAbilityListsStateChanged')
## on('enabledAccessibilityExtensionListChange')
on(type: 'enableAbilityListsStateChanged', callback: Callback&lt;void&gt;): void;
on(type: 'enabledAccessibilityExtensionListChange', callback: Callback&lt;void&gt;): void;
添加启用的辅助扩展的列表变化监听。
添加启用的辅助扩展的列表变化监听,使用callback异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 参数固定为enableAbilityListsStateChanged,监听启用的辅助扩展的列表变化。 |
| callback | Callback&lt;void&gt; | 是 | 回调函数,在启用的辅助扩展的列表变化时通过此函数进行通知。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 参数固定为enabledAccessibilityExtensionListChange,监听启用的辅助扩展的列表变化。 |
| callback | Callback&lt;void&gt; | 是 | 回调函数,在启用的辅助扩展的列表变化时通过此函数进行通知。 |
**示例:**
```typescript
config.on('enableAbilityListsStateChanged',() => {
console.info('ax extension ability enable list changed');
});
```
```ts
try {
config.on('enabledAccessibilityExtensionListChange', () => {
console.info('subscribe enabled accessibility extension list change state success');
}).catch((err) => {
console.error('failed to subscribe enabled accessibility extension list change state, because ' +
JSON.stringify(err));
});
} catch (exception) {
console.error('failed to subscribe enabled accessibility extension list change state, because ' +
JSON.stringify(exception));
};
```
## off('enableAbilityListsStateChanged')
## off('enabledAccessibilityExtensionListChange')
off(type: 'enableAbilityListsStateChanged', callback?: Callback&lt;void&gt;): void;
off(type: 'enabledAccessibilityExtensionListChange', callback?: Callback&lt;void&gt;): void;
取消启用的辅助扩展的列表变化监听。
取消启用的辅助扩展的列表变化监听,使用callback异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 否 | 参数固定为enableAbilityListsStateChanged,监听启用的辅助扩展的列表变化。 |
| callback | Callback&lt;void&gt; | 否 | 要取消的监听回调函数。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 否 | 参数固定为enabledAccessibilityExtensionListChange,监听启用的辅助扩展的列表变化。 |
| callback | Callback&lt;void&gt; | 否 | 要取消的监听回调函数。 |
**示例:**
```typescript
config.off('enableAbilityListsStateChanged');
```
```ts
try {
config.off('enabledAccessibilityExtensionListChange', () => {
console.info('unSubscribe enabled accessibility extension list change state success');
}).catch((err) => {
console.error('failed to unSubscribe enabled accessibility extension list change state, because ' +
JSON.stringify(err));
});
} catch (exception) {
console.error('failed to unSubscribe enabled accessibility extension list change state, because ' +
JSON.stringify(exception));
};
```
## Config
......@@ -201,152 +273,178 @@ off(type: 'enableAbilityListsStateChanged', callback?: Callback&lt;void&gt;): vo
set(value: T): Promise&lt;void&gt;;
设置属性。
设置属性,使用Promise异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| value | T | 是 | 设置的属性值。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| value | T | 是 | 设置的属性值。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | Promise实例,用于返回方法执行结果。 |
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**示例:**
```typescript
config.highContrastText.set(true)
.then(() => {
console.info('highContrastText set succeed');
}).catch((error) => {
console.error('highContrastText set failed');
});
```
```ts
let value = true;
try {
config.highContrastText.set(value).then(() => {
console.info('set highContrastText succeed');
}).catch((err) => {
console.error('failed to set highContrastText, because ' + JSON.stringify(err));
});
} catch (exception) {
console.error('failed to set config, because ' + JSON.stringify(exception));
};
```
### set
set(value: T, callback: AsyncCallback&lt;void&gt;): void;
设置属性。
设置属性,使用callback异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| value | T | 是 | 设置的属性值。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数,返回方法执行结果。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| value | T | 是 | 设置的属性值。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数。 |
**示例:**
```typescript
config.highContrastText.set(true, (err, data) => {
if (err) {
console.error('highContrastText set failed');
return;
}
console.info('highContrastText set succeed');
})
```
```ts
let value = true;
try {
config.highContrastText.set(value, (err, data) => {
if (err) {
console.error('failed to set highContrastText, because ' + JSON.stringify(err));
return;
}
console.info('set highContrastText succeed');
});
} catch (exception) {
console.error('failed to set config, because ' + JSON.stringify(exception));
};
```
### get
get(): Promise&lt;T&gt;;
获取属性。
获取属性,使用Promise异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;T&gt; | Promise实例,用于返回属性值。 |
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;T&gt; | Promise对象,返回对应属性值。 |
**示例:**
```typescript
config.highContrastText.get()
.then((value) => {
console.info('highContrastText get succeed');
}).catch((error) => {
console.error('highContrastText get failed');
});
```
```ts
let value;
config.highContrastText.get().then((data) => {
value = data;
console.info('get highContrastText success');
}).catch((err) => {
console.error('failed to get highContrastText, because ' + JSON.stringify(err));
});
```
### get
get(callback: AsyncCallback&lt;T&gt;): void;
获取属性。
获取属性,使用callback异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数,返回属性值。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数,返回属性值。 |
**示例:**
```typescript
config.highContrastText.get((err, data) => {
if (err) {
console.error('highContrastText get failed');
return;
}
console.info('highContrastText get succeed');
})
```
```ts
let value;
config.highContrastText.get((err, data) => {
if (err) {
console.error('failed to get highContrastText, because ' + JSON.stringify(err));
return;
}
value = data;
console.info('get highContrastText success');
});
```
### on
on(callback: Callback&lt;T&gt;): void;
添加属性变化监听。
添加属性变化监听,使用callback异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | Callback&lt;T&gt; | 是 | 回调函数,在属性变化时通过此函数进行通知。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | Callback&lt;T&gt; | 是 | 回调函数,在属性变化时通过此函数进行通知。 |
**示例:**
```typescript
config.highContrastText.on(() => {
console.info('highContrastText changed');
});
```
```ts
try {
config.highContrastText.on((err, data) => {
if (err) {
console.error('failed subscribe highContrastText, because ' + JSON.stringify(err));
return;
}
console.info('subscribe highContrastText success');
});
} catch (exception) {
console.error('failed subscribe highContrastText, because ' + JSON.stringify(exception));
}
```
### off
off(callback?: Callback&lt;T&gt;): void;
取消属性变化监听。
取消属性变化监听,使用callback异步回调
**系统能力**:SystemCapability.BarrierFree.Accessibility.Core
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | Callback&lt;T&gt; | 否 | 要取消的监听回调函数。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | Callback&lt;T&gt; | 否 | 要取消的监听回调函数。 |
**示例:**
```typescript
config.highContrastText.off();
```
```ts
config.highContrastText.off((err, data) => {
if (err) {
console.error('failed unSubscribe highContrastText, because ' + JSON.stringify(err));
return;
}
console.info('unSubscribe highContrastText success');
});
```
## DaltonizationColorFilter
......
......@@ -94,8 +94,10 @@ onConnect(): void;
**示例:**
```ts
onConnect(): void {
console.log("AxExtensionAbility onConnect");
class MyAccessibilityExtensionAbility extends AccessibilityExtensionAbility {
onConnect() {
console.log('AxExtensionAbility onConnect');
}
};
```
......@@ -110,8 +112,10 @@ onDisconnect(): void;
**示例:**
```ts
onDisconnect(): void {
console.log("AxExtensionAbility onDisconnect");
class MyAccessibilityExtensionAbility extends AccessibilityExtensionAbility {
onDisconnect() {
console.log('AxExtensionAbility onDisconnect');
}
};
```
......@@ -127,15 +131,17 @@ onAccessibilityEvent(event: AccessibilityEvent): void;
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ---------------------------------------- | ---- | --------------- |
| event | [AccessibilityEvent](accessibilityevent) | 是 | 无障碍事件回调函数。无返回值。 |
| event | [AccessibilityEvent](#accessibilityevent) | 是 | 无障碍事件回调函数。无返回值。 |
**示例:**
```ts
onAccessibilityEvent(event: AccessibilityEvent): void {
console.log("AxExtensionAbility onAccessibilityEvent");
if (event.eventType == 'click') {
console.log("AxExtensionAbility onAccessibilityEvent: click");
class MyAccessibilityExtensionAbility extends AccessibilityExtensionAbility {
onAccessibilityEvent(event) {
console.log('AxExtensionAbility onAccessibilityEvent');
if (event.eventType == 'click') {
console.log('AxExtensionAbility onAccessibilityEvent: click');
}
}
};
```
......@@ -157,12 +163,14 @@ onKeyEvent(keyEvent: KeyEvent): boolean;
**示例:**
```ts
onKeyEvent(keyEvent: inputEventClient.KeyEvent): boolean {
console.log("AxExtensionAbility onKeyEvent");
if (keyEvent.keyCode == 22) {
console.log("AxExtensionAbility onKeyEvent: intercept 22");
return true;
class MyAccessibilityExtensionAbility extends AccessibilityExtensionAbility {
onKeyEvent(keyEvent) {
console.log('AxExtensionAbility onKeyEvent');
if (keyEvent.keyCode == 22) {
console.log('AxExtensionAbility onKeyEvent: intercept 22');
return true;
}
return false;
}
return false;
};
```
......@@ -18,27 +18,21 @@ import batteryInfo from '@ohos.batteryInfo';
**系统能力**:SystemCapability.PowerManager.BatteryManager.Core
| 名称 | 类型 | 可读 | 可写 | 描述 |
| ----------------------------------------- | ---------------------------------------------- | ---- | ---- | ------------------------------------------------------------ |
| batterySOC | number | 是 | 否 | 表示当前设备剩余电池电量百分比。 |
| chargingStatus | [BatteryChargeState](#batterychargestate) | 是 | 否 | 表示当前设备电池的充电状态。 |
| healthStatus | [BatteryHealthState](#batteryhealthstate) | 是 | 否 | 表示当前设备电池的健康状态。 |
| pluggedType | [BatteryPluggedType](#batterypluggedtype) | 是 | 否 | 表示当前设备连接的充电器类型。 |
| voltage | number | 是 | 否 | 表示当前设备电池的电压,单位微伏。 |
| technology | string | 是 | 否 | 表示当前设备电池的技术型号。 |
| batteryTemperature | number | 是 | 否 | 表示当前设备电池的温度,单位0.1摄氏度。 |
| isBatteryPresent<sup>7+</sup> | boolean | 是 | 否 | 表示当前设备是否支持电池或者电池是否在位。 |
| batteryCapacityLevel<sup>9+</sup> | [BatteryCapacityLevel](#batterycapacitylevel9) | 是 | 否 | 表示当前设备电池电量的等级。 |
| estimatedRemainingChargeTime<sup>9+</sup> | number | 是 | 否 | 表示当前设备充满电的预估时间,单位毫秒。 |
| totalEnergy<sup>9+</sup> | number | 是 | 否 | 表示当前设备电池的总容量,单位毫安时。此接口为系统接口,三方应用不支持调用。 |
| nowCurrent<sup>9+</sup> | number | 是 | 否 | 表示当前设备电池的电流,单位毫安。此接口为系统接口,三方应用不支持调用。 |
| remainingEnergy<sup>9+</sup> | number | 是 | 否 | 表示当前设备电池的剩余容量,单位毫安时。此接口为系统接口,三方应用不支持调用。 |
- 示例:
```js
import batteryInfo from '@ohos.batteryInfo';
var batterySoc = batteryInfo.batterySOC;
```
| 名称 | 类型 | 可读 | 可写 | 描述 |
| ----------------------------------------- | ---------------------------------------------- | ---- | ---- | ---------------------------------------------------------- |
| batterySOC | number | 是 | 否 | 表示当前设备剩余电池电量百分比。 |
| chargingStatus | [BatteryChargeState](#batterychargestate) | 是 | 否 | 表示当前设备电池的充电状态。 |
| healthStatus | [BatteryHealthState](#batteryhealthstate) | 是 | 否 | 表示当前设备电池的健康状态。 |
| pluggedType | [BatteryPluggedType](#batterypluggedtype) | 是 | 否 | 表示当前设备连接的充电器类型。 |
| voltage | number | 是 | 否 | 表示当前设备电池的电压,单位微伏。 |
| technology | string | 是 | 否 | 表示当前设备电池的技术型号。 |
| batteryTemperature | number | 是 | 否 | 表示当前设备电池的温度,单位0.1摄氏度。 |
| isBatteryPresent<sup>7+</sup> | boolean | 是 | 否 | 表示当前设备是否支持电池或者电池是否在位。 |
| batteryCapacityLevel<sup>9+</sup> | [BatteryCapacityLevel](#batterycapacitylevel9) | 是 | 否 | 表示当前设备电池电量的等级。 |
| estimatedRemainingChargeTime<sup>9+</sup> | number | 是 | 否 | 表示当前设备充满电的预估时间,单位毫秒。 |
| totalEnergy<sup>9+</sup> | number | 是 | 否 | 表示当前设备电池的总容量,单位毫安时。此接口为系统接口。 |
| nowCurrent<sup>9+</sup> | number | 是 | 否 | 表示当前设备电池的电流,单位毫安。此接口为系统接口。 |
| remainingEnergy<sup>9+</sup> | number | 是 | 否 | 表示当前设备电池的剩余容量,单位毫安时。此接口为系统接口。 |
## BatteryPluggedType
......@@ -105,22 +99,22 @@ import batteryInfo from '@ohos.batteryInfo';
## CommonEventBatteryChangedCode<sup>9+</sup>
表示COMMON_EVENT_BATTERY_CHANGED通用事件的键代码
表示COMMON_EVENT_BATTERY_CHANGED通用事件附加信息的查询键
**系统能力**:SystemCapability.PowerManager.BatteryManager.Core
| 名称 | 默认值 | 描述 |
| -------------------- | ------ | -------------------------------------------------- |
| EXTRA_SOC | 0 | 表示剩余电池电量百分比的键代码。 |
| EXTRA_VOLTAGE | 1 | 表示当前设备电池电压的键代码。 |
| EXTRA_TEMPERATURE | 2 | 表示当前设备电池温度的键代码。 |
| EXTRA_HEALTH_STATE | 3 | 表示当前设备电池健康状态的键代码。 |
| EXTRA_PLUGGED_TYPE | 4 | 表示当前设备连接的充电器类型的键代码。 |
| EXTRA_MAX_CURRENT | 5 | 表示当前设备电池最大电流的键代码。 |
| EXTRA_MAX_VOLTAGE | 6 | 表示当前设备电池最大电压的键代码。 |
| EXTRA_CHARGE_STATE | 7 | 表示当前设备电池充电状态的键代码。 |
| EXTRA_CHARGE_COUNTER | 8 | 表示当前设备电池充电次数的键代码。 |
| EXTRA_PRESENT | 9 | 表示当前设备是否支持电池或者电池是否在位的键代码。 |
| EXTRA_TECHNOLOGY | 10 | 表示当前设备电池技术型号的键代码。 |
| EXTRA_SOC | 0 | 表示剩余电池电量百分比的查询键。 |
| EXTRA_VOLTAGE | 1 | 表示当前设备电池电压的查询键。 |
| EXTRA_TEMPERATURE | 2 | 表示当前设备电池温度的查询键。 |
| EXTRA_HEALTH_STATE | 3 | 表示当前设备电池健康状态的查询键。 |
| EXTRA_PLUGGED_TYPE | 4 | 表示当前设备连接的充电器类型的查询键。 |
| EXTRA_MAX_CURRENT | 5 | 表示当前设备电池最大电流的查询键。 |
| EXTRA_MAX_VOLTAGE | 6 | 表示当前设备电池最大电压的查询键。 |
| EXTRA_CHARGE_STATE | 7 | 表示当前设备电池充电状态的查询键。 |
| EXTRA_CHARGE_COUNTER | 8 | 表示当前设备电池充电次数的查询键。 |
| EXTRA_PRESENT | 9 | 表示当前设备是否支持电池或者电池是否在位的查询键。 |
| EXTRA_TECHNOLOGY | 10 | 表示当前设备电池技术型号的查询键。 |
......@@ -32,6 +32,8 @@ setDateTime(admin: Want, time: number, callback: AsyncCallback\<void>): void
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
**系统API**: 此接口为系统接口。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -81,6 +83,8 @@ setDateTime(admin: Want, time: number): Promise\<void>
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
**系统API**: 此接口为系统接口。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册