未验证 提交 8fd6c5f8 编写于 作者: O openharmony_ci 提交者: Gitee

!14042 三方API升级到系统API、错误码英文解释修改、接口一致性检查修改(添加@ts-nocheck),回合monthly1018分支

Merge pull request !14042 from yp99ustc/monthly_20221018
......@@ -36,5 +36,5 @@
解除注册应用分组变化回调监听。
## 设备使用信息统计使用权限
- 设备使用信息统计的queryBundleActiveStates、queryBundleStateInfos、queryBundleStateInfoByInterval、queryBundleActiveEventStates、queryAppNotificationNumber、queryAppUsagePriorityGroup(bundleName?)、setBundleGroup、registerGroupCallBack、unRegisterGroupCallBack接口为系统api,调用前需要申请ohos.permission.BUNDLE_ACTIVE_INFO权限。
- 设备使用信息统计的queryCurrentBundleActiveStates、queryAppUsagePriorityGroup()、isIdleState(三方应用只能查询自身的空闲状态)接口为三方api,调用时不需要申请权限。
\ No newline at end of file
- 设备使用信息统计的isIdleState、queryBundleEvents、queryBundleStatsInfos、queryBundleStatsInfoByInterval、queryDeviceEventStats、queryNotificationEventStats、queryAppGroup(bundleName)、setAppGroup、registerAppGroupCallBack、unregisterAppGroupCallBack、queryModuleUsageRecords和queryModuleUsageRecords(maxnum)接口为系统api,调用前需要申请ohos.permission.BUNDLE_ACTIVE_INFO权限。
- 设备使用信息统计的queryCurrentBundleEvents、queryAppGroup()接口为三方api,调用时不需要申请权限。
\ No newline at end of file
......@@ -227,7 +227,7 @@ import usageStatistics from '@ohos.resourceschedule.usageStatistics';
}
```
7. 判断指定Bundle Name的应用当前是否是空闲状态,不需要配置权限,三方应用只能查询自身的空闲状态
7. 判断指定Bundle Name的应用当前是否是空闲状态,需要配置ohos.permission.BUNDLE_ACTIVE_INFO权限
```js
import usageStatistics from '@ohos.resourceschedule.usageStatistics'
......
......@@ -35,8 +35,12 @@ isIdleState(bundleName: string, callback: AsyncCallback<boolean>): void
判断指定bundleName的应用当前是否是空闲状态,三方应用只能查询自身的空闲状态,使用Callback形式返回。
**需要权限**:ohos.permission.BUNDLE_ACTIVE_INFO
**系统能力**:SystemCapability.ResourceSchedule.UsageStatistics.AppGroup
**系统API**:此接口为系统接口。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -53,8 +57,8 @@ isIdleState(bundleName: string, callback: AsyncCallback<boolean>): void
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
**示例**
```js
......@@ -77,8 +81,12 @@ isIdleState(bundleName: string): Promise<boolean>
判断指定bundleName的应用当前是否是空闲状态,三方应用只能查询自身的空闲状态,使用Promise形式返回。
**需要权限**:ohos.permission.BUNDLE_ACTIVE_INFO
**系统能力**:SystemCapability.ResourceSchedule.UsageStatistics.AppGroup
**系统API**:此接口为系统接口。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -100,8 +108,8 @@ isIdleState(bundleName: string): Promise<boolean>
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
**示例**
......@@ -140,10 +148,10 @@ queryAppGroup(): Promise<number>
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000004 | IPC failed. |
| 10000005 | Application is not installed. |
| 10000006 | Get application info failed. |
| 10100002 | Get Application group info failed. |
| 10000006 | Failed to get the application information. |
| 10100002 | Failed to get the application group information. |
**示例**
......@@ -182,10 +190,10 @@ queryAppGroup(callback: AsyncCallback<number>): void
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000004 | IPC failed. |
| 10000005 | Application is not installed. |
| 10000006 | Get application info failed. |
| 10100002 | Get Application group info failed. |
| 10000006 | Failed to get the application information. |
| 10100002 | Failed to get the application group information. |
**示例**
......@@ -232,9 +240,9 @@ queryBundleStatsInfos(begin: number, end: number, callback: AsyncCallback<Bun
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -292,9 +300,9 @@ queryBundleStatsInfos(begin: number, end: number): Promise<BundleStatsMap>
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -346,9 +354,9 @@ queryBundleStatsInfoByInterval(byInterval: IntervalType, begin: number, end: num
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -405,9 +413,9 @@ queryBundleStatsInfoByInterval(byInterval: IntervalType, begin: number, end: num
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -456,9 +464,9 @@ queryBundleEvents(begin: number, end: number, callback: AsyncCallback<Array&l
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -514,9 +522,9 @@ queryBundleEvents(begin: number, end: number): Promise<Array<BundleEvents&
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -561,9 +569,9 @@ queryCurrentBundleEvents(begin: number, end: number, callback: AsyncCallback<
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -615,9 +623,9 @@ queryCurrentBundleEvents(begin: number, end: number): Promise<Array<Bundle
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -664,9 +672,9 @@ queryModuleUsageRecords(): Promise<Array<HapModuleInfo>>
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -714,9 +722,9 @@ queryModuleUsageRecords(callback: AsyncCallback<Array<HapModuleInfo>&gt
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -771,9 +779,9 @@ queryModuleUsageRecords(maxNum: number): Promise<Array<HapModuleInfo>&g
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -821,9 +829,9 @@ queryModuleUsageRecords(maxNum: number, callback: AsyncCallback<Array<HapM
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -878,10 +886,10 @@ queryAppGroup(bundleName : string): Promise<number>
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000004 | IPC failed. |
| 10000005 | Application is not installed. |
| 10000006 | Get application info failed. |
| 10100002 | Get Application group info failed. |
| 10000006 | Failed to get the application information. |
| 10100002 | Failed to get the application group information. |
**示例**
......@@ -927,10 +935,10 @@ queryAppGroup(bundleName : string, callback: AsyncCallback<number>): void
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000004 | IPC failed. |
| 10000005 | Application is not installed. |
| 10000006 | Get application info failed. |
| 10100002 | Get Application group info failed. |
| 10000006 | Failed to get the application information. |
| 10100002 | Failed to get the application group information. |
**示例**
......@@ -977,9 +985,9 @@ setAppGroup(bundleName: string, newGroup: GroupType): Promise<void>
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10100001 | Application group operation repeated. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10100001 | Repeated operation on the application group. |
**返回值**
......@@ -1033,9 +1041,9 @@ setAppGroup(bundleName: string, newGroup: GroupType, callback: AsyncCallback<
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10100001 | Application group operation repeated. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10100001 | Repeated operation on the application group. |
**示例**
......@@ -1083,8 +1091,8 @@ registerAppGroupCallBack(groupCallback: Callback<AppGroupCallbackInfo>): P
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10100001 | Application group operation repeated. |
| 10000004 | IPC failed. |
| 10100001 | Repeated operation on the application group. |
**返回值**
......@@ -1142,13 +1150,14 @@ registerAppGroupCallBack(groupCallback: Callback<AppGroupCallbackInfo>, ca
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10100001 | Application group operation repeated. |
| 10000004 | IPC failed. |
| 10100001 | Repeated operation on the application group. |
**示例**
```javascript
// @ts-nocheck
let onBundleGroupChanged = (err, res) =>{
console.log('BUNDLE_ACTIVE onBundleGroupChanged RegisterGroupCallBack callback success.');
console.log('BUNDLE_ACTIVE registerAppGroupCallBack result appOldGroup is : ' + res.appOldGroup);
......@@ -1197,8 +1206,8 @@ unregisterAppGroupCallBack(): Promise<void>
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10100001 | Application group operation repeated. |
| 10000004 | IPC failed. |
| 10100001 | Repeated operation on the application group. |
**示例**
......@@ -1241,8 +1250,8 @@ unregisterAppGroupCallBack(callback: AsyncCallback<void>): void;
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10100001 | Application group operation repeated. |
| 10000004 | IPC failed. |
| 10100001 | Repeated operation on the application group. |
**示例**
......@@ -1294,9 +1303,9 @@ queryDeviceEventStats(begin: number, end: number): Promise<Array<DeviceEve
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -1342,9 +1351,9 @@ queryDeviceEventStats(begin: number, end: number, callback: AsyncCallback<Arr
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -1397,9 +1406,9 @@ queryNotificationEventStats(begin: number, end: number): Promise<Array<Dev
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......@@ -1445,9 +1454,9 @@ queryNotificationEventStats(begin: number, end: number, callback: AsyncCallback&
| 10000001 | Memory operation failed. |
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
| 10000004 | IPC failed. |
| 10000006 | Failed to get the application information. |
| 10000007 | Failed to get the system time. |
**示例**
......
......@@ -58,7 +58,7 @@ System service operation failed.
**错误信息**
IPC communication failed.
IPC failed.
**错误描述**
......@@ -94,7 +94,7 @@ The application is not installed.
**错误信息**
Get application info failed.
Failed to get the application information.
**错误描述**
......@@ -114,11 +114,11 @@ Get application info failed.
**错误信息**
Get system or actual time operation failed.
Failed to get the system time.
**错误描述**
系统服务获取系统事件或者实际事件操作失败。
系统服务获取系统时间或者实际时间操作失败。
**可能原因**
......@@ -132,7 +132,7 @@ Get system or actual time operation failed.
**错误信息**
Application group operation failed. The application group are the the same or do not need te be updated.
Repeated operation on the application group.
**错误描述**
......@@ -150,7 +150,7 @@ Application group operation failed. The application group are the the same or do
**错误信息**
Get application group info failed. The application group infomation cannot be found.
Failed to get the application group information.
**错误描述**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册