Changed the error code returned when the **createOsAccountForDomain** API is used to create a domain account that already exists from **12300001** to **12300004**.
Changed the error code returned when the domain account created by **createOsAccountForDomain()** already exists from **12300001** to **12300004**.
The error information is changed from a common system error to an error indicating that the account already exists.
Changed the error information from "common system error" to "The account already exists".
**Change Impacts**
**Change Impact**
The application developed based on earlier versions needs to adapt the new error code. Otherwise, the original service logic will be affected.
The application developed based on earlier versions needs to adapt the new error code. Otherwise, the original service logic will be affected.
...
@@ -16,11 +16,10 @@ The application developed based on earlier versions needs to adapt the new error
...
@@ -16,11 +16,10 @@ The application developed based on earlier versions needs to adapt the new error
**Adaptation Guide**
**Adaptation Guide**
The sample code for returning an error when a domain account is repeatedly created is as follows:
Removed the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission that is originally required for an application to call **getAllAccounts()** to obtain accessible accounts.
**Change Impact**
From this version, applications do not need the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission when calling **getAllAccounts()**.
Removed the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission that is originally required for an application to call **getAccountsByOwner()** to obtain the accessible accounts based on the account owner .
**Change Impact**
From this version, applications do not need the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission when calling **getAccountsByOwner()**.
The following is the sample code for an application to obtain the accessible accounts based on the account owner without the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission:
Moved **Filter** from **@ohos.fileio** to **@ohos.file.fs**. The attributes of **Filter** remain unchanged.
**Change Impact**
If your application is developed using the APIs of earlier versions, note that the position of **Filter** in the **d.ts** file and the module name are changed. The **Filter** type is moved to **@ohos.file.fs**.
**Key API/Component Changes**
Before the change, **Filter** is in the **@ohos.fileio** module and imported as follows:
```js
importFilterfrom'@ohos.fileio';
```
**Adaptation Guide**
Now, **Filter** is in the **@ohos.file.fs** module and imported as follows:
## cl.account_os_account.1 OsAccountInfo.type Value Type Change
## cl.account_os_account.1 OsAccountInfo.type Value Type Change
Changed the value type of **OsAccountInfo.type** from **Object** to **OsAccountType** enumeration.
Changed the value type of **OsAccountInfo.type** from object to **OsAccountType** enum.
**Change Impacts**
**Change Impact**
The mode for reading the **OsAccountInfo.type** value needs to be changed for the application developed based on earlier versions. Otherwise, the original service logic will be affected.
The mode for reading the **OsAccountInfo.type** value needs to be changed for the application developed based on earlier versions. Otherwise, the original service logic will be affected.
...
@@ -33,25 +33,25 @@ The following APIs are involved:
...
@@ -33,25 +33,25 @@ The following APIs are involved: