diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts index fac0dee04b91717085803372b94e4ccadd37a7af..c5db7867dfcd900f4f751a1d68ce61d12da01db9 100644 --- a/api/@ohos.net.statistics.d.ts +++ b/api/@ohos.net.statistics.d.ts @@ -347,6 +347,7 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. * @since 11 dynamic + * @since 20 static */ function on(type: 'netStatsChange', callback: Callback): void; @@ -377,6 +378,7 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. * @since 11 dynamic + * @since 20 static */ function off(type: 'netStatsChange', callback?: Callback): void; @@ -707,6 +709,14 @@ 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 static + */ + export type UidNetStatsInfo = Record; + /** * Parameters for obtaining detailed information on specified network traffic usage. * @interface NetworkInfo @@ -769,6 +779,7 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. * @since 12 dynamic + * @since 20 static */ function getTrafficStatsByNetwork(networkInfo: NetworkInfo): Promise; /**