From 46429b7dedc44b3bcc9053d5016af9e2c78d6b1a Mon Sep 17 00:00:00 2001 From: Junyu Lai Date: Mon, 13 Dec 2021 07:52:45 +0000 Subject: [PATCH] [MS10.1] Move multiplySafeByRational to NetworkStatsUtils Since NetworkStats related code will be moved to the module. multiplySafeByRational in the NetworkUtilsInternal cannot be accessed after that. Thus, create another utils class that will be moved with NetworkStats code and put the function into it. Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.NetworkStatsUtilsTest Bug: 204830222 Change-Id: I96f3ac02e57b7325ed53988285770f478dee529e --- framework-t/src/android/net/NetworkStats.java | 2 +- framework-t/src/android/net/NetworkStatsCollection.java | 2 +- framework-t/src/android/net/NetworkStatsHistory.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework-t/src/android/net/NetworkStats.java b/framework-t/src/android/net/NetworkStats.java index c7ffc19338..1986b83b12 100644 --- a/framework-t/src/android/net/NetworkStats.java +++ b/framework-t/src/android/net/NetworkStats.java @@ -16,7 +16,7 @@ package android.net; -import static com.android.internal.net.NetworkUtilsInternal.multiplySafeByRational; +import static com.android.net.module.util.NetworkStatsUtils.multiplySafeByRational; import android.annotation.IntDef; import android.annotation.NonNull; diff --git a/framework-t/src/android/net/NetworkStatsCollection.java b/framework-t/src/android/net/NetworkStatsCollection.java index 0d3b9ed4e3..8d1347e25b 100644 --- a/framework-t/src/android/net/NetworkStatsCollection.java +++ b/framework-t/src/android/net/NetworkStatsCollection.java @@ -30,7 +30,7 @@ import static android.net.NetworkStats.UID_ALL; import static android.net.TrafficStats.UID_REMOVED; import static android.text.format.DateUtils.WEEK_IN_MILLIS; -import static com.android.internal.net.NetworkUtilsInternal.multiplySafeByRational; +import static com.android.net.module.util.NetworkStatsUtils.multiplySafeByRational; import android.os.Binder; import android.service.NetworkStatsCollectionKeyProto; diff --git a/framework-t/src/android/net/NetworkStatsHistory.java b/framework-t/src/android/net/NetworkStatsHistory.java index a875e1ad45..3eef4ee6f8 100644 --- a/framework-t/src/android/net/NetworkStatsHistory.java +++ b/framework-t/src/android/net/NetworkStatsHistory.java @@ -28,8 +28,8 @@ import static android.net.NetworkStatsHistory.ParcelUtils.readLongArray; import static android.net.NetworkStatsHistory.ParcelUtils.writeLongArray; import static android.text.format.DateUtils.SECOND_IN_MILLIS; -import static com.android.internal.net.NetworkUtilsInternal.multiplySafeByRational; import static com.android.internal.util.ArrayUtils.total; +import static com.android.net.module.util.NetworkStatsUtils.multiplySafeByRational; import android.compat.annotation.UnsupportedAppUsage; import android.os.Build;