提交 12623491 编写于 作者: zyjhandsome's avatar zyjhandsome

Merge branch 'master' of https://gitee.com/openharmony/docs

# 帐号子系统changeLog
## cl.account_os_account.1 createOsAccountForDomain错误码变更
使用createOsAccountForDomain重复创建域帐号时,变更前返回的错误码为12300001,变更后返回的错误码为12300004。
错误信息由通用系统报错细化为帐号已存在报错。
**变更影响**
基于此前版本开发的应用,需适配变更后的错误码,否则会影响原有业务逻辑。
**关键接口/组件变更**
- AccountManager
- createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, callback: AsyncCallback<OsAccountInfo>);
- createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo): Promise<OsAccountInfo>;
**适配指导**
重复创建域帐号的示例代码如下:
```ts
import account_osAccount from "@ohos.account.osAccount"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
let accountMgr = account_osAccount.getAccountManager();
let domainInfo = {
accountName: "zhangsan",
domain: "china.example.com"
};
try {
await accountMgr.createOsAccountForDomain(account_osAccount.OsAccountType.NORMAL, domainInfo);
await accountMgr.createOsAccountForDomain(account_osAccount.OsAccountType.NORMAL, domainInfo);
} catch (err) {
expect(err.code).assertEqual(12300004);
}
```
# 包管理子系统ChangeLog
## cl.bundlemanager.1 底层能力变更,安装应用时增加签名证书中bundle-name的校验,需要与应用的bundleName相同,否则会安装失败。
安装应用时增加了对[签名证书profile文件](../../../application-dev/security/app-provision-structure.md)中bundle-name字段的校验,该字段内容需要配置为对应应用的bundleName。
如果bundle-name的内容与应用配置文件中的bundleName不一致,会出现安装失败。具体报错为:
```
error: verify signature failed.
```
**变更影响**<br>
对之前的版本镜像无影响,对使用3.2.10.5版本及之后的系统镜像,如果未修改签名证书中的bundle-name字段,会出现应用安装失败问题。
**关键的接口/组件变更**<br>
不涉及接口及组件变更
**适配指导**<br>
原有应用在新的系统镜像上出现'error: verify signature failed',可以修改签名证书profile文件中的bundle-name为对应应用的bundleName,生成新的签名证书(后缀为.p7b),重新给应用签名即可。
签名工具及签名证书的生成方式可以参考:[签名工具指导](../../../application-dev/security/hapsigntool-guidelines.md)
## cl.bundlemanager.2 底层能力变更,增加对无图标应用的管控,如果应用未配置入口图标,则会在桌面上显示一个默认图标,点击后跳转至应用详情页。
增加对无图标应用的管控,如果应用未配置入口图标且未申请隐藏图标特权(AllowHideDesktopIcon),则会在桌面上显示一个默认图标,点击后跳转至应用详情页。此处的未配置入口图标规则如下:
1. 应用中未配置abilities字段
2. 应用中配置了abilities字段,但是没有任何一个page类型的ability中skills如下,即同时包含"action.system.home"和"entity.system.home":
```json
"skills": [
{
"actions": [
"action.system.home"
],
"entities": [
"entity.system.home"
]
}
]
```
对于符合上面规则的应用,均属于无图标应用,通过hdc_std install 或者 bm install的方式安装,均会在桌面上显示一个默认图标。
如果应用不需要再桌面显示图标,需要申请相应的隐藏图标特权AllowHideDesktopIcon,并在签名证书文件中或者白名单(install_list_capability.json)配置,可以参考:[应用特权配置指南](../../../device-dev/subsystems/subsys-app-privilege-config-guide.md)
如果应该需要在桌面显示图标,则需要在abilities中选择一个ability配置skills,同时包含"action.system.home"和"entity.system.home"。
**变更影响**<br>
对之前的版本镜像无影响,对使用3.2.10.5版本及之后的系统镜像,如果应用未配置图标,通过命令行的安装方式会在桌面显示默认图标。
**关键的接口/组件变更**<br>
不涉及接口及组件变更
**适配指导**<br>
如果应用不需要再桌面显示图标,需要申请相应的隐藏图标特权AllowHideDesktopIcon,并在签名证书文件中或者白名单(install_list_capability.json)配置,可以参考:[应用特权配置指南](../../../device-dev/subsystems/subsys-app-privilege-config-guide.md)
如果应该需要在桌面显示图标,则需要在abilities中选择一个ability配置skills,同时包含"action.system.home"和"entity.system.home"。
## cl.bundlemanager.3 底层能力变更,特权AllowAppUsePrivilegeExtension、AllowAppMultiProcess和AllowFormVisibleNotify不支持通过签名证书配置,仅支持通过白名单install_list_capability.json申请这三个特权。
特权AllowAppUsePrivilegeExtension、AllowAppMultiProcess和AllowFormVisibleNotify不支持通过签名证书配置,仅支持通过白名单install_list_capability.json申请这三个特权。对于在签名证书中申请使用上面三个特权的应用,在新版本上可能出现安装失败或者配置特权无效的问题。
如果出现了下面的报错,可能是因为特权整改导致的,应用需要适配新的规则,可以参考:[应用特权配置指南](../../../device-dev/subsystems/subsys-app-privilege-config-guide.md)
```
error: install parse profile prop check error.
```
对于xts或者本地调试的demo,无法修改板子上install_list_capability.json的,可以修改应用的bundleName,需要以"com.acts."为开头,同时在签名证书中申请对应的特权。
申请特权AllowAppUsePrivilegeExtension,通常是在应用的配置文件中使用了extensionAbilities字段,且其中的type属性为dataShare或者service。如果未配置特权,就会出现安装失败问题。
**变更影响**<br>
对之前的版本镜像无影响,对使用3.2.10.5版本及之后的系统镜像,如果未在白名单install_list_capability.json中申请所需的特权,可能会出现应用安装失败问题。
**关键的接口/组件变更**<br>
不涉及接口及组件变更
**适配指导**<br>
如果出现了下面的报错,可能是因为特权整改导致的,应用需要适配新的规则,可以参考:[应用特权配置指南](../../../device-dev/subsystems/subsys-app-privilege-config-guide.md)
```
error: install parse profile prop check error.
```
对于xts或者本地调试的demo,无法修改板子上install_list_capability.json的,可以修改应用的bundleName,需要以"com.acts."为开头,同时在签名证书中申请对应的特权。
\ No newline at end of file
# 用户IAM子系统Changelog
## cl.useriam.1 API9返回值命名变更
用户IAM API9的返回值枚举类类名发生变更,从 ResultCodeV9 更名为 UserAuthResultCode
**变更影响**
基于此版本以前开发的应用不受影响,以后的需适配错误码的类名,否则会影响业务逻辑。
**关键接口/组件变更**
无接口/组件变更
**适配指导**
需要修改返回值调用类名从 ResultCodeV9 改为 UserAuthResultCode
\ No newline at end of file
# 帐号子系统changeLog
## cl.account_os_account.1 系统帐号OsAccountInfo.type取值类型变更
变更前,OsAccountInfo.type取值的实际类型为Object,与d.ts中声明的OsAccountType枚举类型不一致;变更后,OsAccountInfo.type取值的实际类型为OsAccountType枚举。
**变更影响**
基于此前版本开发的应用,需变更OsAccountInfo.type值的读取方式,否则影响原因业务逻辑。
**关键接口/组件变更**
涉及的接口:
- AccountManager
- queryAllCreatedOsAccounts(callback: AsyncCallback&lt;Array&lt;OsAccountInfo&gt;&gt;): void;
- queryAllCreatedOsAccounts(): Promise&lt;Array&lt;OsAccountInfo&gt;&gt;;
- createOsAccount(localName: string, type: OsAccountType, callback: AsyncCallback&lt;OsAccountInfo&gt;): void;
- createOsAccount(localName: string, type: OsAccountType): Promise&lt;OsAccountInfo&gt;;
- createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, callback: AsyncCallback&lt;OsAccountInfo&gt;): void;
- createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo): Promise&lt;OsAccountInfo&gt;;
- queryCurrentOsAccount(callback: AsyncCallback&lt;OsAccountInfo&gt;): void;
- queryCurrentOsAccount(): Promise&lt;OsAccountInfo&gt;;
- getCurrentOsAccount(callback: AsyncCallback&lt;OsAccountInfo&gt;): void;
- getCurrentOsAccount(): Promise&lt;OsAccountInfo&gt;;
- queryOsAccountById(localId: number, callback: AsyncCallback&lt;OsAccountInfo&gt;): void;
- queryOsAccountById(localId: number): Promise&lt;OsAccountInfo&gt;;
- getOsAccountTypeFromProcess(callback: AsyncCallback&lt;OsAccountType&gt;): void;
- getOsAccountTypeFromProcess(): Promise&lt;OsAccountType&gt;;
- getOsAccountType(callback: AsyncCallback&lt;OsAccountType&gt;): void;
- getOsAccountType(): Promise&lt;OsAccountType&gt;;
**适配指导**
```ts
import account_osAccount from "@ohos.account.osAccount"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
let accountMgr = account_osAccount.getAccountManager();
accountMgr.createOsAccount('account_test', account_osAccount.OsAccountType.GUEST).then((accountInfo) => {
expect(accountInfo.type).assertEqual(account_osAccount.OsAccountType.GUEST);
accountMgr.activateOsAccount(accountInfo.localId).then(() => {
console.log('activateOsAccount successfully');
accountMgr.getOsAccountTypeFromProcess().then((accountType) => {
expect(accountType).assertEqual(account_osAccount.OsAccountType.GUEST);
}).catch((err) => {
console.log('activateOsAccount err: ' + JSON.stringify(err));
expect().assertFail();
});
}).catch((err) => {
console.log('activateOsAccount err: ' + JSON.stringify(err));
expect().assertFail();
});
}).catch((err) => {
console.log('createOsAccount err: ' + JSON.stringify(err));
expect().assertFail();
});
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册