You need to sign in or sign up before continuing.
changelogs-account_os_account.md 10.2 KB
Newer Older
C
cclicn 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
# 帐号子系统ChangeLog

OpenHarmony4.0.3.2版本相较于OpenHarmony之前的版本,帐号模块的API变更如下。

## cl.account_os_account.1 应用帐号isAccountRemovable命名变更

类Authenticator中的成员函数isAccountRemovable由于命名不统一问题,名称变更为checkAccountRemovable。

**变更影响**

类Authenticator中的成员函数isAccountRemovable,在4.0.3.2版本及后续版本中无法继续正常使用,由checkAccountRemovable代替。

**关键的接口/组件变更**

- 涉及接口
  ```ts
  class Authenticator {
    ...
    isAccountRemovable
    ...
  }
  ```
- 变更前:

  ```ts
  class Authenticator {
    ...
    /**
    * Checks whether the specified account can be removed.
    * @param name Indicates the account name.
    * @param callback Indicates the authenticator callback.
    * @returns void.
    * @since 9
    */
    isAccountRemovable(name: string, callback: AuthCallback): void;
    ...
  }
  ```

- 变更后:

  ```ts
  class Authenticator {
    ...
    /**
    * Checks whether the specified account can be removed.
    * @param name Indicates the account name.
    * @param callback Indicates the authenticator callback.
    * @returns void.
    * @since 9
    */
    checkAccountRemovable(name: string, callback: AuthCallback): void;
    ...
  }
  ```

## cl.account_os_account.2 系统帐号checkConstraintEnabled命名变更

checkConstraintEnabled由于命名不统一问题,名称变更为checkOsAccountConstraintEnabled。

**变更影响**

checkConstraintEnabled接口,在4.0.3.2版本及后续版本中无法继续正常使用,由checkOsAccountConstraintEnabled代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  checkConstraintEnabled
  ...
}
```

- 变更前:

  ```ts
  checkConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback<boolean>): void;
  checkConstraintEnabled(localId: number, constraint: string): Promise<boolean>;
  ```

- 变更后:

  ```ts
  checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback<boolean>): void;
  checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise<boolean>;
  ```

## cl.account_os_account.3 系统帐号checkOsAccountConstraintEnabled权限场景变更

checkOsAccountConstraintEnabled接口的权限管控新增可选权限:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS。

**变更影响**

在4.0.3.2版本及后续版本中,应用申请ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS权限亦可调用checkOsAccountConstraintEnabled,
切此前版本申请ohos.permission.MANAGE_LOCAL_ACCOUNTS权限的不影响使用

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  checkOsAccountConstraintEnabled
  ...
}
```

- 变更前:

  ```ts
  ...
  * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
  ...
  checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback<boolean>): void;
  checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise<boolean>;
  ```

- 变更后:

  ```ts
  ...
  * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
  ...
  checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback<boolean>): void;
  checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise<boolean>;
  ```

## cl.account_os_account.4 系统帐号queryOsAccountLocalIdFromProcessd命名变更

queryOsAccountLocalIdFromProcess由于命名不统一问题,名称变更为getOsAccountLocalId。

**变更影响**

queryOsAccountLocalIdFromProcess接口,在4.0.3.2版本及后续版本中无法继续正常使用,由getOsAccountLocalId代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  queryOsAccountLocalIdFromProcess
  ...
}
```
- 变更前:

  ```ts
  queryOsAccountLocalIdFromProcess(callback: AsyncCallback<number>): void;
  queryOsAccountLocalIdFromProcess(): Promise<number>;
  ```

- 变更后:

  ```ts
  getOsAccountLocalId(callback: AsyncCallback<number>): void;
  getOsAccountLocalId(): Promise<number>;
  ```

## cl.account_os_account.5 系统帐号queryOsAccountLocalIdFromUid命名变更

queryOsAccountLocalIdFromUid由于命名不统一问题,名称变更为getOsAccountLocalIdForUid。

**变更影响**

queryOsAccountLocalIdFromUid接口,在4.0.3.2版本及后续版本中无法继续正常使用,由getOsAccountLocalIdForUid代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  queryOsAccountLocalIdFromUid
  ...
}
```

- 变更前:

  ```ts
  queryOsAccountLocalIdFromUid(uid: number, callback: AsyncCallback<number>): void;
  queryOsAccountLocalIdFromUid(uid: number): Promise<number>;
  ```

- 变更后:

  ```ts
  getOsAccountLocalIdForUid(uid: number, callback: AsyncCallback<number>): void;
  getOsAccountLocalIdForUid(uid: number): Promise<number>;
  ```

## cl.account_os_account.6 系统帐号queryOsAccountLocalIdFromDomain命名变更

queryOsAccountLocalIdFromDomain由于命名不统一问题,名称变更为getOsAccountLocalIdForDomain。

**变更影响**

queryOsAccountLocalIdFromDomain接口,在4.0.3.2版本及后续版本中无法继续正常使用,由getOsAccountLocalIdForDomain代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  queryOsAccountLocalIdFromDomain
  ...
}
```

- 变更前:

  ```ts
  queryOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback<number>): void;
  queryOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo): Promise<number>;
  ```

- 变更后:

  ```ts
  getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback<number>): void;
  getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo): Promise<number>;
  ```

## cl.account_os_account.7 系统帐号getActivatedOsAccountIds命名变更

getActivatedOsAccountIds由于命名不统一问题,名称变更为getActivatedOsAccountLocalIds。

**变更影响**

getActivatedOsAccountIds接口,在4.0.3.2版本及后续版本中无法继续正常使用,由getActivatedOsAccountLocalIds代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  getActivatedOsAccountIds
  ...
}
```

- 变更前:

  ```ts
  getActivatedOsAccountIds(callback: AsyncCallback<Array<number>>): void;
  getActivatedOsAccountIds(): Promise<Array<number>>;
  ```

- 变更后:

  ```ts
  getActivatedOsAccountLocalIds(callback: AsyncCallback<Array<number>>): void;
  getActivatedOsAccountLocalIds(): Promise<Array<number>>;
  ```

## cl.account_os_account.8 系统帐号queryOsAccountLocalIdBySerialNumber命名变更

queryOsAccountLocalIdBySerialNumber由于命名不统一问题,名称变更为getOsAccountLocalIdForSerialNumber。

**变更影响**

queryOsAccountLocalIdBySerialNumber接口,在4.0.3.2版本及后续版本中无法继续正常使用,由getOsAccountLocalIdForSerialNumber代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  queryOsAccountLocalIdBySerialNumber
  ...
}
```

- 变更前:

  ```ts
  queryOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallback<number>): void;
  queryOsAccountLocalIdBySerialNumber(serialNumber: number): Promise<number>;
  ```

- 变更后:

  ```ts
  getOsAccountLocalIdForSerialNumber(serialNumber: number, callback: AsyncCallback<number>): void;
  getOsAccountLocalIdForSerialNumber(serialNumber: number): Promise<number>;
  ```

## cl.account_os_account.9 系统帐号querySerialNumberByOsAccountLocalId命名变更

querySerialNumberByOsAccountLocalId由于命名不统一问题,名称变更为getSerialNumberForOsAccountLocalId。

**变更影响**

querySerialNumberByOsAccountLocalId接口,在4.0.3.2版本及后续版本中无法继续正常使用,由getSerialNumberForOsAccountLocalId代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  querySerialNumberByOsAccountLocalId
  ...
}
```

- 变更前:

  ```ts
  querySerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback<number>): void;
  querySerialNumberByOsAccountLocalId(localId: number): Promise<number>;
  ```

- 变更后:

  ```ts
  getSerialNumberForOsAccountLocalId(localId: number, callback: AsyncCallback<number>): void;
  getSerialNumberForOsAccountLocalId(localId: number): Promise<number>;
  ```

## cl.account_os_account.10 系统帐号getBundleIdFromUid命名变更

getBundleIdFromUid由于命名不统一问题,名称变更为getBundleIdForUid。

**变更影响**

getBundleIdFromUid接口,在4.0.3.2版本及后续版本中无法继续正常使用,由getBundleIdForUid代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  getBundleIdFromUid
  ...
}
```

- 变更前:

  ```ts
  getBundleIdFromUid(uid: number, callback: AsyncCallback<number>): void;
  getBundleIdFromUid(uid: number): Promise<number>;
  ```

- 变更后:

  ```ts
  getBundleIdForUid(uid: number, callback: AsyncCallback<number>): void;
  getBundleIdForUid(uid: number): Promise<number>;
  ```

## cl.account_os_account.11 系统帐号queryOsAccountConstraintSourceTypes命名变更

queryOsAccountConstraintSourceTypes由于命名不统一问题,名称变更为getOsAccountConstraintSourceTypes。

**变更影响**

queryOsAccountConstraintSourceTypes接口,在4.0.3.2版本及后续版本中无法继续正常使用,由getOsAccountConstraintSourceTypes代替。

**关键的接口/组件变更**

- 涉及接口
```
interface AccountManager {
  ...
  queryOsAccountConstraintSourceTypes
  ...
}
```

- 变更前:

  ```ts
  queryOsAccountConstraintSourceTypes(localId: number, constraint: string, callback: AsyncCallback<Array<ConstraintSourceTypeInfo>>): void;
  queryOsAccountConstraintSourceTypes(localId: number, constraint: string): Promise<Array<ConstraintSourceTypeInfo>>;
  ```

- 变更后:

  ```ts
  getOsAccountConstraintSourceTypes(localId: number, constraint: string, callback: AsyncCallback<Array<ConstraintSourceTypeInfo>>): void;
  getOsAccountConstraintSourceTypes(localId: number, constraint: string): Promise<Array<ConstraintSourceTypeInfo>>;
  ```