提交 a555b214 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 93c4c64e
# Distributed Account Management # Distributed Account Management
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> The distributedAccount module provides basic functions for managing distributed accounts, including querying and updating account login status.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -11,17 +13,14 @@ import account_distributedAccount from '@ohos.account.distributedAccount'; ...@@ -11,17 +13,14 @@ import account_distributedAccount from '@ohos.account.distributedAccount';
``` ```
## System Capability
SystemCapability.Account.OsAccount
## account_distributedAccount.getDistributedAccountAbility ## account_distributedAccount.getDistributedAccountAbility
getDistributedAccountAbility(): DistributedAccountAbility getDistributedAccountAbility(): DistributedAccountAbility
Obtains a **DistributedAccountAbility** instance. Obtains a **DistributedAccountAbility** instance.
**System capability**: SystemCapability.Account.OsAccount
- Return value - Return value
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
...@@ -40,7 +39,9 @@ Provides methods for querying and updating the login state of a distributed acco ...@@ -40,7 +39,9 @@ Provides methods for querying and updating the login state of a distributed acco
queryOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): void queryOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): void
Obtains distributed account information. This method uses an asynchronous callback to return the result. Obtains distributed account information. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC (available only to system applications) **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC (available only to system applications)
...@@ -63,7 +64,9 @@ Obtains distributed account information. This method uses an asynchronous callba ...@@ -63,7 +64,9 @@ Obtains distributed account information. This method uses an asynchronous callba
queryOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt; queryOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt;
Obtains distributed account information. This method uses a promise to return the result asynchronously. Obtains distributed account information. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC (available only to system applications) **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC (available only to system applications)
...@@ -87,7 +90,9 @@ Obtains distributed account information. This method uses a promise to return th ...@@ -87,7 +90,9 @@ Obtains distributed account information. This method uses a promise to return th
updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback&lt;void&gt;): void updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback&lt;void&gt;): void
Updates distributed account information. This method uses an asynchronous callback to return the result. Updates distributed account information. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS (available only to system applications) **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS (available only to system applications)
...@@ -110,7 +115,9 @@ Updates distributed account information. This method uses an asynchronous callba ...@@ -110,7 +115,9 @@ Updates distributed account information. This method uses an asynchronous callba
updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt; updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt;
Updates distributed account information. This method uses a promise to return the result asynchronously. Updates distributed account information. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS (available only to system applications) **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS (available only to system applications)
...@@ -140,6 +147,7 @@ Updates distributed account information. This method uses a promise to return th ...@@ -140,6 +147,7 @@ Updates distributed account information. This method uses a promise to return th
Defines distributed OS account information. Defines distributed OS account information.
**System capability**: SystemCapability.Account.OsAccount
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
......
# OS Account Management # OS Account Management
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> The osAccount module provides basic capabilities for managing operating system (OS) accounts, including adding, deleting, querying, setting, subscribing to, and enabling an OS account, and storing OS account data to disks.
> **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -18,7 +20,7 @@ Obtains an **AccountManager** instance. ...@@ -18,7 +20,7 @@ Obtains an **AccountManager** instance.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| --------------------------------- | ------------------------ | | --------------------------------- | ------------------------ |
| [AccountManager](#accountmanager) | Obtains an **AccountManager** instance.| | [AccountManager](#accountmanager) | Obtains an **AccountManager** instance.|
...@@ -48,7 +50,7 @@ Provides methods to manage OS accounts. ...@@ -48,7 +50,7 @@ Provides methods to manage OS accounts.
activateOsAccount(localId: number, callback: AsyncCallback&lt;void&gt;): void activateOsAccount(localId: number, callback: AsyncCallback&lt;void&gt;): void
Activates an OS account. This method uses an asynchronous callback to return the result. Activates an OS account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -76,7 +78,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -76,7 +78,7 @@ This is a system API and cannot be called by third-party applications.
activateOsAccount(localId: number): Promise&lt;void&gt; activateOsAccount(localId: number): Promise&lt;void&gt;
Activates an OS account. This method uses a promise to return the result. Activates an OS account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -90,7 +92,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -90,7 +92,7 @@ This is a system API and cannot be called by third-party applications.
| ------- | ------ | ---- | -------------------- | | ------- | ------ | ---- | -------------------- |
| localId | number | Yes | ID of the OS account to activate.| | localId | number | Yes | ID of the OS account to activate.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :------------------ | :---------------------------------- | | :------------------ | :---------------------------------- |
...@@ -111,7 +113,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -111,7 +113,7 @@ This is a system API and cannot be called by third-party applications.
isMultiOsAccountEnable(callback: AsyncCallback&lt;boolean&gt;): void isMultiOsAccountEnable(callback: AsyncCallback&lt;boolean&gt;): void
Checks whether multiple OS accounts are supported. This method uses an asynchronous callback to return the result. Checks whether multiple OS accounts are supported. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -135,11 +137,11 @@ Checks whether multiple OS accounts are supported. This method uses an asynchron ...@@ -135,11 +137,11 @@ Checks whether multiple OS accounts are supported. This method uses an asynchron
isMultiOsAccountEnable(): Promise&lt;boolean&gt; isMultiOsAccountEnable(): Promise&lt;boolean&gt;
Checks whether multiple OS accounts are supported. This method uses a promise to return the result. Checks whether multiple OS accounts are supported. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------- | :----------------------------------------------------------- | | :--------------------- | :----------------------------------------------------------- |
...@@ -160,7 +162,7 @@ Checks whether multiple OS accounts are supported. This method uses a promise to ...@@ -160,7 +162,7 @@ Checks whether multiple OS accounts are supported. This method uses a promise to
isOsAccountActived(localId: number, callback: AsyncCallback&lt;boolean&gt;): void isOsAccountActived(localId: number, callback: AsyncCallback&lt;boolean&gt;): void
Checks whether an OS account is activated. This method uses an asynchronous callback to return the result. Checks whether an OS account is activated. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
...@@ -188,7 +190,7 @@ Checks whether an OS account is activated. This method uses an asynchronous call ...@@ -188,7 +190,7 @@ Checks whether an OS account is activated. This method uses an asynchronous call
isOsAccountActived(localId: number): Promise&lt;boolean&gt; isOsAccountActived(localId: number): Promise&lt;boolean&gt;
Checks whether an OS account is activated. This method uses a promise to return the result. Checks whether an OS account is activated. This API uses a promise to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
...@@ -200,7 +202,7 @@ Checks whether an OS account is activated. This method uses a promise to return ...@@ -200,7 +202,7 @@ Checks whether an OS account is activated. This method uses a promise to return
| ------- | ------ | ---- | ------------ | | ------- | ------ | ---- | ------------ |
| localId | number | Yes | ID of the target OS account.| | localId | number | Yes | ID of the target OS account.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------- | :----------------------------------------------------------- | | :--------------------- | :----------------------------------------------------------- |
...@@ -222,7 +224,7 @@ Checks whether an OS account is activated. This method uses a promise to return ...@@ -222,7 +224,7 @@ Checks whether an OS account is activated. This method uses a promise to return
isOsAccountConstraintEnable(localId: number, constraint: string, callback: AsyncCallback&lt;boolean&gt;): void isOsAccountConstraintEnable(localId: number, constraint: string, callback: AsyncCallback&lt;boolean&gt;): void
Checks whether the specified constraint is enabled for an OS account. This method uses an asynchronous callback to return the result. Checks whether the specified constraint is enabled for an OS account. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -251,7 +253,7 @@ Checks whether the specified constraint is enabled for an OS account. This metho ...@@ -251,7 +253,7 @@ Checks whether the specified constraint is enabled for an OS account. This metho
isOsAccountConstraintEnable(localId: number, constraint: string): Promise&lt;boolean&gt; isOsAccountConstraintEnable(localId: number, constraint: string): Promise&lt;boolean&gt;
Checks whether the specified constraint is enabled for an OS account. This method uses a promise to return the result. Checks whether the specified constraint is enabled for an OS account. This API uses a promise to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -264,7 +266,7 @@ Checks whether the specified constraint is enabled for an OS account. This metho ...@@ -264,7 +266,7 @@ Checks whether the specified constraint is enabled for an OS account. This metho
| localId | number | Yes | ID of the target OS account. | | localId | number | Yes | ID of the target OS account. |
| constraint | string | Yes | [Constraint](#constraints) specified.| | constraint | string | Yes | [Constraint](#constraints) specified.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------- | :----------------------------------------------------------- | | :--------------------- | :----------------------------------------------------------- |
...@@ -286,7 +288,7 @@ Checks whether the specified constraint is enabled for an OS account. This metho ...@@ -286,7 +288,7 @@ Checks whether the specified constraint is enabled for an OS account. This metho
isTestOsAccount(callback: AsyncCallback&lt;boolean&gt;): void isTestOsAccount(callback: AsyncCallback&lt;boolean&gt;): void
Checks whether this OS account is a test account. This method uses an asynchronous callback to return the result. Checks whether this OS account is a test account. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -310,11 +312,11 @@ Checks whether this OS account is a test account. This method uses an asynchrono ...@@ -310,11 +312,11 @@ Checks whether this OS account is a test account. This method uses an asynchrono
isTestOsAccount(): Promise&lt;boolean&gt; isTestOsAccount(): Promise&lt;boolean&gt;
Checks whether this OS account is a test account. This method uses a promise to return the result. Checks whether this OS account is a test account. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------- | :----------------------------------------------------------- | | :--------------------- | :----------------------------------------------------------- |
...@@ -335,7 +337,7 @@ Checks whether this OS account is a test account. This method uses a promise to ...@@ -335,7 +337,7 @@ Checks whether this OS account is a test account. This method uses a promise to
isOsAccountVerified(callback: AsyncCallback&lt;boolean&gt;): void isOsAccountVerified(callback: AsyncCallback&lt;boolean&gt;): void
Checks whether this OS account has been verified. This method uses an asynchronous callback to return the result. Checks whether this OS account has been verified. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -359,7 +361,7 @@ Checks whether this OS account has been verified. This method uses an asynchrono ...@@ -359,7 +361,7 @@ Checks whether this OS account has been verified. This method uses an asynchrono
isOsAccountVerified(localId: number, callback: AsyncCallback&lt;boolean&gt;): void isOsAccountVerified(localId: number, callback: AsyncCallback&lt;boolean&gt;): void
Checks whether an OS account has been verified. This method uses an asynchronous callback to return the result. Checks whether an OS account has been verified. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
...@@ -386,7 +388,7 @@ Checks whether an OS account has been verified. This method uses an asynchronous ...@@ -386,7 +388,7 @@ Checks whether an OS account has been verified. This method uses an asynchronous
isOsAccountVerified(localId?: number): Promise&lt;boolean&gt; isOsAccountVerified(localId?: number): Promise&lt;boolean&gt;
Checks whether an OS account has been verified. This method uses a promise to return the result. Checks whether an OS account has been verified. This API uses a promise to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
...@@ -398,7 +400,7 @@ Checks whether an OS account has been verified. This method uses a promise to re ...@@ -398,7 +400,7 @@ Checks whether an OS account has been verified. This method uses a promise to re
| ------- | ------ | ---- | ------------------ | | ------- | ------ | ---- | ------------------ |
| localId | number | No | ID of the target OS account.| | localId | number | No | ID of the target OS account.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------- | :----------------------------------------------------------- | | :--------------------- | :----------------------------------------------------------- |
...@@ -419,7 +421,7 @@ Checks whether an OS account has been verified. This method uses a promise to re ...@@ -419,7 +421,7 @@ Checks whether an OS account has been verified. This method uses a promise to re
removeOsAccount(localId: number, callback: AsyncCallback&lt;void&gt;): void removeOsAccount(localId: number, callback: AsyncCallback&lt;void&gt;): void
Removes an OS account. This method uses an asynchronous callback to return the result. Removes an OS account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -451,7 +453,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -451,7 +453,7 @@ This is a system API and cannot be called by third-party applications.
removeOsAccount(localId: number): Promise&lt;void&gt; removeOsAccount(localId: number): Promise&lt;void&gt;
Removes an OS account. This method uses a promise to return the result. Removes an OS account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -465,7 +467,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -465,7 +467,7 @@ This is a system API and cannot be called by third-party applications.
| ------- | ------ | ---- | -------------------- | | ------- | ------ | ---- | -------------------- |
| localId | number | Yes | ID of the OS account to remove.| | localId | number | Yes | ID of the OS account to remove.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :------------------ | :---------------------------------- | | :------------------ | :---------------------------------- |
...@@ -491,7 +493,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -491,7 +493,7 @@ This is a system API and cannot be called by third-party applications.
setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enable: boolean,callback: AsyncCallback&lt;void&gt;): void setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enable: boolean,callback: AsyncCallback&lt;void&gt;): void
Sets or removes constraints for an OS account. This method uses an asynchronous callback to return the result. Sets or removes constraints for an OS account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -522,7 +524,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -522,7 +524,7 @@ This is a system API and cannot be called by third-party applications.
setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enable: boolean): Promise&lt;void&gt; setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enable: boolean): Promise&lt;void&gt;
Sets or removes constraints for an OS account. This method uses a promise to return the result. Sets or removes constraints for an OS account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -538,7 +540,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -538,7 +540,7 @@ This is a system API and cannot be called by third-party applications.
| constraints | Array&lt;string&gt; | Yes | List of [constraints](#constraints) to set or remove.| | constraints | Array&lt;string&gt; | Yes | List of [constraints](#constraints) to set or remove.|
| enable | boolean | Yes | Set or remove constraints. The value **true** means to set constraints, and **false** means to remove constraints. | | enable | boolean | Yes | Set or remove constraints. The value **true** means to set constraints, and **false** means to remove constraints. |
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :------------------ | :---------------------------------- | | :------------------ | :---------------------------------- |
...@@ -560,7 +562,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -560,7 +562,7 @@ This is a system API and cannot be called by third-party applications.
setOsAccountName(localId: number, localName: string, callback: AsyncCallback&lt;void&gt;): void setOsAccountName(localId: number, localName: string, callback: AsyncCallback&lt;void&gt;): void
Sets a name for an OS account. This method uses an asynchronous callback to return the result. Sets a name for an OS account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -591,7 +593,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -591,7 +593,7 @@ This is a system API and cannot be called by third-party applications.
setOsAccountName(localId: number, localName: string): Promise&lt;void&gt; setOsAccountName(localId: number, localName: string): Promise&lt;void&gt;
Sets a name for an OS account. This method uses a promise to return the result. Sets a name for an OS account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -606,7 +608,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -606,7 +608,7 @@ This is a system API and cannot be called by third-party applications.
| localId | number | Yes | ID of the target OS account.| | localId | number | Yes | ID of the target OS account.|
| localName | string | Yes | Account name to set. | | localName | string | Yes | Account name to set. |
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :------------------ | :---------------------------------- | | :------------------ | :---------------------------------- |
...@@ -629,7 +631,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -629,7 +631,7 @@ This is a system API and cannot be called by third-party applications.
getCreatedOsAccountsCount(callback: AsyncCallback&lt;number&gt;): void getCreatedOsAccountsCount(callback: AsyncCallback&lt;number&gt;): void
Obtains the number of OS accounts created. This method uses an asynchronous callback to return the result. Obtains the number of OS accounts created. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -655,13 +657,13 @@ Obtains the number of OS accounts created. This method uses an asynchronous call ...@@ -655,13 +657,13 @@ Obtains the number of OS accounts created. This method uses an asynchronous call
getCreatedOsAccountsCount(): Promise&lt;number&gt; getCreatedOsAccountsCount(): Promise&lt;number&gt;
Obtains the number of OS accounts created. This method uses a promise to return the result. Obtains the number of OS accounts created. This API uses a promise to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -682,7 +684,7 @@ Obtains the number of OS accounts created. This method uses a promise to return ...@@ -682,7 +684,7 @@ Obtains the number of OS accounts created. This method uses a promise to return
getOsAccountLocalIdFromProcess(callback: AsyncCallback&lt;number&gt;): void getOsAccountLocalIdFromProcess(callback: AsyncCallback&lt;number&gt;): void
Obtains the ID of the OS account to which the current process belongs. This method uses an asynchronous callback to return the result. Obtains the ID of the OS account to which the current process belongs. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -706,11 +708,11 @@ Obtains the ID of the OS account to which the current process belongs. This meth ...@@ -706,11 +708,11 @@ Obtains the ID of the OS account to which the current process belongs. This meth
getOsAccountLocalIdFromProcess(): Promise&lt;number&gt; getOsAccountLocalIdFromProcess(): Promise&lt;number&gt;
Obtains the ID of the OS account to which the current process belongs. This method uses a promise to return the result. Obtains the ID of the OS account to which the current process belongs. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -731,7 +733,7 @@ Obtains the ID of the OS account to which the current process belongs. This meth ...@@ -731,7 +733,7 @@ Obtains the ID of the OS account to which the current process belongs. This meth
getOsAccountLocalIdFromUid(uid: number, callback: AsyncCallback&lt;number&gt;): void getOsAccountLocalIdFromUid(uid: number, callback: AsyncCallback&lt;number&gt;): void
Obtains the OS account ID based on the process UID. This method uses an asynchronous callback to return the result. Obtains the OS account ID based on the process UID. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -757,7 +759,7 @@ Obtains the OS account ID based on the process UID. This method uses an asynchro ...@@ -757,7 +759,7 @@ Obtains the OS account ID based on the process UID. This method uses an asynchro
getOsAccountLocalIdFromUid(uid: number): Promise&lt;number&gt; getOsAccountLocalIdFromUid(uid: number): Promise&lt;number&gt;
Obtains the OS account ID based on the process UID. This method uses a promise to return the result. Obtains the OS account ID based on the process UID. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -767,7 +769,7 @@ Obtains the OS account ID based on the process UID. This method uses a promise t ...@@ -767,7 +769,7 @@ Obtains the OS account ID based on the process UID. This method uses a promise t
| ------ | ------ | ---- | --------- | | ------ | ------ | ---- | --------- |
| uid | number | Yes | Process UID.| | uid | number | Yes | Process UID.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -789,7 +791,7 @@ Obtains the OS account ID based on the process UID. This method uses a promise t ...@@ -789,7 +791,7 @@ Obtains the OS account ID based on the process UID. This method uses a promise t
getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback&lt;number&gt;): void getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback&lt;number&gt;): void
Obtains the OS account ID based on domain account information. This method uses an asynchronous callback to return the result. Obtains the OS account ID based on domain account information. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -817,7 +819,7 @@ Obtains the OS account ID based on domain account information. This method uses ...@@ -817,7 +819,7 @@ Obtains the OS account ID based on domain account information. This method uses
getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo): Promise&lt;number&gt; getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo): Promise&lt;number&gt;
Obtains the OS account ID based on domain account information. This method uses a promise to return the result. Obtains the OS account ID based on domain account information. This API uses a promise to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -829,7 +831,7 @@ Obtains the OS account ID based on domain account information. This method uses ...@@ -829,7 +831,7 @@ Obtains the OS account ID based on domain account information. This method uses
| ---------- | --------------------------------------- | ---- | ------------ | | ---------- | --------------------------------------- | ---- | ------------ |
| domainInfo | [DomainAccountInfo](#domainaccountinfo) | Yes | Domain account information.| | domainInfo | [DomainAccountInfo](#domainaccountinfo) | Yes | Domain account information.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -851,7 +853,7 @@ Obtains the OS account ID based on domain account information. This method uses ...@@ -851,7 +853,7 @@ Obtains the OS account ID based on domain account information. This method uses
queryMaxOsAccountNumber(callback: AsyncCallback&lt;number&gt;): void queryMaxOsAccountNumber(callback: AsyncCallback&lt;number&gt;): void
Obtains the maximum number of OS accounts that can be created. This method uses an asynchronous callback to return the result. Obtains the maximum number of OS accounts that can be created. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -877,13 +879,13 @@ This is a system API and cannot be called by third-party applications. ...@@ -877,13 +879,13 @@ This is a system API and cannot be called by third-party applications.
queryMaxOsAccountNumber(): Promise&lt;number&gt; queryMaxOsAccountNumber(): Promise&lt;number&gt;
Obtains the maximum number of OS accounts that can be created. This method uses a promise to return the result. Obtains the maximum number of OS accounts that can be created. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -904,7 +906,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -904,7 +906,7 @@ This is a system API and cannot be called by third-party applications.
getOsAccountAllConstraints(localId: number, callback: AsyncCallback&lt;Array&lt;string&gt;&gt;): void getOsAccountAllConstraints(localId: number, callback: AsyncCallback&lt;Array&lt;string&gt;&gt;): void
Obtains all constraints enabled for an OS account. This method uses an asynchronous callback to return the result. Obtains all constraints enabled for an OS account. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -932,7 +934,7 @@ Obtains all constraints enabled for an OS account. This method uses an asynchron ...@@ -932,7 +934,7 @@ Obtains all constraints enabled for an OS account. This method uses an asynchron
getOsAccountAllConstraints(localId: number): Promise&lt;Array&lt;string&gt;&gt; getOsAccountAllConstraints(localId: number): Promise&lt;Array&lt;string&gt;&gt;
Obtains all constraints enabled for an OS account. This method uses a promise to return the result. Obtains all constraints enabled for an OS account. This API uses a promise to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -944,7 +946,7 @@ Obtains all constraints enabled for an OS account. This method uses a promise to ...@@ -944,7 +946,7 @@ Obtains all constraints enabled for an OS account. This method uses a promise to
| ------- | ------ | ---- | ------------ | | ------- | ------ | ---- | ------------ |
| localId | number | Yes | ID of the target OS account.| | localId | number | Yes | ID of the target OS account.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------------------- | :----------------------------------------------------------- | | :--------------------------------- | :----------------------------------------------------------- |
...@@ -966,12 +968,14 @@ Obtains all constraints enabled for an OS account. This method uses a promise to ...@@ -966,12 +968,14 @@ Obtains all constraints enabled for an OS account. This method uses a promise to
queryAllCreatedOsAccounts(callback: AsyncCallback&lt;Array&lt;OsAccountInfo&gt;&gt;): void queryAllCreatedOsAccounts(callback: AsyncCallback&lt;Array&lt;OsAccountInfo&gt;&gt;): void
Obtains information about all the OS accounts created. This method uses an asynchronous callback to return the result. Obtains information about all the OS accounts created. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
...@@ -992,13 +996,15 @@ This is a system API and cannot be called by third-party applications. ...@@ -992,13 +996,15 @@ This is a system API and cannot be called by third-party applications.
queryAllCreatedOsAccounts(): Promise&lt;Array&lt;OsAccountInfo&gt;&gt; queryAllCreatedOsAccounts(): Promise&lt;Array&lt;OsAccountInfo&gt;&gt;
Obtains information about all the OS accounts created. This method uses a promise to return the result. Obtains information about all the OS accounts created. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
**Return value**
| Type | Description | | Type | Description |
| :---------------------------------------------------------- | :----------------------------------------------------------- | | :---------------------------------------------------------- | :----------------------------------------------------------- |
...@@ -1019,7 +1025,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1019,7 +1025,7 @@ This is a system API and cannot be called by third-party applications.
queryActivatedOsAccountIds(callback: AsyncCallback&lt;Array&lt;number&gt;&gt;): void queryActivatedOsAccountIds(callback: AsyncCallback&lt;Array&lt;number&gt;&gt;): void
Obtains information about all activated OS accounts. This method uses an asynchronous callback to return the result. Obtains information about all activated OS accounts. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -1046,11 +1052,11 @@ Obtains information about all activated OS accounts. This method uses an asynchr ...@@ -1046,11 +1052,11 @@ Obtains information about all activated OS accounts. This method uses an asynchr
queryActivatedOsAccountIds(): Promise&lt;Array&lt;number&gt;&gt; queryActivatedOsAccountIds(): Promise&lt;Array&lt;number&gt;&gt;
Obtains information about all activated OS accounts. This method uses a promise to return the result. Obtains information about all activated OS accounts. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------------------- | :----------------------------------------------------------- | | :--------------------------------- | :----------------------------------------------------------- |
...@@ -1071,7 +1077,7 @@ Obtains information about all activated OS accounts. This method uses a promise ...@@ -1071,7 +1077,7 @@ Obtains information about all activated OS accounts. This method uses a promise
createOsAccount(localName: string, type: OsAccountType, callback: AsyncCallback&lt;OsAccountInfo&gt;): void createOsAccount(localName: string, type: OsAccountType, callback: AsyncCallback&lt;OsAccountInfo&gt;): void
Creates an OS account. This method uses an asynchronous callback to return the result. Creates an OS account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1101,7 +1107,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1101,7 +1107,7 @@ This is a system API and cannot be called by third-party applications.
createOsAccount(localName: string, type: OsAccountType): Promise&lt;OsAccountInfo&gt; createOsAccount(localName: string, type: OsAccountType): Promise&lt;OsAccountInfo&gt;
Creates an OS account. This method uses a promise to return the result. Creates an OS account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1116,7 +1122,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1116,7 +1122,7 @@ This is a system API and cannot be called by third-party applications.
| localName | string | Yes | Name of the OS account to create.| | localName | string | Yes | Name of the OS account to create.|
| type | [OsAccountType](#osaccounttype) | Yes | Type of the OS account to create.| | type | [OsAccountType](#osaccounttype) | Yes | Type of the OS account to create.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------------------------------- | :----------------------------------------------------------- | | :--------------------------------------------- | :----------------------------------------------------------- |
...@@ -1137,7 +1143,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1137,7 +1143,7 @@ This is a system API and cannot be called by third-party applications.
createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, callback: AsyncCallback&lt;OsAccountInfo&gt;): void createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, callback: AsyncCallback&lt;OsAccountInfo&gt;): void
Creates an OS account and associates it with the specified domain account. This method uses an asynchronous callback to return the result. Creates an OS account and associates it with the specified domain account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1168,7 +1174,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1168,7 +1174,7 @@ This is a system API and cannot be called by third-party applications.
createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo): Promise&lt;OsAccountInfo&gt; createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo): Promise&lt;OsAccountInfo&gt;
Creates an OS account and associates it with the specified domain account. This method uses a promise to return the result. Creates an OS account and associates it with the specified domain account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1183,7 +1189,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1183,7 +1189,7 @@ This is a system API and cannot be called by third-party applications.
| type | [OsAccountType](#osaccounttype) | Yes | Type of the OS account to create.| | type | [OsAccountType](#osaccounttype) | Yes | Type of the OS account to create.|
| domainInfo | [DomainAccountInfo](#domainaccountinfo) | Yes | Domain account information. | | domainInfo | [DomainAccountInfo](#domainaccountinfo) | Yes | Domain account information. |
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------------------------------- | :----------------------------------------------------------- | | :--------------------------------------------- | :----------------------------------------------------------- |
...@@ -1205,7 +1211,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1205,7 +1211,7 @@ This is a system API and cannot be called by third-party applications.
queryCurrentOsAccount(callback: AsyncCallback&lt;OsAccountInfo&gt;): void queryCurrentOsAccount(callback: AsyncCallback&lt;OsAccountInfo&gt;): void
Obtains information about the OS account to which the current process belongs. This method uses an asynchronous callback to return the result. Obtains information about the OS account to which the current process belongs. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -1231,13 +1237,13 @@ Obtains information about the OS account to which the current process belongs. T ...@@ -1231,13 +1237,13 @@ Obtains information about the OS account to which the current process belongs. T
queryCurrentOsAccount(): Promise&lt;OsAccountInfo&gt; queryCurrentOsAccount(): Promise&lt;OsAccountInfo&gt;
Obtains information about the OS account to which the current process belongs. This method uses a promise to return the result. Obtains information about the OS account to which the current process belongs. This API uses a promise to return the result.
**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------------------------------- | :----------------------------------------------------------- | | :--------------------------------------------- | :----------------------------------------------------------- |
...@@ -1258,7 +1264,7 @@ Obtains information about the OS account to which the current process belongs. T ...@@ -1258,7 +1264,7 @@ Obtains information about the OS account to which the current process belongs. T
queryOsAccountById(localId: number, callback: AsyncCallback&lt;OsAccountInfo&gt;): void queryOsAccountById(localId: number, callback: AsyncCallback&lt;OsAccountInfo&gt;): void
Obtains information about an OS account. This method uses an asynchronous callback to return the result. Obtains information about an OS account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1288,7 +1294,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1288,7 +1294,7 @@ This is a system API and cannot be called by third-party applications.
queryOsAccountById(localId: number): Promise&lt;OsAccountInfo&gt; queryOsAccountById(localId: number): Promise&lt;OsAccountInfo&gt;
Obtains information about an OS account. This method uses a promise to return the result. Obtains information about an OS account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1302,7 +1308,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1302,7 +1308,7 @@ This is a system API and cannot be called by third-party applications.
| ------- | ------ | ---- | -------------------- | | ------- | ------ | ---- | -------------------- |
| localId | number | Yes | ID of the target OS account.| | localId | number | Yes | ID of the target OS account.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------------------------------- | :----------------------------------------------------------- | | :--------------------------------------------- | :----------------------------------------------------------- |
...@@ -1324,7 +1330,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1324,7 +1330,7 @@ This is a system API and cannot be called by third-party applications.
getOsAccountTypeFromProcess(callback: AsyncCallback&lt;OsAccountType&gt;): void getOsAccountTypeFromProcess(callback: AsyncCallback&lt;OsAccountType&gt;): void
Obtains the type of the OS account to which the current process belongs. This method uses an asynchronous callback to return the result. Obtains the type of the OS account to which the current process belongs. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -1348,11 +1354,11 @@ Obtains the type of the OS account to which the current process belongs. This me ...@@ -1348,11 +1354,11 @@ Obtains the type of the OS account to which the current process belongs. This me
getOsAccountTypeFromProcess(): Promise&lt;OsAccountType&gt; getOsAccountTypeFromProcess(): Promise&lt;OsAccountType&gt;
Obtains the type of the OS account to which the current process belongs. This method uses a promise to return the result. Obtains the type of the OS account to which the current process belongs. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :--------------------------------------------- | :----------------------------------------------------------- | | :--------------------------------------------- | :----------------------------------------------------------- |
...@@ -1373,7 +1379,7 @@ Obtains the type of the OS account to which the current process belongs. This me ...@@ -1373,7 +1379,7 @@ Obtains the type of the OS account to which the current process belongs. This me
getDistributedVirtualDeviceId(callback: AsyncCallback&lt;string&gt;): void getDistributedVirtualDeviceId(callback: AsyncCallback&lt;string&gt;): void
Obtains the ID of this distributed virtual device. This method uses an asynchronous callback to return the result. Obtains the ID of this distributed virtual device. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
...@@ -1399,13 +1405,13 @@ Obtains the ID of this distributed virtual device. This method uses an asynchron ...@@ -1399,13 +1405,13 @@ Obtains the ID of this distributed virtual device. This method uses an asynchron
getDistributedVirtualDeviceId(): Promise&lt;string&gt; getDistributedVirtualDeviceId(): Promise&lt;string&gt;
Obtains the ID of this distributed virtual device. This method uses a promise to return the result. Obtains the ID of this distributed virtual device. This API uses a promise to return the result.
**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS **Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -1426,7 +1432,7 @@ Obtains the ID of this distributed virtual device. This method uses a promise to ...@@ -1426,7 +1432,7 @@ Obtains the ID of this distributed virtual device. This method uses a promise to
getOsAccountProfilePhoto(localId: number, callback: AsyncCallback&lt;string&gt;): void getOsAccountProfilePhoto(localId: number, callback: AsyncCallback&lt;string&gt;): void
Obtains the profile photo of an OS account. This method uses an asynchronous callback to return the result. Obtains the profile photo of an OS account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1456,7 +1462,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1456,7 +1462,7 @@ This is a system API and cannot be called by third-party applications.
getOsAccountProfilePhoto(localId: number): Promise&lt;string&gt; getOsAccountProfilePhoto(localId: number): Promise&lt;string&gt;
Obtains the profile photo of an OS account. This method uses a promise to return the result. Obtains the profile photo of an OS account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1470,7 +1476,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1470,7 +1476,7 @@ This is a system API and cannot be called by third-party applications.
| ------- | ------ | ---- | ------------ | | ------- | ------ | ---- | ------------ |
| localId | number | Yes | ID of the target OS account.| | localId | number | Yes | ID of the target OS account.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -1492,7 +1498,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1492,7 +1498,7 @@ This is a system API and cannot be called by third-party applications.
setOsAccountProfilePhoto(localId: number, photo: string, callback: AsyncCallback&lt;void&gt;): void setOsAccountProfilePhoto(localId: number, photo: string, callback: AsyncCallback&lt;void&gt;): void
Sets a profile photo for an OS account. This method uses an asynchronous callback to return the result. Sets a profile photo for an OS account. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1526,7 +1532,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1526,7 +1532,7 @@ This is a system API and cannot be called by third-party applications.
setOsAccountProfilePhoto(localId: number, photo: string): Promise&lt;void&gt; setOsAccountProfilePhoto(localId: number, photo: string): Promise&lt;void&gt;
Sets a profile photo for an OS account. This method uses a promise to return the result. Sets a profile photo for an OS account. This API uses a promise to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1541,7 +1547,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1541,7 +1547,7 @@ This is a system API and cannot be called by third-party applications.
| localId | number | Yes | ID of the target OS account.| | localId | number | Yes | ID of the target OS account.|
| photo | string | Yes | Profile photo information. | | photo | string | Yes | Profile photo information. |
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :------------------ | :---------------------------------- | | :------------------ | :---------------------------------- |
...@@ -1567,7 +1573,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1567,7 +1573,7 @@ This is a system API and cannot be called by third-party applications.
getOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallback&lt;number&gt;): void getOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallback&lt;number&gt;): void
Obtains the OS account ID based on the SN. This method uses an asynchronous callback to return the result. Obtains the OS account ID based on the SN. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -1593,7 +1599,7 @@ Obtains the OS account ID based on the SN. This method uses an asynchronous call ...@@ -1593,7 +1599,7 @@ Obtains the OS account ID based on the SN. This method uses an asynchronous call
getOsAccountLocalIdBySerialNumber(serialNumber: number): Promise&lt;number&gt; getOsAccountLocalIdBySerialNumber(serialNumber: number): Promise&lt;number&gt;
Obtains the OS account ID based on the SN. This method uses a promise to return the result. Obtains the OS account ID based on the SN. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -1603,7 +1609,7 @@ Obtains the OS account ID based on the SN. This method uses a promise to return ...@@ -1603,7 +1609,7 @@ Obtains the OS account ID based on the SN. This method uses a promise to return
| ------------ | ------ | ---- | ---------- | | ------------ | ------ | ---- | ---------- |
| serialNumber | number | Yes | Account SN.| | serialNumber | number | Yes | Account SN.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -1625,7 +1631,7 @@ Obtains the OS account ID based on the SN. This method uses a promise to return ...@@ -1625,7 +1631,7 @@ Obtains the OS account ID based on the SN. This method uses a promise to return
getSerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback&lt;number&gt;): void getSerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback&lt;number&gt;): void
Obtains the SN of an OS account based on the account ID. This method uses an asynchronous callback to return the result. Obtains the SN of an OS account based on the account ID. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -1651,7 +1657,7 @@ Obtains the SN of an OS account based on the account ID. This method uses an asy ...@@ -1651,7 +1657,7 @@ Obtains the SN of an OS account based on the account ID. This method uses an asy
getSerialNumberByOsAccountLocalId(localId: number): Promise&lt;number&gt; getSerialNumberByOsAccountLocalId(localId: number): Promise&lt;number&gt;
Obtains the SN of an OS account based on the account ID. This method uses a promise to return the result. Obtains the SN of an OS account based on the account ID. This API uses a promise to return the result.
**System capability**: SystemCapability.Account.OsAccount **System capability**: SystemCapability.Account.OsAccount
...@@ -1661,7 +1667,7 @@ Obtains the SN of an OS account based on the account ID. This method uses a prom ...@@ -1661,7 +1667,7 @@ Obtains the SN of an OS account based on the account ID. This method uses a prom
| ------- | ------ | ---- | ------------ | | ------- | ------ | ---- | ------------ |
| localId | number | Yes | ID of the target OS account.| | localId | number | Yes | ID of the target OS account.|
**Return Value** **Return value**
| Type | Description | | Type | Description |
| :-------------------- | :----------------------------------------------------------- | | :-------------------- | :----------------------------------------------------------- |
...@@ -1683,7 +1689,7 @@ Obtains the SN of an OS account based on the account ID. This method uses a prom ...@@ -1683,7 +1689,7 @@ Obtains the SN of an OS account based on the account ID. This method uses a prom
on(type: 'activate' | 'activating', name: string, callback: Callback&lt;number&gt;): void on(type: 'activate' | 'activating', name: string, callback: Callback&lt;number&gt;): void
Subscribes to OS account changes. This method uses an asynchronous callback to return the result. Subscribes to OS account changes. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
...@@ -1713,7 +1719,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -1713,7 +1719,7 @@ This is a system API and cannot be called by third-party applications.
off(type: 'activate' | 'activating', name: string, callback?: Callback&lt;number&gt;): void off(type: 'activate' | 'activating', name: string, callback?: Callback&lt;number&gt;): void
Unsubscribes from the OS account changes. This method uses an asynchronous callback to return the result. Unsubscribes from the OS account changes. This API uses an asynchronous callback to return the result.
This is a system API and cannot be called by third-party applications. This is a system API and cannot be called by third-party applications.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册