diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts index 84fed33d04044631d44acc2b8085fbbfac8e201b..1137f71c7b217899afaf4a8defd58462f23917fe 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; /**