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 249b1196131c0e5045409167ffb5d7ff88027e7c..f18f59468d0650400adfb50b87645c763a740b9c 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 @@ -23,7 +23,7 @@ import stats from '@ohos.bundleState'; | 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(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 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**. This API uses an asynchronous callback 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 2636b9ecefe9dbcc3b0a4589169d3d8bacef8855..50a7dd1ebe5e6b743fff84a0429e68d7395227f3 100644 --- a/en/application-dev/reference/apis/js-apis-deviceUsageStatistics.md +++ b/en/application-dev/reference/apis/js-apis-deviceUsageStatistics.md @@ -486,7 +486,7 @@ Obtains the number of FA usage records specified by **maxNum**. This API uses a getRecentlyUsedModules(callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void -Obtains the number of FA usage records. This API uses an asynchronous callback to return the records sorted by time (most recent first). +This API uses an asynchronous callback to return at most 1000 records sorted by time (most recent first). **Required permissions**: ohos.permission.BUNDLE_ACTIVE_INFO 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 be8b1d926fa528a13b053f781145405bd79fe842..cb1da3e1ba31a213a90756f5743180f4e984020a 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 @@ -23,10 +23,10 @@ import stats from '@ohos.bundleState'; | function queryAppUsagePriorityGroup(): Promise<number>; | 查询当前应用的使用优先级群组。promise形式。 | | function isIdleState(bundleName: string, callback: AsyncCallback<boolean>): void | 判断指定Bundle Name的应用当前是否是空闲状态。 | | 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 getRecentlyUsedModules(maxNum: number, callback: AsyncCallback<BundleActiveModuleInfo>): void | 根据maxNum,查询FA使用记录,返回不超过maxNum条FA使用记录。 | | 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形式返回。 | 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 06438b1f7dcf9815b302258cc65faa6ca89a0f6e..6fc85a7fbd3e206b97ca48f2ddd4c4a68ddb6a26 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-deviceUsageStatistics.md +++ b/zh-cn/application-dev/reference/apis/js-apis-deviceUsageStatistics.md @@ -485,7 +485,7 @@ getRecentlyUsedModules(maxNum?: number): Promise<Array<BundleActiveModuleI getRecentlyUsedModules(callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void -查询FA使用记录。使用CallBack形式返回数量为1000的值,FA使用记录由近及远排序。 +查询FA使用记录。使用CallBack形式返回数量不超过1000条FA使用记录(由近及远排序)。 **需要权限**:ohos.permission.BUNDLE_ACTIVE_INFO @@ -608,7 +608,7 @@ queryAppUsagePriorityGroup(callback: AsyncCallback<number>): void | 参数名 | 类型 | 必填 | 说明 | | ---------- | --------------------- | ---- | ---------------------------------------- | -| callback | AsyncCallback<number> | 是 | 指定的CallBack回调方法。返回查询的应用分组。 | +| callback | AsyncCallback<number> | 是 | 指定的CallBack回调方法。返回当前应用的分组。 | **示例**: @@ -639,7 +639,7 @@ queryAppUsagePriorityGroup(bundleName : string, callback: AsyncCallback<numbe | 参数名 | 类型 | 必填 | 说明 | | ---------- | --------------------- | ---- | ---------------------------------------- | | bundleName | string | 是 | 查询指定bundleName对应应用的分组。 | -| callback | AsyncCallback<number> | 是 | 指定的CallBack回调方法。返回查询的应用分组。 | +| callback | AsyncCallback<number> | 是 | 指定的CallBack回调方法。返回制指定bundleName的应用分组。| **示例**: