Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
6214e067
D
Docs
项目概览
OpenHarmony
/
Docs
接近 2 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
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看板
提交
6214e067
编写于
10月 09, 2022
作者:
L
liwuli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
定制子系统错误码整改
Signed-off-by:
N
liwuli
<
liwuli@huawei.com
>
上级
c5c3f349
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
301 addition
and
46 deletion
+301
-46
zh-cn/application-dev/reference/apis/js-apis-enterprise-device-manager.md
...n-dev/reference/apis/js-apis-enterprise-device-manager.md
+166
-46
zh-cn/application-dev/reference/apis/js-apis-enterpriseDeviceManager-DeviceSettingsManager.md
.../js-apis-enterpriseDeviceManager-DeviceSettingsManager.md
+17
-0
zh-cn/application-dev/reference/errorcodes/errorcode-EnterpriseDeviceManager.md
...reference/errorcodes/errorcode-EnterpriseDeviceManager.md
+118
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-enterprise-device-manager.md
浏览文件 @
6214e067
...
...
@@ -14,7 +14,7 @@ import enterpriseDeviceManager from '@ohos.enterpriseDeviceManager';
## enterpriseDeviceManager.enableAdmin
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback
\<
boolean
>): void
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback
\<
void
>): void
以异步方法根据给定的包名和类名激活设备管理员应用,使用Callback形式返回是否激活成功。
...
...
@@ -29,7 +29,17 @@ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callba
| admin |
[
Want
](
js-apis-application-Want.md
)
| 是 | 设备管理员应用 |
| enterpriseInfo |
[
EnterpriseInfo
](
#enterpriseinfo
)
| 是 | 设备管理员应用的企业信息 |
| type |
[
AdminType
](
#admintype
)
| 是 | 激活的设备管理员类型 |
| callback | AsyncCallback
\<
boolean> | 是 | callback方式返回是否激活成功 |
| callback | AsyncCallback
\<
void> | 是 | callback方式返回是否激活成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | --------------------------------------------------------------- |
| 9200003 | The administrator ability component is invalid. |
| 9200004 | Failed to activate the administrator application of the device. |
| 9200007 | The system ability work abnormally. |
**示例**
:
...
...
@@ -42,18 +52,18 @@ let enterpriseInfo = {
name
:
"
enterprise name
"
,
description
:
"
enterprise description
"
}
enterpriseDeviceManager
.
enableAdmin
(
wantTemp
,
enterpriseInfo
,
enterpriseDeviceManager
.
AdminType
.
ADMIN_TYPE_NORMAL
,
(
error
,
result
)
=>
{
enterpriseDeviceManager
.
enableAdmin
(
wantTemp
,
enterpriseInfo
,
enterpriseDeviceManager
.
AdminType
.
ADMIN_TYPE_NORMAL
,
error
=>
{
if
(
error
!=
null
)
{
console
.
log
(
"
error occurs
"
+
error
);
return
;
}
console
.
log
(
"
result is
"
+
result
);
console
.
log
(
"
enableAdmin success
"
);
});
```
## enterpriseDeviceManager.enableAdmin
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback
\<
boolean
>): void
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback
\<
void
>): void
以异步方法根据给定的包名和类名激活设备管理员应用,使用Callback形式返回是否激活成功。
...
...
@@ -69,7 +79,17 @@ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId
| enterpriseInfo |
[
EnterpriseInfo
](
#enterpriseinfo
)
| 是 | 设备管理员应用的企业信息 |
| type |
[
AdminType
](
#admintype
)
| 是 | 激活的设备管理员类型 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| callback | AsyncCallback
\<
boolean> | 是 | callback方式返回是否激活成功 |
| callback | AsyncCallback
\<
void> | 是 | callback方式返回是否激活成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | --------------------------------------------------------------- |
| 9200003 | The administrator ability component is invalid. |
| 9200004 | Failed to activate the administrator application of the device. |
| 9200007 | The system ability work abnormally. |
**示例**
:
...
...
@@ -82,18 +102,18 @@ let enterpriseInfo = {
name
:
"
enterprise name
"
,
description
:
"
enterprise description
"
}
enterpriseDeviceManager
.
enableAdmin
(
wantTemp
,
enterpriseInfo
,
enterpriseDeviceManager
.
AdminType
.
ADMIN_TYPE_NORMAL
,
100
,
(
error
,
result
)
=>
{
enterpriseDeviceManager
.
enableAdmin
(
wantTemp
,
enterpriseInfo
,
enterpriseDeviceManager
.
AdminType
.
ADMIN_TYPE_NORMAL
,
100
,
error
=>
{
if
(
error
!=
null
)
{
console
.
log
(
"
error occurs
"
+
error
);
return
;
}
console
.
log
(
"
result is
"
+
result
);
console
.
log
(
"
enableAdmin success
"
);
});
```
## enterpriseDeviceManager.enableAdmin
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise
\<
boolean
>
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise
\<
void
>
以异步方法根据给定的包名和类名激活设备管理员应用,使用Promise形式返回是否激活成功。
...
...
@@ -114,7 +134,17 @@ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId
| 类型 | 说明 |
| ----------------- | ----------------- |
| Promise
\<
boolean> | Promise形式返回是否激活成功 |
| Promise
\<
void> | Promise形式返回是否激活成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | --------------------------------------------------------------- |
| 9200003 | The administrator ability component is invalid. |
| 9200004 | Failed to activate the administrator application of the device. |
| 9200007 | The system ability work abnormally. |
**示例**
:
...
...
@@ -128,16 +158,14 @@ let enterpriseInfo = {
description
:
"
enterprise description
"
}
enterpriseDeviceManager
.
enableAdmin
(
wantTemp
,
enterpriseInfo
,
enterpriseDeviceManager
.
AdminType
.
ADMIN_TYPE_NORMAL
,
100
)
.
then
((
result
)
=>
{
console
.
log
(
"
result is
"
+
result
);
}).
catch
(
error
=>
{
.
catch
(
error
=>
{
console
.
log
(
"
error occurs
"
+
error
);
});
```
## enterpriseDeviceManager.disableAdmin
disableAdmin(admin: Want, callback: AsyncCallback
\<
boolean
>): void
disableAdmin(admin: Want, callback: AsyncCallback
\<
void
>): void
以异步方法根据给定的包名和类名将设备普通管理员应用去激活,使用Callback形式返回是否去激活成功。
...
...
@@ -150,7 +178,15 @@ disableAdmin(admin: Want, callback: AsyncCallback\<boolean>): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------- | ---- | ------------------- |
| admin |
[
Want
](
js-apis-application-Want.md
)
| 是 | 普通设备管理员应用 |
| callback | AsyncCallback
\<
boolean> | 是 | callback方式返回是否去激活成功 |
| callback | AsyncCallback
\<
void> | 是 | callback方式返回是否去激活成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------------------- |
| 9200005 | Failed to deactivate the administrator application of the device. |
**示例**
:
...
...
@@ -159,18 +195,18 @@ let wantTemp = {
bundleName
:
"
bundleName
"
,
abilityName
:
"
abilityName
"
,
};
enterpriseDeviceManager
.
disableAdmin
(
wantTemp
,
(
error
,
result
)
=>
{
enterpriseDeviceManager
.
disableAdmin
(
wantTemp
,
error
=>
{
if
(
error
!=
null
)
{
console
.
log
(
"
error occurs
"
+
error
);
return
;
}
console
.
log
(
"
result is
"
+
result
);
console
.
log
(
"
disableAdmin success
"
);
});
```
## enterpriseDeviceManager.disableAdmin
disableAdmin(admin: Want, userId: number, callback: AsyncCallback
\<
boolean
>): void
disableAdmin(admin: Want, userId: number, callback: AsyncCallback
\<
void
>): void
以异步方法根据给定的包名和类名将设备普通管理员应用去激活,使用Callback形式返回是否去激活成功。
...
...
@@ -184,7 +220,15 @@ disableAdmin(admin: Want, userId: number, callback: AsyncCallback\<boolean>): vo
| -------- | ----------------------------------- | ---- | ---------------------------- |
| admin |
[
Want
](
js-apis-application-Want.md
)
| 是 | 普通设备管理员应用 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| callback | AsyncCallback
\<
boolean> | 是 | callback方式返回是否去激活成功 |
| callback | AsyncCallback
\<
void> | 是 | callback方式返回是否去激活成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------------------- |
| 9200005 | Failed to deactivate the administrator application of the device. |
**示例**
:
...
...
@@ -193,18 +237,18 @@ let wantTemp = {
bundleName
:
"
bundleName
"
,
abilityName
:
"
abilityName
"
,
};
enterpriseDeviceManager
.
disableAdmin
(
wantTemp
,
100
,
(
error
,
result
)
=>
{
enterpriseDeviceManager
.
disableAdmin
(
wantTemp
,
100
,
error
=>
{
if
(
error
!=
null
)
{
console
.
log
(
"
error occurs
"
+
error
);
return
;
}
console
.
log
(
"
result is
"
+
result
);
console
.
log
(
"
disableAdmin success
"
);
});
```
## enterpriseDeviceManager.disableAdmin
disableAdmin(admin: Want, userId?: number): Promise
\<
boolean
>
disableAdmin(admin: Want, userId?: number): Promise
\<
void
>
以异步方法根据给定的包名和类名将设备普通管理员应用去激活,使用Promise形式返回是否去激活成功。
...
...
@@ -223,7 +267,15 @@ disableAdmin(admin: Want, userId?: number): Promise\<boolean>
| 类型 | 说明 |
| ----------------- | ----------------- |
| Promise
\<
boolean> | Promise形式返回是否激活成功 |
| Promise
\<
void> | Promise形式返回是否激活成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------------------- |
| 9200005 | Failed to deactivate the administrator application of the device. |
**示例**
:
...
...
@@ -232,16 +284,14 @@ let wantTemp = {
bundleName
:
"
bundleName
"
,
abilityName
:
"
abilityName
"
,
};
enterpriseDeviceManager
.
disableAdmin
(
wantTemp
,
100
).
then
((
result
)
=>
{
console
.
log
(
"
result is
"
+
result
);
}).
catch
(
error
=>
{
enterpriseDeviceManager
.
disableAdmin
(
wantTemp
,
100
).
catch
(
error
=>
{
console
.
log
(
"
error occurs
"
+
error
);
});
```
## enterpriseDeviceManager.disableSuperAdmin
disableSuperAdmin(bundleName: String, callback: AsyncCallback
\<
boolean
>): void
disableSuperAdmin(bundleName: String, callback: AsyncCallback
\<
void
>): void
以异步方法根据给定的包名将设备超级管理员应用去激活,使用Callback形式返回是否去激活成功。
...
...
@@ -252,24 +302,32 @@ disableSuperAdmin(bundleName: String, callback: AsyncCallback\<boolean>): void
| 参数名 | 类型 | 必填 | 说明 |
| ---------- | ----------------------- | ---- | ------------------- |
| bundleName | String | 是 | 超级设备管理员应用的包名 |
| callback | AsyncCallback
\<
boolean> | 是 | callback方式返回是否去激活成功 |
| callback | AsyncCallback
\<
void> | 是 | callback方式返回是否去激活成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------------------- |
| 9200005 | Failed to deactivate the administrator application of the device. |
**示例**
:
```
js
let
bundleName
=
"
com.example.myapplication
"
;
enterpriseDeviceManager
.
disableSuperAdmin
(
bundleName
,
(
error
,
result
)
=>
{
enterpriseDeviceManager
.
disableSuperAdmin
(
bundleName
,
error
=>
{
if
(
error
!=
null
)
{
console
.
log
(
"
error occurs
"
+
error
);
return
;
}
console
.
log
(
"
result is
"
+
result
);
console
.
log
(
"
disableSuperAdmin success
"
);
});
```
## enterpriseDeviceManager.disableSuperAdmin
disableSuperAdmin(bundleName: String): Promise
\<
boolean
>
disableSuperAdmin(bundleName: String): Promise
\<
void
>
以异步方法根据给定的包名将设备超级管理员应用去激活,使用Promise形式返回是否去激活成功。
...
...
@@ -285,15 +343,21 @@ disableSuperAdmin(bundleName: String): Promise\<boolean>
| 类型 | 说明 |
| ----------------- | ----------------- |
| Promise
\<
boolean> | Promise形式返回是否激活成功 |
| Promise
\<
void> | Promise形式返回是否激活成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------------------- |
| 9200005 | Failed to deactivate the administrator application of the device. |
**示例**
:
```
js
let
bundleName
=
"
com.example.myapplication
"
;
enterpriseDeviceManager
.
disableSuperAdmin
(
bundleName
).
then
((
result
)
=>
{
console
.
log
(
"
result is
"
+
result
);
}).
catch
(
error
=>
{
enterpriseDeviceManager
.
disableSuperAdmin
(
bundleName
).
catch
(
error
=>
{
console
.
log
(
"
error occurs
"
+
error
);
});
```
...
...
@@ -313,6 +377,14 @@ isAdminEnabled(admin: Want, callback: AsyncCallback\<boolean>): void
| admin |
[
Want
](
js-apis-application-Want.md
)
| 是 | 设备管理员应用 |
| callback | AsyncCallback
\<
boolean> | 是 | callback方式返回是否处于激活状态 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------------------- |
| 9200005 | Failed to deactivate the administrator application of the device. |
**示例**
:
```
js
...
...
@@ -469,6 +541,15 @@ getDeviceSettingsManager(callback: AsyncCallback<DeviceSettingsManager>):
| -------- | --------------------------------------- | ---- | ----------------------------------- |
| callback | AsyncCallback<
[
DeviceSettingsManager
](
js-apis-enterpriseDeviceManager-DeviceSettingsManager.md
)
>
| 是 | callback方式返回DeviceSettingsManager对象 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
| 9200002 | The administrator application does not have permission to manage the device. |
**示例:**
```
js
...
...
@@ -505,6 +586,15 @@ getDeviceSettingsManager(): Promise<DeviceSettingsManager>
| ------------------------------------ | ---------------------------------- |
| Promise
<
[DeviceSettingsManager](js-apis-enterpriseDeviceManager-DeviceSettingsManager.md)
>
| Promise方式返回DeviceSettingsManager对象 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
| 9200002 | The administrator application does not have permission to manage the device. |
**示例:**
```
js
...
...
@@ -537,7 +627,15 @@ setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo, callback: AsyncCa
| -------------- | ----------------------------------- | ---- | ---------------------- |
| admin |
[
Want
](
js-apis-application-Want.md
)
| 是 | 设备管理员应用 |
| enterpriseInfo |
[
EnterpriseInfo
](
#enterpriseinfo
)
| 是 | 设备管理员应用的企业信息 |
| callback | AsyncCallback
\<
boolean
>
| 是 | callback方式返回是否设置企业信息成功 |
| callback | AsyncCallback
\<
void>; | 是 | callback方式返回是否设置企业信息成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
**示例:**
...
...
@@ -550,11 +648,12 @@ let enterpriseInfo = {
name
:
"
enterprise name
"
,
description
:
"
enterprise description
"
}
enterpriseDeviceManager
.
setEnterpriseInfo
(
wantTemp
,
enterpriseInfo
)
.
then
((
result
)
=>
{
console
.
log
(
"
result is
"
+
result
);
}).
catch
(
error
=>
{
console
.
log
(
"
error occurs
"
+
error
);
enterpriseDeviceManager
.
setEnterpriseInfo
(
wantTemp
,
enterpriseInfo
,
error
=>
{
if
(
error
!=
null
)
{
console
.
log
(
"
error occurs
"
+
error
);
return
;
}
console
.
log
(
"
setEnterpriseInfo success
"
);
});
```
...
...
@@ -577,7 +676,15 @@ setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo): Promise<boole
| 类型 | 说明 |
| ----------------- | --------------------- |
| Promise
\<
boolean> | Promise方式返回是否设置企业信息成功 |
| Promise
\<
void> | Promise方式返回是否设置企业信息成功 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
**示例:**
...
...
@@ -590,10 +697,7 @@ let enterpriseInfo = {
name
:
"
enterprise name
"
,
description
:
"
enterprise description
"
}
enterpriseDeviceManager
.
setEnterpriseInfo
(
wantTemp
,
enterpriseInfo
)
.
then
((
result
)
=>
{
console
.
log
(
"
result is
"
+
result
);
}).
catch
(
error
=>
{
enterpriseDeviceManager
.
setEnterpriseInfo
(
wantTemp
,
enterpriseInfo
).
catch
(
error
=>
{
console
.
log
(
"
error occurs
"
+
error
);
});
```
...
...
@@ -613,6 +717,14 @@ getEnterpriseInfo(admin: Want, callback: AsyncCallback<EnterpriseInfo>): v
| admin |
[
Want
](
js-apis-application-Want.md
)
| 是 | 设备管理员应用 |
| callback | AsyncCallback
<
[EnterpriseInfo](#enterpriseinfo)
>
| 是 | callback方式返回设备管理员应用的企业信息 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
**示例:**
```
js
...
...
@@ -650,6 +762,14 @@ getEnterpriseInfo(admin: Want): Promise<EnterpriseInfo>
| ---------------------------------------- | ------------------------- |
| Promise
<
[EnterpriseInfo](#enterpriseinfo)
>
| Promise方式返回设备管理员应用的企业信息对象 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ----------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
**示例:**
```
js
...
...
zh-cn/application-dev/reference/apis/js-apis-enterpriseDeviceManager-DeviceSettingsManager.md
浏览文件 @
6214e067
...
...
@@ -40,6 +40,15 @@ setDateTime(admin: Want, time: number, callback: AsyncCallback\<void>): void
| time | number | 是 | 时间戳(ms)。 |
| callback | AsyncCallback
<void>
| 是 | 回调函数。当系统时间设置成功err为null,否则为错误对象。 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
| 9200002 | The administrator application does not have permission to manage the device. |
**示例:**
```
js
...
...
@@ -85,6 +94,14 @@ setDateTime(admin: Want, time: number): Promise\<void>
| ----- | ----------------------------------- |
| Promise
<void>
| Promise对象。无返回结果的Promise对象。 |
**错误码**
:
以下的错误码的详细介绍请参见
[
企业设备管理错误码
](
../errorcodes/errorcode-EnterpriseDeviceManager.md
)
| 类型 | 说明 |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
| 9200002 | The administrator application does not have permission to manage the device. |
**示例:**
...
...
zh-cn/application-dev/reference/errorcodes/errorcode-EnterpriseDeviceManager.md
0 → 100644
浏览文件 @
6214e067
# 企业设备管理错误码
## 9200001 应用没有激活成设备管理器
### 错误信息
The application is not a administrator of the device.
### 错误描述
当应用没有激活成设备管理器时,则会产生此错误码。
### 可能原因
应用没有激活设备管理器。
### 处理步骤
请检查调用者是否成功激活过设备管理器,没有激活过的设备管理器的应用无法调用设备管理接口。
## 9200002 设备管理器权限不够
### 错误信息
The administrator application does not have permission to manage the device.
### 错误描述
当设备管理器调用高权限接口时,则会产生此错误码。
### 可能原因
激活成了DA管理器,调用了SDA管理器接口。
### 处理步骤
请检查调用者是否存在越权调用,即激活的设备管理器类型和调用的API要求的管理器类型是否一致。
## 9200003 指定的设备管理器元能力组件无效
### 错误信息
The administrator ability component is invalid.
### 错误描述
当应用传入参数中指定的设备管理器元能力组件无效,则会产生此错误码。
### 可能原因
该错误码表示指定的设备管理器元能力组件无效,可能原因如下。
1.
应用激活设备管理器时指定的设备管理器元能力组件不存在。
2.
设备管理器元能力组件不是合法的企业设备管理元能力组件。
### 处理步骤
1.
请检查激活时输入的设备管理器元能力组件name是否存在应用包中。
2.
请检查企业设备管理组件是否继承企业设备管理框架定义的EnterpriseAdminExtensionAbility组件。
## 9200004 激活设备管理器失败
### 错误信息
Failed to activate the administrator application of the device.
### 错误描述
当应用重复激活不同类型的设备管理器或激活多个管理器时,则会产生此错误码。
### 可能原因
该错误码表示激活设备管理器失败,可能原因如下。
1.
同时激活多个SDA设备管理器。
2.
重复激活设备管理器,且管理器类型发生变化。
3.
同一个应用多个设备管理器元能力组件激活。
### 处理步骤
1.
检查是否激活多个SDA设备管理器,SDA设备管理器只允许激活一个。
2.
检查指定的设备管理器是否已激活了,且重复激活时管理器类型发生变化,此时需要先去激活,再重新激活。
3.
检查待激活的设备管理器应用中是否已有设备管理元能力组件激活过,同一个应用只允许激活一个设备管理器元能力组件
## 9200005 去激活设备管理器失败
### 错误信息
Failed to deactivate the administrator application of the device.
### 错误描述
当应用没有激活过或者去激活其他设备管理器时,则会产生此错误码。
### 可能原因
该错误码表示去激活设备管理器失败,可能原因如下。
1.
去激活的设备管理器应用没有激活过。
2.
不能去激活其他设备管理器。
### 处理步骤
1.
检查去激活时设备管理应用是否激活过。
2.
检查去激活时设备管理应用中指定设备管理元能力组件是否激活过。
3.
检查调用者是否去激活自身,设备管理器应用不能去激活其他设备管理器应用。
## 9200006 指定的用户ID非法
### 错误信息
The specified user ID is invalid.
### 错误描述
当应用调用接口设置用户策略,指定的user id不存在、或者DA,SDA管理器跨用户设置时,则会产生此错误码。
### 可能原因
该错误码表示指定的用户ID非法,可能原因如下。
1.
调用接口设置用户策略时候,指定的user id不存在。
2.
指定的user id和调用者user id不同。DA,SDA管理器不允许跨用户设置。
### 处理步骤
1.
检查去调用接口中指定的user id是否是有效的user id。
2.
检查调用者user id和指定设置的user id是否是同一user id,非SDA模式下不允许跨用户设置策略。
## 9200007 系统服务工作异常
### 错误信息
The system ability work abnormally.
### 错误描述
当企业设备管理服务异常时,则会产生此错误码。
### 可能原因
该错误码表示系统服务工作异常,可能原因如下。
1.
企业设备管理服务没有正常启动。
2.
企业设备管理的RPC对象无法获取。
3.
企业设备管理依赖的其他服务没有正常启动或者RPC对象无法获取。
4.
企业设备管理运行过程中系统异常。
### 处理步骤
系统服务内部工作异常,请稍后重试,或者重启设备尝试。
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录