1# Account Subsystem Changelog 2 3## cl.account_os_account.1 Deprecation of Some osAccount APIs 4 5**Access Level** 6 7Public APIs 8 9**Reason for Change** 10 11The APIs can be called only by system applications. 12 13**Change Impact** 14 15This change has no impact on system applications. For third-party applications, error code 202 will be thrown if the deprecated APIs are called in OpenHarmony_4.1.3.5 or later; error code 201 will be thrown if the deprecated APIs are called in an earlier version. 16 17**API Level** 18 199 20 21**Change Since** 22 23OpenHarmony SDK OpenHarmony_4.1.3.5 24 25**Deprecated APIs/Components** 26 27Involved APIs: 28 29interface/sdk-js/api/@ohos.account.osAccount.d.ts: 30 31```js 32 checkOsAccountActivated(localId: number, callback: AsyncCallback<boolean>): void; 33 checkOsAccountActivated(localId: number): Promise<boolean>; 34 35 checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback<boolean>): void; 36 checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise<boolean>; 37 38 checkOsAccountVerified(localId: number, callback: AsyncCallback<boolean>): void; 39 checkOsAccountVerified(localId: number): Promise<boolean>; 40 41 getOsAccountConstraints(localId: number, callback: AsyncCallback<Array<string>>): void; 42 getOsAccountConstraints(localId: number): Promise<Array<string>>; 43 44 getCurrentOsAccount(callback: AsyncCallback<OsAccountInfo>): void; 45 getCurrentOsAccount(): Promise<OsAccountInfo>; 46``` 47 48After the change: 49 50All the above APIs are deprecated, without substitute APIs. 51 52**Adaptation Guide** 53 54No adaptation is required for system applications. If a third-party application calls the deprecated APIs, error code 202 and related processing logic need to be provided. 55 56 57## cl.account_os_account.2 Deprecation of Some osAccount APIs 58 59**Access Level** 60 61Public APIs 62 63**Reason for Change** 64 65- The APIs have spelling errors. 66 67- Similar APIs are defined in different formats. 68 69**Change Impact** 70 71The deprecated APIs will not be maintained after five versions. Use substitute APIs. 72 73**API Level** 74 75checkOsAccountVerified (9) 76 77isVerified (8) 78 79isActived (8) 80 81**Change Since** 82 83OpenHarmony SDK OpenHarmony_4.1.3.5 84 85**Deprecated APIs/Components** 86 87Deprecated APIs: 88 89interface/sdk-js/api/@ohos.account.osAccount.d.ts: 90 91```js 92 checkOsAccountVerified(callback: AsyncCallback<boolean>): void; 93 checkOsAccountVerified(): Promise<boolean>; 94``` 95Substitute API: 96```js 97 isOsAccountUnlocked(): Promise<boolean>; 98``` 99 100Deprecated APIs: 101```js 102 interface OsAccountInfo { 103 ... 104 isVerified: boolean; 105 isActived: boolean; 106 ... 107 } 108``` 109Substitute APIs: 110```js 111 interface OsAccountInfo { 112 ... 113 isUnlocked: boolean; 114 isActivated: boolean; 115 ... 116 } 117``` 118 119**Adaptation Guide** 120 121Since API version 11, use the substitute APIs. 122