From 51fb94511721c964e33b2f4ed34875ea29186594 Mon Sep 17 00:00:00 2001 From: leo9001 Date: Wed, 10 Sep 2025 18:20:17 +0800 Subject: [PATCH] [issue]statistics ani [issue]statistics ani Issue: https://gitee.com/openharmony/communication_netmanager_base/issues/ICX9VV Signed-off-by: leo9001 --- api/@ohos.net.statistics.d.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts index 84fed33d04..1137f71c7b 100644 --- a/api/@ohos.net.statistics.d.ts +++ b/api/@ohos.net.statistics.d.ts @@ -346,7 +346,8 @@ declare namespace statistics { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'netStatsChange', callback: Callback): void; @@ -376,7 +377,8 @@ declare namespace statistics { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'netStatsChange', callback?: Callback): void; @@ -707,6 +709,15 @@ declare namespace statistics { [uid: int]: NetStatsInfo; }; + /** + * {@link NetStatsInfo} for every UID. Key is UID. + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. + * @since 20 + * @arkts 1.2 + */ + export type UidNetStatsInfo = Record; + /** * Parameters for obtaining detailed information on specified network traffic usage. * @interface NetworkInfo @@ -768,7 +779,8 @@ declare namespace statistics { * @throws { BusinessError } 2103017 - Failed to read the database. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getTrafficStatsByNetwork(networkInfo: NetworkInfo): Promise; /** -- Gitee