diff --git a/en/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md b/en/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md
index 01fe1ed68b3eb05341438da3d81270afdc4a92e3..249b1196131c0e5045409167ffb5d7ff88027e7c 100644
--- a/en/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md
+++ b/en/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md
@@ -22,15 +22,16 @@ import stats from '@ohos.bundleState';
| function queryAppUsagePriorityGroup(callback: AsyncCallback<number>): void | Queries the priority group of this application. This API uses an asynchronous callback to return the result.|
| function queryAppUsagePriorityGroup(): Promise<number>; | Queries the priority group of this application. This API uses a promise to return the result.|
| function isIdleState(bundleName: string, callback: AsyncCallback<boolean>): void | Checks whether the application specified by **bundleName** is in the idle state. |
-| function getRecentlyUsedModules(maxNum? : number, callback: AsyncCallback<BundleActiveModuleInfo>): void | Obtains the number of FA usage records specified by **maxNum**. If **maxNum** is not specified, the default value **1000** is used.|
+| function getRecentlyUsedModules(callback: AsyncCallback<BundleActiveModuleInfo>): void | Obtains the number of FA usage records specified by **1000**.|
+| function getRecentlyUsedModules(maxNum : number, callback: AsyncCallback<BundleActiveModuleInfo>): void | Obtains the number of FA usage records specified by **maxNum**.|
| function queryAppNotificationNumber(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveEventState>>): void | Queries the number of notifications from all applications based on the specified start time and end time.|
| function queryBundleActiveEventStates(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveEventState>>): void | Queries statistics about system events (hibernation, wakeup, unlocking, and screen locking) that occur between the specified start time and end time.|
-| function queryAppUsagePriorityGroup(bundleName? : string, callback: AsyncCallback<number>): void | Queries the priority group of the application specified by **bundleName**. If **bundleName** is not specified, the priority group of the current application is queried. This API uses an asynchronous callback to return the result.|
+| function queryAppUsagePriorityGroup(bundleName : string, callback: AsyncCallback<number>): void | Queries the priority group of the application specified by **bundleName**. This API uses an asynchronous callback to return the result.|
| function queryAppUsagePriorityGroup(bundleName? : string): Promise<number>; | Queries the priority group of the application specified by **bundleName**. If **bundleName** is not specified, the priority group of the current application is queried. This API uses a promise to return the result.|
| function setBundleGroup(bundleName : string, newGroup: GroupType, callback: AsyncCallback>boolean>): void | Sets the group for the application specified by **bundleName**. This API uses an asynchronous callback to return the result.|
| function setBundleGroup(bundleName : string, newGroup : GroupType): Promise>boolean>; | Sets the group for the application specified by **bundleName**. This API uses a promise to return the result.|
-| function registerGroupCallBack(callback: Callback>BundleActiveGroupCallbackInfo>, callback: AsyncCallback>boolean>): void | Registers a callback for application group changes. When an application group of the user changes, the change is returned to all applications that have registered the callback. This API uses an asynchronous callback to return the result.|
-| function registerGroupCallBack(callback: Callback>BundleActiveGroupCallbackInfo>): Promise>boolean>; | Registers a callback for application group changes. When an application group of the user changes, the change is returned to all applications that have registered the callback. This API uses a promise to return the result.|
+| function registerGroupCallBack(groupCallback: Callback>BundleActiveGroupCallbackInfo>, callback: AsyncCallback>boolean>): void | Registers a callback for application group changes. When an application group of the user changes, the change is returned to all applications that have registered the callback. This API uses an asynchronous callback to return the result.|
+| function registerGroupCallBack(groupCallback: Callback>BundleActiveGroupCallbackInfo>): Promise>boolean>; | Registers a callback for application group changes. When an application group of the user changes, the change is returned to all applications that have registered the callback. This API uses a promise to return the result.|
| function unRegisterGroupCallBack(callback: AsyncCallback>boolean>): void | Deregisters the callback for application group changes. This API uses an asynchronous callback to return the result.|
| function unRegisterGroupCallBack(): Promise>boolean>; | Deregisters the callback for application group changes. This API uses a promise to return the result.|
diff --git a/en/application-dev/reference/apis/js-apis-deviceUsageStatistics.md b/en/application-dev/reference/apis/js-apis-deviceUsageStatistics.md
index 8d18622ce2eb432210858545308e2a607891b1f0..2636b9ecefe9dbcc3b0a4589169d3d8bacef8855 100644
--- a/en/application-dev/reference/apis/js-apis-deviceUsageStatistics.md
+++ b/en/application-dev/reference/apis/js-apis-deviceUsageStatistics.md
@@ -484,9 +484,9 @@ Obtains the number of FA usage records specified by **maxNum**. This API uses a
## bundleState.getRecentlyUsedModules9+
-getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void
+getRecentlyUsedModules(callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void
-Obtains the number of FA usage records specified by **maxNum**. This API uses an asynchronous callback to return the records sorted by time (most recent first).
+Obtains the number of FA usage records. This API uses an asynchronous callback to return the records sorted by time (most recent first).
**Required permissions**: ohos.permission.BUNDLE_ACTIVE_INFO
@@ -498,13 +498,12 @@ Obtains the number of FA usage records specified by **maxNum**. This API uses an
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ----------------------------------- |
-| maxNum | number | No | Maximum number of returned records. The maximum and default value is **1000**. If this parameter is not specified, **1000** is used. |
| callback | AsyncCallback<Array<[BundleActiveModuleInfo](#bundleactivemoduleinfo9)>> | Yes | Callback used to return the result.|
**Example**
```js
- bundleState.getRecentlyUsedModules(1000,(err, res) => {
+ bundleState.getRecentlyUsedModules((err, res) => {
if(err) {
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback failed, because: ' + err.code);
} else {
@@ -513,11 +512,33 @@ Obtains the number of FA usage records specified by **maxNum**. This API uses an
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback number : ' + (i + 1));
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback result ' + JSON.stringify(res[i]));
}
- }
+ }
});
+ ```
- // Invocation when maxNum is not passed
- bundleState.getRecentlyUsedModules((err, res) => {
+## bundleState.getRecentlyUsedModules9+
+
+getRecentlyUsedModules(maxNum: number, callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void
+
+Obtains the number of FA usage records specified by **maxNum**. This API uses an asynchronous callback to return the records sorted by time (most recent first).
+
+**Required permissions**: ohos.permission.BUNDLE_ACTIVE_INFO
+
+**System capability**: SystemCapability.ResourceSchedule.UsageStatistics.App
+
+**System API**: This is a system API and cannot be called by third-party applications.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | ---- | ----------------------------------- |
+| maxNum | number | Yes | Maximum number of returned records. The maximum and default value is **1000**.|
+| callback | AsyncCallback<Array<[BundleActiveModuleInfo](#bundleactivemoduleinfo9)>> | Yes | Callback used to return the result.|
+
+**Example**
+
+ ```js
+ bundleState.getRecentlyUsedModules(1000,(err, res) => {
if(err) {
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback failed, because: ' + err.code);
} else {
@@ -526,7 +547,7 @@ Obtains the number of FA usage records specified by **maxNum**. This API uses an
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback number : ' + (i + 1));
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback result ' + JSON.stringify(res[i]));
}
- }
+ }
});
```
@@ -574,9 +595,9 @@ bundleState.queryAppUsagePriorityGroup().then( res => {
## bundleState.queryAppUsagePriorityGroup9+
-queryAppUsagePriorityGroup(bundleName? : string, callback: AsyncCallback<number>): void
+queryAppUsagePriorityGroup(callback: AsyncCallback<number>): void
-Queries the priority group of the application specified by **bundleName**. If **bundleName** is not specified, the priority group of the current application is queried. This API uses an asynchronous callback to return the result.
+Queries the priority group of the current application . This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.BUNDLE_ACTIVE_INFO
@@ -588,23 +609,44 @@ Queries the priority group of the application specified by **bundleName**. If **
| Name | Type | Mandatory | Description |
| ---------- | --------------------- | ---- | ---------------------------------------- |
-| bundleName | string | No | Bundle name of the target application. If this parameter is not specified, the priority group of the current application is queried.|
| callback | AsyncCallback<number> | Yes | Callback used to return the result. |
**Example**
```javascript
-// Callback with bundleName
-let bundleName = "com.ohos.camera";
-bundleState.queryAppUsagePriorityGroup(bundleName, (err, res) => {
+bundleState.queryAppUsagePriorityGroup((err, res) => {
if(err) {
console.log('BUNDLE_ACTIVE QueryPackageGroup callback failed. because: ' + err.code);
} else {
console.log('BUNDLE_ACTIVE QueryPackageGroup callback succeeded. result: ' + JSON.stringify(res));
}
});
-// Callback without bundleName
-bundleState.queryAppUsagePriorityGroup((err, res) => {
+```
+
+## bundleState.queryAppUsagePriorityGroup9+
+
+queryAppUsagePriorityGroup(bundleName : string, callback: AsyncCallback<number>): void
+
+Queries the priority group of the application specified by **bundleName**. This API uses an asynchronous callback to return the result.
+
+**Required permissions**: ohos.permission.BUNDLE_ACTIVE_INFO
+
+**System capability**: SystemCapability.ResourceSchedule.UsageStatistics.AppGroup
+
+**System API**: This is a system API and cannot be called by third-party applications.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| ---------- | --------------------- | ---- | ---------------------------------------- |
+| bundleName | string | Yes | Bundle name of the target application.|
+| callback | AsyncCallback<number> | Yes | Callback used to return the result. |
+
+**Example**
+
+```javascript
+let bundleName = "com.ohos.camera";
+bundleState.queryAppUsagePriorityGroup(bundleName, (err, res) => {
if(err) {
console.log('BUNDLE_ACTIVE QueryPackageGroup callback failed. because: ' + err.code);
} else {
@@ -688,7 +730,7 @@ bundleState.setBundleGroup(bundleName, newGroup, (err) => {
## bundleState.registerGroupCallBack9+
-registerGroupCallBack(callback: Callback<BundleActiveGroupCallbackInfo>): Promise<void>
+registerGroupCallBack(groupCallback: Callback<BundleActiveGroupCallbackInfo>): Promise<void>
Registers a callback for application group changes. When an application group of the user changes, a **[BundleActiveGroupCallbackInfo](#bundleactivegroupcallbackinfo9)** instance is returned to all applications that have registered the callback. This API uses a promise to return the result.
@@ -730,7 +772,7 @@ bundleState.registerGroupCallBack(onBundleGroupChanged).then( () => {
## bundleState.registerGroupCallBack9+
-registerGroupCallBack(callback: Callback<BundleActiveGroupCallbackInfo>, callback: AsyncCallback<void>): void
+registerGroupCallBack(groupCallback: Callback<BundleActiveGroupCallbackInfo>, callback: AsyncCallback<void>): void
Registers a callback for application group changes. When an application group of the user changes, a **[BundleActiveGroupCallbackInfo](#bundleactivegroupcallbackinfo9)** instance is returned to all applications that have registered the callback. This API uses an asynchronous callback to return the result.
diff --git a/zh-cn/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md b/zh-cn/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md
index 494508ffcb752fea7c16cea172c09476393c7c79..be8b1d926fa528a13b053f781145405bd79fe842 100644
--- a/zh-cn/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md
+++ b/zh-cn/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md
@@ -22,15 +22,16 @@ import stats from '@ohos.bundleState';
| function queryAppUsagePriorityGroup(callback: AsyncCallback<number>): void | 查询当前应用的使用优先级群组。callback形式。 |
| function queryAppUsagePriorityGroup(): Promise<number>; | 查询当前应用的使用优先级群组。promise形式。 |
| function isIdleState(bundleName: string, callback: AsyncCallback<boolean>): void | 判断指定Bundle Name的应用当前是否是空闲状态。 |
-| function getRecentlyUsedModules(maxNum? : number, callback: AsyncCallback<BundleActiveModuleInfo>): void | 根据maxNum,查询FA使用记录,返回不超过maxNum条FA使用记录,若不填写maxNum参数,则默认maxNum值为1000。 |
+| function getRecentlyUsedModules(callback: AsyncCallback<BundleActiveModuleInfo>): void | 查询FA使用记录,返回不超过1000条FA使用记录。 |
+| function getRecentlyUsedModules(maxNum : number, callback: AsyncCallback<BundleActiveModuleInfo>): void | 根据maxNum,查询FA使用记录,返回不超过maxNum条FA使用记录,若不填写maxNum参数,则默认maxNum值为1000。 |
| function queryAppNotificationNumber(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveEventState>>): void | 通过指定起始和结束时间查询所有应用的通知次数。 |
| function queryBundleActiveEventStates(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveEventState>>): void | 通过指定起始和结束时间查询系统事件(休眠、唤醒、解锁、锁屏)统计信息。 |
-| function queryAppUsagePriorityGroup(bundleName? : string, callback: AsyncCallback<number>): void | 查询当前调用者应用或者指定应用的使用优先级群组。callback形式。 |
+| function queryAppUsagePriorityGroup(bundleName : string, callback: AsyncCallback<number>): void | 查询当前调用者应用或者指定应用的使用优先级群组。callback形式。 |
| function queryAppUsagePriorityGroup(bundleName? : string): Promise<number>; | 查询当前调用者应用或者指定应用的使用优先级群组。promise形式。 |
| function setBundleGroup(bundleName : string, newGroup: GroupType, callback: AsyncCallback>boolean>): void | 给应用名是bundleName的应用分组设置成newGroup,返回设置结果是否成功,以callback形式返回。 |
| function setBundleGroup(bundleName : string, newGroup : GroupType): Promise>boolean>; | 给应用名是bundleName的应用分组设置成newGroup,返回设置结果是否成功,以promise形式返回。 |
-| function registerGroupCallBack(callback: Callback>BundleActiveGroupCallbackInfo>, callback: AsyncCallback>boolean>): void | 注册应用分组变化监听回调,返回注册是否成功,当应用分组发生变化时,会给所有已注册的监听者返回回调信息,以callback形式返回。 |
-| function registerGroupCallBack(callback: Callback>BundleActiveGroupCallbackInfo>): Promise>boolean>; | 注册应用分组变化监听回调,返回注册是否成功,当应用分组发生变化时,会给所有已注册的监听者返回回调信息,以promise形式返回。 |
+| function registerGroupCallBack(groupCallback: Callback>BundleActiveGroupCallbackInfo>, callback: AsyncCallback>boolean>): void | 注册应用分组变化监听回调,返回注册是否成功,当应用分组发生变化时,会给所有已注册的监听者返回回调信息,以callback形式返回。 |
+| function registerGroupCallBack(groupCallback: Callback>BundleActiveGroupCallbackInfo>): Promise>boolean>; | 注册应用分组变化监听回调,返回注册是否成功,当应用分组发生变化时,会给所有已注册的监听者返回回调信息,以promise形式返回。 |
| function unRegisterGroupCallBack(callback: AsyncCallback>boolean>): void | 解除应用分组监听回调,以callback形式返回。 |
| function unRegisterGroupCallBack(): Promise>boolean>; | 解除应用分组监听回调,以promise形式返回。 |
@@ -325,14 +326,14 @@ import stats from '@ohos.bundleState';
```js
import stats from '@ohos.bundleState'
- // 无参异步方法promise方式
+ // 无bundleName异步方法promise方式
stats.queryAppUsagePriorityGroup().then(res => {
console.log('BUNDLE_ACTIVE queryAppUsagePriorityGroup promise succeeded. result: ' + JSON.stringify(res));
}).catch(err => {
console.log('BUNDLE_ACTIVE queryAppUsagePriorityGroup promise failed. because: ' + err.code);
});
- // 无参异步方法callback方式
+ // 无bundleName异步方法callback方式
stats.queryAppUsagePriorityGroup((err, res) => {
if (err) {
console.log('BUNDLE_ACTIVE queryAppUsagePriorityGroup callback failed. because: ' + err.code);
@@ -340,16 +341,16 @@ import stats from '@ohos.bundleState';
console.log('BUNDLE_ACTIVE queryAppUsagePriorityGroup callback succeeded. result: ' + JSON.stringify(res));
}
});
-
- // 有参异步promise方式
- stats.queryAppUsagePriorityGroup(this.bundleName).then(res => {
+ let bundleName = "com.ohos.camera";
+ // 有bundleName异步promise方式
+ stats.queryAppUsagePriorityGroup(bundleName).then(res => {
console.log('BUNDLE_ACTIVE QueryPackageGroup promise succeeded. result: ' + JSON.stringify(res));
}).catch(err => {
console.log('BUNDLE_ACTIVE QueryPackageGroup promise failed. because: ' + err.code);
});
- // 有参异步方法callback方式
- stats.queryAppUsagePriorityGroup(this.bundleName, (err, res) => {
+ // 有bundleName异步方法callback方式
+ stats.queryAppUsagePriorityGroup(bundleName, (err, res) => {
if (err) {
console.log('BUNDLE_ACTIVE QueryPackageGroup callback failed. because: ' + err.code);
} else {
diff --git a/zh-cn/application-dev/reference/apis/js-apis-deviceUsageStatistics.md b/zh-cn/application-dev/reference/apis/js-apis-deviceUsageStatistics.md
index b16bb14c2a263d6c992b8372187e2ac080daaac2..88a5da760ee103aa326bc49ef596c936b5d0d636 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-deviceUsageStatistics.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-deviceUsageStatistics.md
@@ -483,9 +483,9 @@ getRecentlyUsedModules(maxNum?: number): Promise<Array<BundleActiveModuleI
## bundleState.getRecentlyUsedModules9+
-getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void
+getRecentlyUsedModules(callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void
-查询FA使用记录。使用CallBack形式返回数量最大不超过maxNum设置的值,FA使用记录由近及远排序,maxNum最大为1000。
+查询FA使用记录。使用CallBack形式返回数量为1000的值,FA使用记录由近及远排序。
**需要权限**:ohos.permission.BUNDLE_ACTIVE_INFO
@@ -497,13 +497,12 @@ getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback<Array<Bund
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ----------------------------------- |
-| maxNum | number | 否 | 返回条目的最大数量,最多支持1000条。若不填写,则默认为1000。 |
| callback | AsyncCallback<Array<[BundleActiveModuleInfo](#bundleactivemoduleinfo9)>> | 是 | 指定的CallBack回调方法。返回不超过maxNum条FA使用记录。 |
**示例**:
```js
- bundleState.getRecentlyUsedModules(1000,(err, res) => {
+ bundleState.getRecentlyUsedModules((err, res) => {
if(err) {
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback failed, because: ' + err.code);
} else {
@@ -512,11 +511,33 @@ getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback<Array<Bund
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback number : ' + (i + 1));
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback result ' + JSON.stringify(res[i]));
}
- }
+ }
});
+ ```
- // 无maxNum参数调用方式
- bundleState.getRecentlyUsedModules((err, res) => {
+## bundleState.getRecentlyUsedModules9+
+
+getRecentlyUsedModules(maxNum: number, callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void
+
+查询FA使用记录。使用CallBack形式返回数量最大不超过maxNum设置的值,FA使用记录由近及远排序,maxNum最大为1000。
+
+**需要权限**:ohos.permission.BUNDLE_ACTIVE_INFO
+
+**系统能力**:SystemCapability.ResourceSchedule.UsageStatistics.App
+
+**系统API**:此接口为系统接口,三方应用不支持调用。
+
+**参数**:
+
+| 参数名 | 类型 | 必填 | 说明 |
+| -------- | ---------------------------------------- | ---- | ----------------------------------- |
+| maxNum | number | 是 | 返回条目的最大数量,最多支持1000条。若不填写,则默认为1000。 |
+| callback | AsyncCallback<Array<[BundleActiveModuleInfo](#bundleactivemoduleinfo9)>> | 是 | 指定的CallBack回调方法。返回不超过maxNum条FA使用记录。 |
+
+**示例**:
+
+ ```js
+ bundleState.getRecentlyUsedModules(1000,(err, res) => {
if(err) {
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback failed, because: ' + err.code);
} else {
@@ -525,7 +546,7 @@ getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback<Array<Bund
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback number : ' + (i + 1));
console.log('BUNDLE_ACTIVE getRecentlyUsedModules callback result ' + JSON.stringify(res[i]));
}
- }
+ }
});
```
@@ -573,9 +594,9 @@ bundleState.queryAppUsagePriorityGroup().then( res => {
## bundleState.queryAppUsagePriorityGroup9+
-queryAppUsagePriorityGroup(bundleName? : string, callback: AsyncCallback<number>): void
+queryAppUsagePriorityGroup(callback: AsyncCallback<number>): void
-可选参数。有参则查询指定bundleName对应应用的分组。无参数时查询当前应用的分组。使用callback形式返回其应用分组。
+查询当前应用的分组。使用callback形式返回其应用分组。
**需要权限**:ohos.permission.BUNDLE_ACTIVE_INFO
@@ -587,23 +608,44 @@ queryAppUsagePriorityGroup(bundleName? : string, callback: AsyncCallback<numb
| 参数名 | 类型 | 必填 | 说明 |
| ---------- | --------------------- | ---- | ---------------------------------------- |
-| bundleName | string | 否 | 可选参数。有此参数则查询指定bundleName对应应用的分组。无此参数时查询当前应用的分组。 |
| callback | AsyncCallback<number> | 是 | 指定的CallBack回调方法。返回查询的应用分组。 |
**示例**:
```javascript
-//有bundleName的callback
-let bundleName = "com.ohos.camera";
-bundleState.queryAppUsagePriorityGroup(bundleName, (err, res) => {
+bundleState.queryAppUsagePriorityGroup((err, res) => {
if(err) {
console.log('BUNDLE_ACTIVE QueryPackageGroup callback failed. because: ' + err.code);
} else {
console.log('BUNDLE_ACTIVE QueryPackageGroup callback succeeded. result: ' + JSON.stringify(res));
}
});
-//无bundleName的callback
-bundleState.queryAppUsagePriorityGroup((err, res) => {
+```
+
+## bundleState.queryAppUsagePriorityGroup9+
+
+queryAppUsagePriorityGroup(bundleName : string, callback: AsyncCallback<number>): void
+
+查询指定bundleName对应应用的分组。使用callback形式返回其应用分组。
+
+**需要权限**:ohos.permission.BUNDLE_ACTIVE_INFO
+
+**系统能力**:SystemCapability.ResourceSchedule.UsageStatistics.AppGroup
+
+**系统API**:此接口为系统接口,三方应用不支持调用。
+
+**参数**:
+
+| 参数名 | 类型 | 必填 | 说明 |
+| ---------- | --------------------- | ---- | ---------------------------------------- |
+| bundleName | string | 是 | 查询指定bundleName对应应用的分组。 |
+| callback | AsyncCallback<number> | 是 | 指定的CallBack回调方法。返回查询的应用分组。 |
+
+**示例**:
+
+```javascript
+let bundleName = "com.ohos.camera";
+bundleState.queryAppUsagePriorityGroup(bundleName, (err, res) => {
if(err) {
console.log('BUNDLE_ACTIVE QueryPackageGroup callback failed. because: ' + err.code);
} else {
@@ -687,7 +729,7 @@ bundleState.setBundleGroup(bundleName, newGroup, (err) => {
## bundleState.registerGroupCallBack9+
-registerGroupCallBack(callback: Callback<BundleActiveGroupCallbackInfo>): Promise<void>
+registerGroupCallBack(groupCallback: Callback<BundleActiveGroupCallbackInfo>): Promise<void>
应用注册分组变化监听,待用户名下的某个应用分组发生变化时,通过callback形式向所有已注册分组变化监听的应用返回[BundleActiveGroupCallbackInfo](#bundleactivegroupcallbackinfo9)信息。使用Promise形式返回注册是否成功。
@@ -729,7 +771,7 @@ bundleState.registerGroupCallBack(onBundleGroupChanged).then( () => {
## bundleState.registerGroupCallBack9+
-registerGroupCallBack(callback: Callback<BundleActiveGroupCallbackInfo>, callback: AsyncCallback<void>): void
+registerGroupCallBack(groupCallback: Callback<BundleActiveGroupCallbackInfo>, callback: AsyncCallback<void>): void
应用注册分组变化监听,待用户名下的某个应用分组发生变化时,通过callback形式向所有已注册分组变化监听的应用返回[BundleActiveGroupCallbackInfo](#bundleactivegroupcallbackinfo9)信息。使用异步callback形式返回注册监听是否成功。
@@ -1039,6 +1081,22 @@ FA卡片的使用信息的属性集合。
| infosBeginTime | number | 否 | BundleActiveInfo对象中第一条应用使用统计的记录时间。
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 |
| infosEndTime | number | 否 | BundleActiveInfo对象中最后一条应用使用统计的记录时间。
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 |
+### merge
+
+merge(toMerge: BundleStateInfo): void
+
+合并相同包名的应用使用信息。
+
+本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
+
+**系统能力**:SystemCapability.ResourceSchedule.UsageStatistics.App
+
+**参数**:
+
+ | 参数名 | 类型 | 必填 | 说明 |
+ | -------- | -------- | -------- | -------- |
+ | toMerge | [BundleStateInfo](#bundlestateinfo) | 是 | 相同包名的应用使用统计信息。|
+
## BundleActiveState
提供应用事件的具体信息。