Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Tonvia
Docs
提交
91476621
D
Docs
项目概览
Tonvia
/
Docs
与 Fork 源项目一致
Fork自
OpenHarmony / Docs
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
91476621
编写于
3月 01, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 01, 2023
浏览文件
操作
浏览文件
下载
差异文件
!14461 帐号api9 dts终审规范性问题整改
Merge pull request !14461 from lichenchen/master
上级
dcd7271f
63671c01
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
512 addition
and
121 deletion
+512
-121
zh-cn/application-dev/reference/apis/js-apis-appAccount.md
zh-cn/application-dev/reference/apis/js-apis-appAccount.md
+3
-3
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
+118
-118
zh-cn/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-account_os_account.md
...logs/OpenHarmony_4.0.3.2/changelogs-account_os_account.md
+391
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-appAccount.md
浏览文件 @
91476621
...
...
@@ -4909,9 +4909,9 @@ checkAccountLabels(name: string, labels: Array<string>, callback: AuthCall
| labels | Array
<
string
>
| 是 | 标签数组。 |
| callback |
[
AuthCallback
](
#authcallback9
)
| 是 | 认证器回调,用于返回检查结果。 |
###
is
AccountRemovable<sup>9+</sup>
###
check
AccountRemovable<sup>9+</sup>
is
AccountRemovable(name: string, callback: AuthCallback): void;
check
AccountRemovable(name: string, callback: AuthCallback): void;
判断帐号是否可以删除,并使用callback异步回调返回结果。
...
...
@@ -4969,7 +4969,7 @@ getRemoteObject(): rpc.RemoteObject;
callback
.
onResult
(
account_appAccount
.
ResultCode
.
SUCCESS
,
result
);
}
is
AccountRemovable
(
name
,
callback
)
{
check
AccountRemovable
(
name
,
callback
)
{
var
result
=
{[
account_appAccount
.
Constants
.
KEY_BOOLEAN_RESULT
]:
true
};
callback
.
onResult
(
account_appAccount
.
ResultCode
.
SUCCESS
,
result
);
}
...
...
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
浏览文件 @
91476621
...
...
@@ -304,13 +304,13 @@ checkOsAccountActivated(localId: number): Promise<boolean>
}
```
### checkConstraintEnabled<sup>9+</sup>
### check
OsAccount
ConstraintEnabled<sup>9+</sup>
checkConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback
<
boolean
>
): void
check
OsAccount
ConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback
<
boolean
>
): void
判断指定系统帐号是否具有指定约束。使用callback异步回调。
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS
或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -337,25 +337,25 @@ checkConstraintEnabled(localId: number, constraint: string, callback: AsyncCallb
let
localId
=
100
;
let
constraint
=
"
constraint.wifi
"
;
try
{
accountManager
.
checkConstraintEnabled
(
localId
,
constraint
,
(
err
,
isEnabled
)
=>
{
accountManager
.
check
OsAccount
ConstraintEnabled
(
localId
,
constraint
,
(
err
,
isEnabled
)
=>
{
if
(
err
)
{
console
.
log
(
"
checkConstraintEnabled failed, error:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
check
OsAccount
ConstraintEnabled failed, error:
"
+
JSON
.
stringify
(
err
));
}
else
{
console
.
log
(
"
checkConstraintEnabled successfully, isEnabled:
"
+
isEnabled
);
console
.
log
(
"
check
OsAccount
ConstraintEnabled successfully, isEnabled:
"
+
isEnabled
);
}
});
}
catch
(
err
)
{
console
.
log
(
"
checkConstraintEnabled exception:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
check
OsAccount
ConstraintEnabled exception:
"
+
JSON
.
stringify
(
err
));
}
```
### checkConstraintEnabled<sup>9+</sup>
### check
OsAccount
ConstraintEnabled<sup>9+</sup>
checkConstraintEnabled(localId: number, constraint: string): Promise
<
boolean
>
check
OsAccount
ConstraintEnabled(localId: number, constraint: string): Promise
<
boolean
>
判断指定系统帐号是否具有指定约束。使用Promise异步回调。
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS
或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -387,13 +387,13 @@ checkConstraintEnabled(localId: number, constraint: string): Promise<boolean&
let
localId
=
100
;
let
constraint
=
"
constraint.wifi
"
;
try
{
accountManager
.
checkConstraintEnabled
(
localId
,
constraint
).
then
((
isEnabled
)
=>
{
console
.
log
(
"
checkConstraintEnabled successfully, isEnabled:
"
+
isEnabled
);
accountManager
.
check
OsAccount
ConstraintEnabled
(
localId
,
constraint
).
then
((
isEnabled
)
=>
{
console
.
log
(
"
check
OsAccount
ConstraintEnabled successfully, isEnabled:
"
+
isEnabled
);
}).
catch
((
err
)
=>
{
console
.
log
(
"
checkConstraintEnabled failed, error:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
check
OsAccount
ConstraintEnabled failed, error:
"
+
JSON
.
stringify
(
err
));
});
}
catch
(
err
)
{
console
.
log
(
"
checkConstraintEnabled exception:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
check
OsAccount
ConstraintEnabled exception:
"
+
JSON
.
stringify
(
err
));
}
```
...
...
@@ -973,9 +973,9 @@ getOsAccountCount(): Promise<number>
}
```
###
queryOsAccountLocalIdFromProcess
<sup>9+</sup>
###
getOsAccountLocalId
<sup>9+</sup>
queryOsAccountLocalIdFromProcess
(callback: AsyncCallback
<
number
>
): void
getOsAccountLocalId
(callback: AsyncCallback
<
number
>
): void
获取当前进程所属的系统帐号ID,使用callback异步回调。
...
...
@@ -998,21 +998,21 @@ queryOsAccountLocalIdFromProcess(callback: AsyncCallback<number>): void
```
js
let
accountManager
=
account_osAccount
.
getAccountManager
();
try
{
accountManager
.
queryOsAccountLocalIdFromProcess
((
err
,
localId
)
=>
{
accountManager
.
getOsAccountLocalId
((
err
,
localId
)
=>
{
if
(
err
)
{
console
.
log
(
"
queryOsAccountLocalIdFromProcess
failed, error:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalId
failed, error:
"
+
JSON
.
stringify
(
err
));
}
else
{
console
.
log
(
"
queryOsAccountLocalIdFromProcess
successfully, localId:
"
+
localId
);
console
.
log
(
"
getOsAccountLocalId
successfully, localId:
"
+
localId
);
}
});
}
catch
(
err
)
{
console
.
log
(
"
queryOsAccountLocalIdFromProcess
exception:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalId
exception:
"
+
JSON
.
stringify
(
err
));
}
```
###
queryOsAccountLocalIdFromProcess
<sup>9+</sup>
###
getOsAccountLocalId
<sup>9+</sup>
queryOsAccountLocalIdFromProcess
(): Promise
<
number
>
getOsAccountLocalId
(): Promise
<
number
>
获取当前进程所属的系统帐号ID,使用Promise异步回调。
...
...
@@ -1035,19 +1035,19 @@ queryOsAccountLocalIdFromProcess(): Promise<number>
```
js
let
accountManager
=
account_osAccount
.
getAccountManager
();
try
{
accountManager
.
queryOsAccountLocalIdFromProcess
().
then
((
localId
)
=>
{
console
.
log
(
"
queryOsAccountLocalIdFromProcess
successfully, localId:
"
+
localId
);
accountManager
.
getOsAccountLocalId
().
then
((
localId
)
=>
{
console
.
log
(
"
getOsAccountLocalId
successfully, localId:
"
+
localId
);
}).
catch
((
err
)
=>
{
console
.
log
(
"
queryOsAccountLocalIdFromProcess
failed, error:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalId
failed, error:
"
+
JSON
.
stringify
(
err
));
});
}
catch
(
err
)
{
console
.
log
(
'
queryOsAccountLocalIdFromProcess
exception:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
getOsAccountLocalId
exception:
'
+
JSON
.
stringify
(
err
));
}
```
###
queryOsAccountLocalIdFrom
Uid<sup>9+</sup>
###
getOsAccountLocalIdFor
Uid<sup>9+</sup>
queryOsAccountLocalIdFrom
Uid(uid: number, callback: AsyncCallback
<
number
>
): void
getOsAccountLocalIdFor
Uid(uid: number, callback: AsyncCallback
<
number
>
): void
根据uid查询对应的系统帐号ID,使用callback异步回调。
...
...
@@ -1073,20 +1073,20 @@ queryOsAccountLocalIdFromUid(uid: number, callback: AsyncCallback<number>)
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
uid
=
12345678
;
try
{
accountManager
.
queryOsAccountLocalIdFrom
Uid
(
uid
,
(
err
,
localId
)
=>
{
accountManager
.
getOsAccountLocalIdFor
Uid
(
uid
,
(
err
,
localId
)
=>
{
if
(
err
)
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Uid failed, error:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalIdFor
Uid failed, error:
"
+
JSON
.
stringify
(
err
));
}
console
.
log
(
"
queryOsAccountLocalIdFrom
Uid successfully, localId:
"
+
localId
);
console
.
log
(
"
getOsAccountLocalIdFor
Uid successfully, localId:
"
+
localId
);
});
}
catch
(
err
)
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Uid exception:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalIdFor
Uid exception:
"
+
JSON
.
stringify
(
err
));
}
```
###
queryOsAccountLocalIdFrom
Uid<sup>9+</sup>
###
getOsAccountLocalIdFor
Uid<sup>9+</sup>
queryOsAccountLocalIdFrom
Uid(uid: number): Promise
<
number
>
getOsAccountLocalIdFor
Uid(uid: number): Promise
<
number
>
根据uid查询对应的系统帐号ID,使用Promise异步回调。
...
...
@@ -1117,19 +1117,19 @@ queryOsAccountLocalIdFromUid(uid: number): Promise<number>
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
uid
=
12345678
;
try
{
accountManager
.
queryOsAccountLocalIdFrom
Uid
(
uid
).
then
((
localId
)
=>
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Uid successfully, localId:
"
+
localId
);
accountManager
.
getOsAccountLocalIdFor
Uid
(
uid
).
then
((
localId
)
=>
{
console
.
log
(
"
getOsAccountLocalIdFor
Uid successfully, localId:
"
+
localId
);
}).
catch
((
err
)
=>
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Uid failed, error:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalIdFor
Uid failed, error:
"
+
JSON
.
stringify
(
err
));
});
}
catch
(
err
)
{
console
.
log
(
'
queryOsAccountLocalIdFrom
Uid exception:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
getOsAccountLocalIdFor
Uid exception:
'
+
JSON
.
stringify
(
err
));
}
```
###
queryOsAccountLocalIdFrom
Domain<sup>9+</sup>
###
getOsAccountLocalIdFor
Domain<sup>9+</sup>
queryOsAccountLocalIdFrom
Domain(domainInfo: DomainAccountInfo, callback: AsyncCallback
<
number
>
): void
getOsAccountLocalIdFor
Domain(domainInfo: DomainAccountInfo, callback: AsyncCallback
<
number
>
): void
根据域帐号信息,获取与其关联的系统帐号ID。使用callback异步回调。
...
...
@@ -1157,21 +1157,21 @@ queryOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCa
let
domainInfo
=
{
domain
:
'
testDomain
'
,
accountName
:
'
testAccountName
'
};
let
accountManager
=
account_osAccount
.
getAccountManager
();
try
{
accountManager
.
queryOsAccountLocalIdFrom
Domain
(
domainInfo
,
(
err
,
localId
)
=>
{
accountManager
.
getOsAccountLocalIdFor
Domain
(
domainInfo
,
(
err
,
localId
)
=>
{
if
(
err
)
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Domain failed, error:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalIdFor
Domain failed, error:
"
+
JSON
.
stringify
(
err
));
}
else
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Domain successfully, localId:
"
+
localId
);
console
.
log
(
"
getOsAccountLocalIdFor
Domain successfully, localId:
"
+
localId
);
}
});
}
catch
(
err
)
{
console
.
log
(
'
queryOsAccountLocalIdFrom
Domain exception:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
getOsAccountLocalIdFor
Domain exception:
'
+
JSON
.
stringify
(
err
));
}
```
###
queryOsAccountLocalIdFrom
Domain<sup>9+</sup>
###
getOsAccountLocalIdFor
Domain<sup>9+</sup>
queryOsAccountLocalIdFrom
Domain(domainInfo: DomainAccountInfo): Promise
<
number
>
getOsAccountLocalIdFor
Domain(domainInfo: DomainAccountInfo): Promise
<
number
>
根据域帐号信息,获取与其关联的系统帐号的帐号ID。使用Promise异步回调。
...
...
@@ -1204,13 +1204,13 @@ queryOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo): Promise<numbe
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
domainInfo
=
{
domain
:
'
testDomain
'
,
accountName
:
'
testAccountName
'
};
try
{
accountManager
.
queryOsAccountLocalIdFrom
Domain
(
domainInfo
).
then
((
localId
)
=>
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Domain successfully, localId:
"
+
localId
);
accountManager
.
getOsAccountLocalIdFor
Domain
(
domainInfo
).
then
((
localId
)
=>
{
console
.
log
(
"
getOsAccountLocalIdFor
Domain successfully, localId:
"
+
localId
);
}).
catch
((
err
)
=>
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Domain failed, error:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalIdFor
Domain failed, error:
"
+
JSON
.
stringify
(
err
));
});
}
catch
(
err
)
{
console
.
log
(
"
queryOsAccountLocalIdFrom
Domain exception:
"
+
JSON
.
stringify
(
err
));
console
.
log
(
"
getOsAccountLocalIdFor
Domain exception:
"
+
JSON
.
stringify
(
err
));
}
```
...
...
@@ -1456,9 +1456,9 @@ queryAllCreatedOsAccounts(): Promise<Array<OsAccountInfo>>
}
```
### getActivatedOsAccountIds<sup>9+</sup>
### getActivatedOsAccount
Local
Ids<sup>9+</sup>
getActivatedOsAccountIds(callback: AsyncCallback
<
Array
<
number
>>
): void
getActivatedOsAccount
Local
Ids(callback: AsyncCallback
<
Array
<
number
>>
): void
查询当前处于激活状态的系统帐号的ID列表。使用callback异步回调。
...
...
@@ -1481,21 +1481,21 @@ getActivatedOsAccountIds(callback: AsyncCallback<Array<number>>): vo
```
js
let
accountManager
=
account_osAccount
.
getAccountManager
();
try
{
accountManager
.
getActivatedOsAccountIds
((
err
,
idArray
)
=>
{
console
.
log
(
'
getActivatedOsAccountIds err:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
getActivatedOsAccountIds idArray length:
'
+
idArray
.
length
);
accountManager
.
getActivatedOsAccount
Local
Ids
((
err
,
idArray
)
=>
{
console
.
log
(
'
getActivatedOsAccount
Local
Ids err:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
getActivatedOsAccount
Local
Ids idArray length:
'
+
idArray
.
length
);
for
(
let
i
=
0
;
i
<
idArray
.
length
;
i
++
)
{
console
.
info
(
'
activated os account id:
'
+
idArray
[
i
]);
}
});
}
catch
(
e
)
{
console
.
log
(
'
getActivatedOsAccountIds exception:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
'
getActivatedOsAccount
Local
Ids exception:
'
+
JSON
.
stringify
(
e
));
}
```
### getActivatedOsAccountIds<sup>9+</sup>
### getActivatedOsAccount
Local
Ids<sup>9+</sup>
getActivatedOsAccountIds(): Promise
<
Array
<
number
>>
getActivatedOsAccount
Local
Ids(): Promise
<
Array
<
number
>>
查询当前处于激活状态的系统帐号的ID列表。使用Promise异步回调。
...
...
@@ -1518,13 +1518,13 @@ getActivatedOsAccountIds(): Promise<Array<number>>
```
js
let
accountManager
=
account_osAccount
.
getAccountManager
();
try
{
accountManager
.
getActivatedOsAccountIds
().
then
((
idArray
)
=>
{
console
.
log
(
'
getActivatedOsAccountIds, idArray:
'
+
idArray
);
accountManager
.
getActivatedOsAccount
Local
Ids
().
then
((
idArray
)
=>
{
console
.
log
(
'
getActivatedOsAccount
Local
Ids, idArray:
'
+
idArray
);
}).
catch
((
err
)
=>
{
console
.
log
(
'
getActivatedOsAccountIds err:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
getActivatedOsAccount
Local
Ids err:
'
+
JSON
.
stringify
(
err
));
});
}
catch
(
e
)
{
console
.
log
(
'
getActivatedOsAccountIds exception:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
'
getActivatedOsAccount
Local
Ids exception:
'
+
JSON
.
stringify
(
e
));
}
```
...
...
@@ -2214,9 +2214,9 @@ setOsAccountProfilePhoto(localId: number, photo: string): Promise<void>
}
```
###
queryOsAccountLocalIdBy
SerialNumber<sup>9+</sup>
###
getOsAccountLocalIdFor
SerialNumber<sup>9+</sup>
queryOsAccountLocalIdBy
SerialNumber(serialNumber: number, callback: AsyncCallback
<
number
>
): void
getOsAccountLocalIdFor
SerialNumber(serialNumber: number, callback: AsyncCallback
<
number
>
): void
通过SN码查询与其关联的系统帐号的帐号ID。使用callback异步回调。
...
...
@@ -2243,7 +2243,7 @@ queryOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallbac
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
serialNumber
=
12345
;
try
{
accountManager
.
queryOsAccountLocalIdBy
SerialNumber
(
serialNumber
,
(
err
,
localId
)
=>
{
accountManager
.
getOsAccountLocalIdFor
SerialNumber
(
serialNumber
,
(
err
,
localId
)
=>
{
console
.
log
(
'
ger localId err:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
get localId:
'
+
localId
+
'
by serialNumber:
'
+
serialNumber
);
});
...
...
@@ -2252,9 +2252,9 @@ queryOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallbac
}
```
###
queryOsAccountLocalIdBy
SerialNumber<sup>9+</sup>
###
getOsAccountLocalIdFor
SerialNumber<sup>9+</sup>
queryOsAccountLocalIdBy
SerialNumber(serialNumber: number): Promise
<
number
>
getOsAccountLocalIdFor
SerialNumber(serialNumber: number): Promise
<
number
>
通过SN码查询与其关联的系统帐号的帐号ID。使用Promise异步回调。
...
...
@@ -2286,19 +2286,19 @@ queryOsAccountLocalIdBySerialNumber(serialNumber: number): Promise<number>
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
serialNumber
=
12345
;
try
{
accountManager
.
queryOsAccountLocalIdBy
SerialNumber
(
serialNumber
).
then
((
localId
)
=>
{
console
.
log
(
'
queryOsAccountLocalIdBy
SerialNumber localId:
'
+
localId
);
accountManager
.
getOsAccountLocalIdFor
SerialNumber
(
serialNumber
).
then
((
localId
)
=>
{
console
.
log
(
'
getOsAccountLocalIdFor
SerialNumber localId:
'
+
localId
);
}).
catch
((
err
)
=>
{
console
.
log
(
'
queryOsAccountLocalIdBy
SerialNumber err:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
getOsAccountLocalIdFor
SerialNumber err:
'
+
JSON
.
stringify
(
err
));
});
}
catch
(
e
)
{
console
.
log
(
'
queryOsAccountLocalIdBy
SerialNumber exception:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
'
getOsAccountLocalIdFor
SerialNumber exception:
'
+
JSON
.
stringify
(
e
));
}
```
###
querySerialNumberBy
OsAccountLocalId<sup>9+</sup>
###
getSerialNumberFor
OsAccountLocalId<sup>9+</sup>
querySerialNumberBy
OsAccountLocalId(localId: number, callback: AsyncCallback
<
number
>
): void
getSerialNumberFor
OsAccountLocalId(localId: number, callback: AsyncCallback
<
number
>
): void
通过系统帐号ID获取与该系统帐号关联的SN码。使用callback异步回调。
...
...
@@ -2325,7 +2325,7 @@ querySerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback<
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
localId
=
100
;
try
{
accountManager
.
querySerialNumberBy
OsAccountLocalId
(
localId
,
(
err
,
serialNumber
)
=>
{
accountManager
.
getSerialNumberFor
OsAccountLocalId
(
localId
,
(
err
,
serialNumber
)
=>
{
console
.
log
(
'
ger serialNumber err:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
get serialNumber:
'
+
serialNumber
+
'
by localId:
'
+
localId
);
});
...
...
@@ -2334,9 +2334,9 @@ querySerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback<
}
```
###
querySerialNumberBy
OsAccountLocalId<sup>9+</sup>
###
getSerialNumberFor
OsAccountLocalId<sup>9+</sup>
querySerialNumberBy
OsAccountLocalId(localId: number): Promise
<
number
>
getSerialNumberFor
OsAccountLocalId(localId: number): Promise
<
number
>
通过系统帐号ID获取与该系统帐号关联的SN码。使用Promise异步回调。
...
...
@@ -2368,13 +2368,13 @@ querySerialNumberByOsAccountLocalId(localId: number): Promise<number>
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
localId
=
100
;
try
{
accountManager
.
querySerialNumberBy
OsAccountLocalId
(
localId
).
then
((
serialNumber
)
=>
{
console
.
log
(
'
querySerialNumberBy
OsAccountLocalId serialNumber:
'
+
serialNumber
);
accountManager
.
getSerialNumberFor
OsAccountLocalId
(
localId
).
then
((
serialNumber
)
=>
{
console
.
log
(
'
getSerialNumberFor
OsAccountLocalId serialNumber:
'
+
serialNumber
);
}).
catch
((
err
)
=>
{
console
.
log
(
'
querySerialNumberBy
OsAccountLocalId err:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
getSerialNumberFor
OsAccountLocalId err:
'
+
JSON
.
stringify
(
err
));
});
}
catch
(
e
)
{
console
.
log
(
'
querySerialNumberBy
OsAccountLocalId exception:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
'
getSerialNumberFor
OsAccountLocalId exception:
'
+
JSON
.
stringify
(
e
));
}
```
...
...
@@ -2462,9 +2462,9 @@ off(type: 'activate' | 'activating', name: string, callback?: Callback<number
}
```
### getBundleIdF
rom
Uid<sup>9+</sup>
### getBundleIdF
or
Uid<sup>9+</sup>
getBundleIdF
rom
Uid(uid: number, callback: AsyncCallback
<
number
>
): void;
getBundleIdF
or
Uid(uid: number, callback: AsyncCallback
<
number
>
): void;
通过uid查询对应的bundleId,使用callback异步回调。
...
...
@@ -2492,17 +2492,17 @@ getBundleIdFromUid(uid: number, callback: AsyncCallback<number>): void;
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
testUid
=
1000000
;
try
{
accountManager
.
getBundleIdF
rom
Uid
(
testUid
,
(
err
,
bundleId
)
=>
{
console
.
info
(
'
getBundleIdF
rom
Uid errInfo:
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
getBundleIdF
rom
Uid bundleId:
'
+
JSON
.
stringify
(
bundleId
));
accountManager
.
getBundleIdF
or
Uid
(
testUid
,
(
err
,
bundleId
)
=>
{
console
.
info
(
'
getBundleIdF
or
Uid errInfo:
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
getBundleIdF
or
Uid bundleId:
'
+
JSON
.
stringify
(
bundleId
));
});
}
catch
(
e
)
{
console
.
info
(
'
getBundleIdF
rom
Uid exception:
'
+
JSON
.
stringify
(
e
));
console
.
info
(
'
getBundleIdF
or
Uid exception:
'
+
JSON
.
stringify
(
e
));
}
```
### getBundleIdF
rom
Uid<sup>9+</sup>
### getBundleIdF
or
Uid<sup>9+</sup>
getBundleIdF
rom
Uid(uid: number): Promise
<
number
>
;
getBundleIdF
or
Uid(uid: number): Promise
<
number
>
;
通过uid查询对应的bundleId,使用Promise异步回调。
...
...
@@ -2535,13 +2535,13 @@ getBundleIdFromUid(uid: number): Promise<number>;
let
accountManager
=
account_osAccount
.
getAccountManager
();
let
testUid
=
1000000
;
try
{
accountManager
.
getBundleIdF
rom
Uid
(
testUid
).
then
((
result
)
=>
{
console
.
info
(
'
getBundleIdF
rom
Uid bundleId:
'
+
JSON
.
stringify
(
result
));
accountManager
.
getBundleIdF
or
Uid
(
testUid
).
then
((
result
)
=>
{
console
.
info
(
'
getBundleIdF
or
Uid bundleId:
'
+
JSON
.
stringify
(
result
));
}).
catch
((
err
)
=>
{
console
.
info
(
'
getBundleIdF
rom
Uid errInfo:
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
getBundleIdF
or
Uid errInfo:
'
+
JSON
.
stringify
(
err
));
});
}
catch
(
e
)
{
console
.
info
(
'
getBundleIdF
rom
Uid exception:
'
+
JSON
.
stringify
(
e
));
console
.
info
(
'
getBundleIdF
or
Uid exception:
'
+
JSON
.
stringify
(
e
));
}
```
...
...
@@ -2620,9 +2620,9 @@ isMainOsAccount(): Promise<boolean>;
console
.
info
(
'
isMainOsAccount exception:
'
+
JSON
.
stringify
(
e
));
}
```
###
query
OsAccountConstraintSourceTypes<sup>9+</sup>
###
get
OsAccountConstraintSourceTypes<sup>9+</sup>
query
OsAccountConstraintSourceTypes(localId: number, constraint: string, callback: AsyncCallback
<
Array
<
ConstraintSourceTypeInfo
>>
): void;
get
OsAccountConstraintSourceTypes(localId: number, constraint: string, callback: AsyncCallback
<
Array
<
ConstraintSourceTypeInfo
>>
): void;
查询指定系统帐号的指定约束来源信息,使用callback异步回调。
...
...
@@ -2653,18 +2653,18 @@ queryOsAccountConstraintSourceTypes(localId: number, constraint: string, callbac
```
js
let
accountManager
=
account_osAccount
.
getAccountManager
();
try
{
accountManager
.
query
OsAccountConstraintSourceTypes
(
100
,
'
constraint.wifi
'
,(
err
,
sourceTypeInfos
)
=>
{
console
.
info
(
'
queryOsAccountConstraintSourceType
errInfo:
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
queryOsAccountConstraintSourceType
sourceTypeInfos:
'
+
JSON
.
stringify
(
sourceTypeInfos
));
accountManager
.
get
OsAccountConstraintSourceTypes
(
100
,
'
constraint.wifi
'
,(
err
,
sourceTypeInfos
)
=>
{
console
.
info
(
'
getOsAccountConstraintSourceTypes
errInfo:
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
getOsAccountConstraintSourceTypes
sourceTypeInfos:
'
+
JSON
.
stringify
(
sourceTypeInfos
));
});
}
catch
(
e
)
{
console
.
info
(
'
queryOsAccountConstraintSourceType
exception:
'
+
JSON
.
stringify
(
e
));
console
.
info
(
'
getOsAccountConstraintSourceTypes
exception:
'
+
JSON
.
stringify
(
e
));
}
```
###
query
OsAccountConstraintSourceTypes<sup>9+</sup>
###
get
OsAccountConstraintSourceTypes<sup>9+</sup>
query
OsAccountConstraintSourceTypes(localId: number, constraint: string): Promise
<
Array
<
ConstraintSourceTypeInfo
>>
;
get
OsAccountConstraintSourceTypes(localId: number, constraint: string): Promise
<
Array
<
ConstraintSourceTypeInfo
>>
;
查询指定系统帐号的指定约束来源信息,使用Promise异步回调。
...
...
@@ -2700,13 +2700,13 @@ queryOsAccountConstraintSourceTypes(localId: number, constraint: string): Promis
```
js
let
accountManager
=
account_osAccount
.
getAccountManager
();
try
{
accountManager
.
query
OsAccountConstraintSourceTypes
(
100
,
'
constraint.wifi
'
).
then
((
result
)
=>
{
console
.
info
(
'
queryOsAccountConstraintSourceType
sourceTypeInfos:
'
+
JSON
.
stringify
(
result
));
accountManager
.
get
OsAccountConstraintSourceTypes
(
100
,
'
constraint.wifi
'
).
then
((
result
)
=>
{
console
.
info
(
'
getOsAccountConstraintSourceTypes
sourceTypeInfos:
'
+
JSON
.
stringify
(
result
));
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryOsAccountConstraintSourceType
errInfo:
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
getOsAccountConstraintSourceTypes
errInfo:
'
+
JSON
.
stringify
(
err
));
});
}
catch
(
e
)
{
console
.
info
(
'
queryOsAccountConstraintSourceType
exception:
'
+
JSON
.
stringify
(
e
));
console
.
info
(
'
getOsAccountConstraintSourceTypes
exception:
'
+
JSON
.
stringify
(
e
));
}
```
...
...
@@ -2852,7 +2852,7 @@ isOsAccountConstraintEnable(localId: number, constraint: string, callback: Async
> **说明:**
>
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[check
ConstraintEnabled](#check
constraintenabled9)。
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[check
OsAccountConstraintEnabled](#checkosaccount
constraintenabled9)。
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS
...
...
@@ -2889,7 +2889,7 @@ isOsAccountConstraintEnable(localId: number, constraint: string): Promise<boo
> **说明:**
>
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[check
ConstraintEnabled](#check
constraintenabled9-1)。
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[check
OsAccountConstraintEnabled](#checkosaccount
constraintenabled9-1)。
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS
...
...
@@ -3158,7 +3158,7 @@ getOsAccountLocalIdFromProcess(callback: AsyncCallback<number>): void
> **说明:**
>
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[
queryOsAccountLocalIdFromProcess](#queryosaccountlocalidfromprocess
9)。
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[
getOsAccountLocalId](#getosaccountlocalid
9)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -3189,7 +3189,7 @@ getOsAccountLocalIdFromProcess(): Promise<number>
> **说明:**
>
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[
queryOsAccountLocalIdFromProcess](#queryosaccountlocalidfromprocess
9-1)。
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[
getOsAccountLocalId](#getosaccountlocalid
9-1)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -3218,7 +3218,7 @@ getOsAccountLocalIdFromUid(uid: number, callback: AsyncCallback<number>):
> **说明:**
>
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[
queryOsAccountLocalIdFromUid](#queryosaccountlocalidfrom
uid9)。
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[
getOsAccountLocalIdForUid](#getosaccountlocalidfor
uid9)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -3251,7 +3251,7 @@ getOsAccountLocalIdFromUid(uid: number): Promise<number>
> **说明:**
>
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[
queryOsAccountLocalIdFromUid](#queryosaccountlocalidfrom
uid9-1)。
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[
getOsAccountLocalIdForUid](#getosaccountlocalidfor
uid9-1)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -3287,7 +3287,7 @@ getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCall
> **说明:**
>
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
queryOsAccountLocalIdFromDomain](#queryosaccountlocalidfrom
domain9)。
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
getOsAccountLocalIdForDomain](#getosaccountlocalidfor
domain9)。
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS
...
...
@@ -3322,7 +3322,7 @@ getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo): Promise<number&
> **说明:**
>
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
queryOsAccountLocalIdFromDomain](#queryosaccountlocalidfrom
domain9-1)。
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
getOsAccountLocalIdForDomain](#getosaccountlocalidfor
domain9-1)。
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS
...
...
@@ -3430,7 +3430,7 @@ queryActivatedOsAccountIds(callback: AsyncCallback<Array<number>>):
> **说明:**
>
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[getActivatedOsAccount
Ids](#getactivatedosaccount
ids9)。
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[getActivatedOsAccount
LocalIds](#getactivatedosaccountlocal
ids9)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -3459,7 +3459,7 @@ queryActivatedOsAccountIds(): Promise<Array<number>>
> **说明:**
>
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[getActivatedOsAccount
Ids](#getactivatedosaccount
ids9-1)。
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[getActivatedOsAccount
LocalIds](#getactivatedosaccountlocal
ids9-1)。
查询当前处于激活状态的系统帐号的ID列表。使用Promise异步回调。
...
...
@@ -3669,7 +3669,7 @@ getOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallback&
> **说明:**
>
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
queryOsAccountLocalIdBySerialNumber](#queryosaccountlocalidby
serialnumber9)。
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
getOsAccountLocalIdForSerialNumber](#getosaccountlocalidfor
serialnumber9)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -3699,7 +3699,7 @@ getOsAccountLocalIdBySerialNumber(serialNumber: number): Promise<number>
> **说明:**
>
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
queryOsAccountLocalIdBySerialNumber](#queryosaccountlocalidby
serialnumber9-1)。
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
getOsAccountLocalIdForSerialNumber](#getosaccountlocalidfor
serialnumber9-1)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -3735,7 +3735,7 @@ getSerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback<nu
> **说明:**
>
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
querySerialNumberByOsAccountLocalId](#queryserialnumberby
osaccountlocalid9)。
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
getSerialNumberForOsAccountLocalId](#getserialnumberfor
osaccountlocalid9)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
@@ -3765,7 +3765,7 @@ getSerialNumberByOsAccountLocalId(localId: number): Promise<number>
> **说明:**
>
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
querySerialNumberByOsAccountLocalId](#queryserialnumberby
osaccountlocalid9-1)。
> 从 API version 8开始支持,从API version 9开始废弃。建议使用[
getSerialNumberForOsAccountLocalId](#getserialnumberfor
osaccountlocalid9-1)。
**系统能力:**
SystemCapability.Account.OsAccount
...
...
zh-cn/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-account_os_account.md
0 → 100644
浏览文件 @
91476621
# 帐号子系统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
>>
;
```
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录