summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-11-07 16:26:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-11-07 16:26:24 +0000
commitb4cabf89a64d19881df86fa25fbed534925e8d6b (patch)
tree356d3dd6be4d898e3d1f967396a858075a2d229e
parentc9efa3deee6cbd3ce5087f8096ad3ba440eac0f9 (diff)
parent9821dd10ba7accfd27db30ab5fc09d9ef00f5dcb (diff)
Merge changes I5c15ef91,I2bcd19a3
* changes: WifiStack: Turn off proguard optimization of proto classes Revert "Revert "WifiStack: Statically link protobuf lite""
-rw-r--r--service/Android.bp6
-rw-r--r--service/jarjar-rules-shared.txt2
-rw-r--r--service/java/com/android/server/wifi/AvailableNetworkNotifier.java6
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java8
-rw-r--r--service/java/com/android/server/wifi/DppMetrics.java2
-rw-r--r--service/java/com/android/server/wifi/OpenNetworkNotifier.java2
-rw-r--r--service/java/com/android/server/wifi/ScoreCardBasedScorer.java3
-rw-r--r--service/java/com/android/server/wifi/WifiCandidates.java1
-rw-r--r--service/java/com/android/server/wifi/WifiDataStall.java2
-rw-r--r--service/java/com/android/server/wifi/WifiMetrics.java50
-rw-r--r--service/java/com/android/server/wifi/WifiNetworkFactory.java2
-rw-r--r--service/java/com/android/server/wifi/WifiNetworkSelector.java2
-rw-r--r--service/java/com/android/server/wifi/WifiPowerMetrics.java4
-rw-r--r--service/java/com/android/server/wifi/WifiScoreCard.java17
-rw-r--r--service/java/com/android/server/wifi/WifiWakeMetrics.java2
-rw-r--r--service/java/com/android/server/wifi/aware/WifiAwareMetrics.java2
-rw-r--r--service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java6
-rw-r--r--service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java2
-rw-r--r--service/java/com/android/server/wifi/rtt/RttMetrics.java2
-rw-r--r--service/java/com/android/server/wifi/rtt/RttServiceImpl.java2
-rw-r--r--service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java2
-rw-r--r--service/java/com/android/server/wifi/util/IntCounter.java2
-rw-r--r--service/java/com/android/server/wifi/util/IntHistogram.java2
-rw-r--r--service/proguard.flags3
-rw-r--r--service/proto/src/metrics.proto2
-rw-r--r--service/proto/src/scorecard.proto2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java8
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/DppMetricsTest.java4
-rw-r--r--tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java4
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java40
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiMetricsTestUtil.java12
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiPowerMetricsTest.java4
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiScoreCardProtoTest.java4
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java10
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiWakeMetricsTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java6
-rw-r--r--tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/rtt/RttMetricsTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/util/IntCounterTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/util/IntHistogramTest.java2
47 files changed, 134 insertions, 118 deletions
diff --git a/service/Android.bp b/service/Android.bp
index a212fc62a..ade028eae 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -85,7 +85,6 @@ java_library {
libs: [
"error_prone_annotations",
- "libprotobuf-java-lite",
"jsr305",
"services",
],
@@ -106,6 +105,11 @@ java_library {
"androidx.annotation_annotation",
"bouncycastle-unbundled",
"ksoap2",
+ // Note: libprotobuf-java-lite uses a few core platform APIs which
+ // does show up as @hide API usage. But, this can be safely ignored
+ // since the library uses reflection to ensure that the OS does provide
+ // the necessary core platform APIs.
+ "libprotobuf-java-lite",
"libnanohttpd",
"services.net",
"services.wifi",
diff --git a/service/jarjar-rules-shared.txt b/service/jarjar-rules-shared.txt
index 45c80495c..8fa2b1a1e 100644
--- a/service/jarjar-rules-shared.txt
+++ b/service/jarjar-rules-shared.txt
@@ -21,3 +21,5 @@ rule android.os.HandlerExecutor* com.android.server.wifi.os.HandlerExecutor@1
# Use our statically linked bouncy castle library
rule org.bouncycastle.** com.android.server.wifi.bouncycastle.@1
+# Use our statically linked protobuf library
+rule com.google.protobuf.** com.android.server.wifi.protobuf.@1
diff --git a/service/java/com/android/server/wifi/AvailableNetworkNotifier.java b/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
index 32e2e0959..1ec6fba4a 100644
--- a/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
+++ b/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
@@ -46,7 +46,8 @@ import android.util.ArraySet;
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto
+ .ConnectToNetworkNotificationAndActionCount;
import com.android.server.wifi.util.ScanResultUtil;
import java.io.FileDescriptor;
@@ -141,7 +142,8 @@ public class AvailableNetworkNotifier {
/**
* The nominator id for this class, from
- * {@link com.android.server.wifi.nano.WifiMetricsProto.ConnectionEvent.ConnectionNominator}
+ * {@link com.android.server.wifi.proto.nano.WifiMetricsProto.ConnectionEvent.
+ * ConnectionNominator}
*/
private final int mNominatorId;
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index e262e321e..31bb95f9a 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -109,11 +109,11 @@ import com.android.server.wifi.hotspot2.IconEvent;
import com.android.server.wifi.hotspot2.NetworkDetail;
import com.android.server.wifi.hotspot2.PasspointManager;
import com.android.server.wifi.hotspot2.WnmData;
-import com.android.server.wifi.nano.WifiMetricsProto;
-import com.android.server.wifi.nano.WifiMetricsProto.StaEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiIsUnusableEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiUsabilityStats;
import com.android.server.wifi.p2p.WifiP2pServiceImpl;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.StaEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStats;
import com.android.server.wifi.util.ExternalCallbackTracker;
import com.android.server.wifi.util.NativeUtil;
import com.android.server.wifi.util.TelephonyUtil;
diff --git a/service/java/com/android/server/wifi/DppMetrics.java b/service/java/com/android/server/wifi/DppMetrics.java
index ef26b708a..231e7f1a4 100644
--- a/service/java/com/android/server/wifi/DppMetrics.java
+++ b/service/java/com/android/server/wifi/DppMetrics.java
@@ -31,7 +31,7 @@ import android.net.wifi.EasyConnectStatusCallback;
import android.util.SparseIntArray;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.IntHistogram;
import java.io.PrintWriter;
diff --git a/service/java/com/android/server/wifi/OpenNetworkNotifier.java b/service/java/com/android/server/wifi/OpenNetworkNotifier.java
index dffee2dc2..5e36f1308 100644
--- a/service/java/com/android/server/wifi/OpenNetworkNotifier.java
+++ b/service/java/com/android/server/wifi/OpenNetworkNotifier.java
@@ -21,7 +21,7 @@ import android.os.Looper;
import android.provider.Settings;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
/**
* This class handles the "open wi-fi network available" notification
diff --git a/service/java/com/android/server/wifi/ScoreCardBasedScorer.java b/service/java/com/android/server/wifi/ScoreCardBasedScorer.java
index 96c8e6c09..0dfc0e476 100644
--- a/service/java/com/android/server/wifi/ScoreCardBasedScorer.java
+++ b/service/java/com/android/server/wifi/ScoreCardBasedScorer.java
@@ -20,7 +20,8 @@ import android.annotation.NonNull;
import com.android.server.wifi.WifiCandidates.Candidate;
import com.android.server.wifi.WifiCandidates.ScoredCandidate;
-import com.android.server.wifi.WifiScoreCardProto.Event;
+import com.android.server.wifi.proto.WifiScoreCardProto;
+import com.android.server.wifi.proto.WifiScoreCardProto.Event;
import java.util.Collection;
diff --git a/service/java/com/android/server/wifi/WifiCandidates.java b/service/java/com/android/server/wifi/WifiCandidates.java
index ec34b6ece..00e67f44d 100644
--- a/service/java/com/android/server/wifi/WifiCandidates.java
+++ b/service/java/com/android/server/wifi/WifiCandidates.java
@@ -24,6 +24,7 @@ import android.net.wifi.WifiConfiguration;
import android.util.ArrayMap;
import com.android.internal.util.Preconditions;
+import com.android.server.wifi.proto.WifiScoreCardProto;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/service/java/com/android/server/wifi/WifiDataStall.java b/service/java/com/android/server/wifi/WifiDataStall.java
index e32c87c9e..70c170d10 100644
--- a/service/java/com/android/server/wifi/WifiDataStall.java
+++ b/service/java/com/android/server/wifi/WifiDataStall.java
@@ -20,7 +20,7 @@ import android.content.Context;
import android.net.wifi.WifiInfo;
import android.provider.Settings;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiIsUnusableEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent;
/**
* Looks for Wifi data stalls
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java
index 6028d4453..c34becf75 100644
--- a/service/java/com/android/server/wifi/WifiMetrics.java
+++ b/service/java/com/android/server/wifi/WifiMetrics.java
@@ -54,32 +54,32 @@ import com.android.server.wifi.hotspot2.PasspointManager;
import com.android.server.wifi.hotspot2.PasspointMatch;
import com.android.server.wifi.hotspot2.PasspointProvider;
import com.android.server.wifi.hotspot2.Utils;
-import com.android.server.wifi.nano.WifiMetricsProto;
-import com.android.server.wifi.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
-import com.android.server.wifi.nano.WifiMetricsProto.DeviceMobilityStatePnoScanStats;
-import com.android.server.wifi.nano.WifiMetricsProto.ExperimentValues;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkProbeStats;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkProbeStats.ExperimentProbeCounts;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkProbeStats.LinkProbeFailureReasonCount;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkSpeedCount;
-import com.android.server.wifi.nano.WifiMetricsProto.NetworkSelectionExperimentDecisions;
-import com.android.server.wifi.nano.WifiMetricsProto.PasspointProfileTypeCount;
-import com.android.server.wifi.nano.WifiMetricsProto.PasspointProvisionStats;
-import com.android.server.wifi.nano.WifiMetricsProto.PasspointProvisionStats.ProvisionFailureCount;
-import com.android.server.wifi.nano.WifiMetricsProto.PnoScanMetrics;
-import com.android.server.wifi.nano.WifiMetricsProto.SoftApConnectedClientsEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.StaEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.StaEvent.ConfigInfo;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiIsUnusableEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiLinkLayerUsageStats;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiLockStats;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiNetworkRequestApiLog;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiNetworkSuggestionApiLog;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiToggleStats;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiUsabilityStats;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiUsabilityStatsEntry;
-import com.android.server.wifi.nano.WifiMetricsProto.WpsMetrics;
import com.android.server.wifi.p2p.WifiP2pMetrics;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.DeviceMobilityStatePnoScanStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.ExperimentValues;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkProbeStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkProbeStats.ExperimentProbeCounts;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkProbeStats.LinkProbeFailureReasonCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkSpeedCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.NetworkSelectionExperimentDecisions;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.PasspointProfileTypeCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.PasspointProvisionStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.PasspointProvisionStats.ProvisionFailureCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.PnoScanMetrics;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.SoftApConnectedClientsEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.StaEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.StaEvent.ConfigInfo;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiLinkLayerUsageStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiLockStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiNetworkRequestApiLog;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiNetworkSuggestionApiLog;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiToggleStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStatsEntry;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WpsMetrics;
import com.android.server.wifi.rtt.RttMetrics;
import com.android.server.wifi.util.ExternalCallbackTracker;
import com.android.server.wifi.util.InformationElementUtil;
diff --git a/service/java/com/android/server/wifi/WifiNetworkFactory.java b/service/java/com/android/server/wifi/WifiNetworkFactory.java
index bea181ce3..9b06d6283 100644
--- a/service/java/com/android/server/wifi/WifiNetworkFactory.java
+++ b/service/java/com/android/server/wifi/WifiNetworkFactory.java
@@ -55,7 +55,7 @@ import android.util.Log;
import android.util.Pair;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.ExternalCallbackTracker;
import com.android.server.wifi.util.ScanResultUtil;
import com.android.server.wifi.util.WifiPermissionsUtil;
diff --git a/service/java/com/android/server/wifi/WifiNetworkSelector.java b/service/java/com/android/server/wifi/WifiNetworkSelector.java
index 49254e949..b392a3724 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSelector.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSelector.java
@@ -37,7 +37,7 @@ import android.util.Pair;
import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.Preconditions;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.ScanResultUtil;
import java.lang.annotation.Retention;
diff --git a/service/java/com/android/server/wifi/WifiPowerMetrics.java b/service/java/com/android/server/wifi/WifiPowerMetrics.java
index 0e83a5c97..8c9506e95 100644
--- a/service/java/com/android/server/wifi/WifiPowerMetrics.java
+++ b/service/java/com/android/server/wifi/WifiPowerMetrics.java
@@ -19,8 +19,8 @@ import android.os.BatteryStatsManager;
import android.os.connectivity.WifiBatteryStats;
import android.text.format.DateUtils;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiPowerStats;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiRadioUsage;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiPowerStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiRadioUsage;
import java.io.PrintWriter;
import java.text.DecimalFormat;
diff --git a/service/java/com/android/server/wifi/WifiScoreCard.java b/service/java/com/android/server/wifi/WifiScoreCard.java
index 77abdb1e9..e7a8715cf 100644
--- a/service/java/com/android/server/wifi/WifiScoreCard.java
+++ b/service/java/com/android/server/wifi/WifiScoreCard.java
@@ -31,14 +31,15 @@ import android.util.Pair;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.Preconditions;
-import com.android.server.wifi.WifiScoreCardProto.AccessPoint;
-import com.android.server.wifi.WifiScoreCardProto.Event;
-import com.android.server.wifi.WifiScoreCardProto.HistogramBucket;
-import com.android.server.wifi.WifiScoreCardProto.Network;
-import com.android.server.wifi.WifiScoreCardProto.NetworkList;
-import com.android.server.wifi.WifiScoreCardProto.SecurityType;
-import com.android.server.wifi.WifiScoreCardProto.Signal;
-import com.android.server.wifi.WifiScoreCardProto.UnivariateStatistic;
+import com.android.server.wifi.proto.WifiScoreCardProto;
+import com.android.server.wifi.proto.WifiScoreCardProto.AccessPoint;
+import com.android.server.wifi.proto.WifiScoreCardProto.Event;
+import com.android.server.wifi.proto.WifiScoreCardProto.HistogramBucket;
+import com.android.server.wifi.proto.WifiScoreCardProto.Network;
+import com.android.server.wifi.proto.WifiScoreCardProto.NetworkList;
+import com.android.server.wifi.proto.WifiScoreCardProto.SecurityType;
+import com.android.server.wifi.proto.WifiScoreCardProto.Signal;
+import com.android.server.wifi.proto.WifiScoreCardProto.UnivariateStatistic;
import com.android.server.wifi.util.IntHistogram;
import com.android.server.wifi.util.NativeUtil;
diff --git a/service/java/com/android/server/wifi/WifiWakeMetrics.java b/service/java/com/android/server/wifi/WifiWakeMetrics.java
index 5b700062d..64b13be45 100644
--- a/service/java/com/android/server/wifi/WifiWakeMetrics.java
+++ b/service/java/com/android/server/wifi/WifiWakeMetrics.java
@@ -20,7 +20,7 @@ import android.os.SystemClock;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiWakeStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiWakeStats;
import java.io.PrintWriter;
import java.util.ArrayList;
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareMetrics.java b/service/java/com/android/server/wifi/aware/WifiAwareMetrics.java
index b47f0a309..1fb5a5306 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareMetrics.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareMetrics.java
@@ -25,7 +25,7 @@ import android.util.SparseIntArray;
import com.android.internal.annotations.VisibleForTesting;
import com.android.server.wifi.Clock;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.MetricsUtils;
import java.io.FileDescriptor;
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java b/service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java
index c3d007d0e..085a837fa 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java
@@ -22,9 +22,9 @@ import android.net.wifi.p2p.WifiP2pGroupList;
import android.util.Log;
import com.android.server.wifi.Clock;
-import com.android.server.wifi.nano.WifiMetricsProto.GroupEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.P2pConnectionEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiP2pStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.GroupEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiP2pStats;
import java.io.PrintWriter;
import java.util.ArrayList;
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
index 783dac970..6ab0129f8 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
@@ -90,7 +90,7 @@ import com.android.internal.util.StateMachine;
import com.android.server.wifi.FrameworkFacade;
import com.android.server.wifi.WifiInjector;
import com.android.server.wifi.WifiLog;
-import com.android.server.wifi.nano.WifiMetricsProto.P2pConnectionEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent;
import com.android.server.wifi.util.WifiAsyncChannel;
import com.android.server.wifi.util.WifiHandler;
import com.android.server.wifi.util.WifiPermissionsUtil;
diff --git a/service/java/com/android/server/wifi/rtt/RttMetrics.java b/service/java/com/android/server/wifi/rtt/RttMetrics.java
index b3ec65940..33a75b761 100644
--- a/service/java/com/android/server/wifi/rtt/RttMetrics.java
+++ b/service/java/com/android/server/wifi/rtt/RttMetrics.java
@@ -31,7 +31,7 @@ import android.util.SparseArray;
import android.util.SparseIntArray;
import com.android.server.wifi.Clock;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.MetricsUtils;
import java.io.FileDescriptor;
diff --git a/service/java/com/android/server/wifi/rtt/RttServiceImpl.java b/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
index 3b89a64e5..b3c2f42c6 100644
--- a/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
+++ b/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
@@ -57,7 +57,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.WakeupMessage;
import com.android.server.wifi.Clock;
import com.android.server.wifi.FrameworkFacade;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.WifiPermissionsUtil;
import org.json.JSONException;
diff --git a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
index 3adf26f49..63b7c95fb 100644
--- a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
+++ b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
@@ -60,7 +60,7 @@ import com.android.server.wifi.WifiInjector;
import com.android.server.wifi.WifiLog;
import com.android.server.wifi.WifiMetrics;
import com.android.server.wifi.WifiNative;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.scanner.ChannelHelper.ChannelCollection;
import com.android.server.wifi.util.ScanResultUtil;
import com.android.server.wifi.util.WifiHandler;
diff --git a/service/java/com/android/server/wifi/util/IntCounter.java b/service/java/com/android/server/wifi/util/IntCounter.java
index 94924c248..40be9380c 100644
--- a/service/java/com/android/server/wifi/util/IntCounter.java
+++ b/service/java/com/android/server/wifi/util/IntCounter.java
@@ -18,7 +18,7 @@ package com.android.server.wifi.util;
import android.util.SparseIntArray;
-import com.android.server.wifi.nano.WifiMetricsProto.Int32Count;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.Int32Count;
import java.lang.reflect.Array;
import java.util.Iterator;
diff --git a/service/java/com/android/server/wifi/util/IntHistogram.java b/service/java/com/android/server/wifi/util/IntHistogram.java
index 776a48cbb..83a491355 100644
--- a/service/java/com/android/server/wifi/util/IntHistogram.java
+++ b/service/java/com/android/server/wifi/util/IntHistogram.java
@@ -19,7 +19,7 @@ package com.android.server.wifi.util;
import android.annotation.NonNull;
import android.util.SparseIntArray;
-import com.android.server.wifi.nano.WifiMetricsProto.HistogramBucketInt32;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.HistogramBucketInt32;
import java.lang.reflect.Array;
import java.util.Arrays;
diff --git a/service/proguard.flags b/service/proguard.flags
index 706449103..84d9556f8 100644
--- a/service/proguard.flags
+++ b/service/proguard.flags
@@ -1 +1,2 @@
-# TBD
+# Prevent proguard from stripping out any proto fields.
+-keep class com.android.server.wifi.proto.** { *; }
diff --git a/service/proto/src/metrics.proto b/service/proto/src/metrics.proto
index b98282c5c..abd70d654 100644
--- a/service/proto/src/metrics.proto
+++ b/service/proto/src/metrics.proto
@@ -18,7 +18,7 @@ syntax = "proto2";
package com_android_server_wifi;
-option java_package = "com.android.server.wifi";
+option java_package = "com.android.server.wifi.proto";
option java_outer_classname = "WifiMetricsProto";
// The information about the Wifi events.
diff --git a/service/proto/src/scorecard.proto b/service/proto/src/scorecard.proto
index 28a489887..7e42287f4 100644
--- a/service/proto/src/scorecard.proto
+++ b/service/proto/src/scorecard.proto
@@ -18,7 +18,7 @@ syntax = "proto2";
package com_android_server_wifi;
-option java_package = "com.android.server.wifi";
+option java_package = "com.android.server.wifi.proto";
option java_outer_classname = "WifiScoreCardProto";
message NetworkList {
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
index bec150f99..f4b47776e 100644
--- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
@@ -94,11 +94,11 @@ import com.android.internal.util.StateMachine;
import com.android.server.wifi.hotspot2.NetworkDetail;
import com.android.server.wifi.hotspot2.PasspointManager;
import com.android.server.wifi.hotspot2.PasspointProvisioningTestUtil;
-import com.android.server.wifi.nano.WifiMetricsProto;
-import com.android.server.wifi.nano.WifiMetricsProto.StaEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiIsUnusableEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiUsabilityStats;
import com.android.server.wifi.p2p.WifiP2pServiceImpl;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.StaEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStats;
import com.android.server.wifi.util.WifiPermissionsUtil;
import com.android.server.wifi.util.WifiPermissionsWrapper;
diff --git a/tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java b/tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java
index 871218f1f..517d69aff 100644
--- a/tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java
+++ b/tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java
@@ -18,6 +18,8 @@ package com.android.server.wifi;
import android.util.ArrayMap;
+import com.android.server.wifi.proto.WifiScoreCardProto;
+
import java.util.Map;
public final class ConcreteCandidate implements WifiCandidates.Candidate {
diff --git a/tests/wifitests/src/com/android/server/wifi/DppMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/DppMetricsTest.java
index 303c6e7d7..fd43578b1 100644
--- a/tests/wifitests/src/com/android/server/wifi/DppMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/DppMetricsTest.java
@@ -34,8 +34,8 @@ import static org.junit.Assert.assertTrue;
import android.test.suitebuilder.annotation.SmallTest;
-import com.android.server.wifi.nano.WifiMetricsProto;
-import com.android.server.wifi.nano.WifiMetricsProto.HistogramBucketInt32;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.HistogramBucketInt32;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java b/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
index f88272d45..f1eeb389d 100644
--- a/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
@@ -54,8 +54,8 @@ import android.provider.Settings;
import androidx.test.filters.SmallTest;
-import com.android.server.wifi.nano.WifiMetricsProto;
-import com.android.server.wifi.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java b/tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java
index 898409f1a..4b26664e8 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java
@@ -29,7 +29,7 @@ import android.provider.Settings;
import androidx.test.filters.SmallTest;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiIsUnusableEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
index b3f1ed12e..27094b240 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
@@ -33,7 +33,7 @@ import static com.android.server.wifi.WifiMetricsTestUtil.buildInt32Count;
import static com.android.server.wifi.WifiMetricsTestUtil.buildLinkProbeFailureReasonCount;
import static com.android.server.wifi.WifiMetricsTestUtil.buildLinkProbeFailureStaEvent;
import static com.android.server.wifi.WifiMetricsTestUtil.buildLinkProbeSuccessStaEvent;
-import static com.android.server.wifi.nano.WifiMetricsProto.StaEvent.TYPE_LINK_PROBE;
+import static com.android.server.wifi.proto.nano.WifiMetricsProto.StaEvent.TYPE_LINK_PROBE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -81,26 +81,26 @@ import com.android.server.wifi.hotspot2.NetworkDetail;
import com.android.server.wifi.hotspot2.PasspointManager;
import com.android.server.wifi.hotspot2.PasspointMatch;
import com.android.server.wifi.hotspot2.PasspointProvider;
-import com.android.server.wifi.nano.WifiMetricsProto;
-import com.android.server.wifi.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
-import com.android.server.wifi.nano.WifiMetricsProto.DeviceMobilityStatePnoScanStats;
-import com.android.server.wifi.nano.WifiMetricsProto.HistogramBucketInt32;
-import com.android.server.wifi.nano.WifiMetricsProto.Int32Count;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkProbeStats;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkProbeStats.ExperimentProbeCounts;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkProbeStats.LinkProbeFailureReasonCount;
-import com.android.server.wifi.nano.WifiMetricsProto.NetworkSelectionExperimentDecisions;
-import com.android.server.wifi.nano.WifiMetricsProto.PasspointProfileTypeCount;
-import com.android.server.wifi.nano.WifiMetricsProto.PasspointProvisionStats;
-import com.android.server.wifi.nano.WifiMetricsProto.PnoScanMetrics;
-import com.android.server.wifi.nano.WifiMetricsProto.SoftApConnectedClientsEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.StaEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiIsUnusableEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiRadioUsage;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiUsabilityStats;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiUsabilityStatsEntry;
-import com.android.server.wifi.nano.WifiMetricsProto.WpsMetrics;
import com.android.server.wifi.p2p.WifiP2pMetrics;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.DeviceMobilityStatePnoScanStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.HistogramBucketInt32;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.Int32Count;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkProbeStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkProbeStats.ExperimentProbeCounts;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkProbeStats.LinkProbeFailureReasonCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.NetworkSelectionExperimentDecisions;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.PasspointProfileTypeCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.PasspointProvisionStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.PnoScanMetrics;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.SoftApConnectedClientsEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.StaEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiRadioUsage;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStatsEntry;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WpsMetrics;
import com.android.server.wifi.rtt.RttMetrics;
import com.android.server.wifi.util.ExternalCallbackTracker;
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTestUtil.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTestUtil.java
index 0e9f661ca..2be553840 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTestUtil.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTestUtil.java
@@ -20,12 +20,12 @@ import static org.junit.Assert.assertEquals;
import android.net.wifi.WifiManager;
-import com.android.server.wifi.nano.WifiMetricsProto.DeviceMobilityStatePnoScanStats;
-import com.android.server.wifi.nano.WifiMetricsProto.HistogramBucketInt32;
-import com.android.server.wifi.nano.WifiMetricsProto.Int32Count;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkProbeStats.ExperimentProbeCounts;
-import com.android.server.wifi.nano.WifiMetricsProto.LinkProbeStats.LinkProbeFailureReasonCount;
-import com.android.server.wifi.nano.WifiMetricsProto.StaEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.DeviceMobilityStatePnoScanStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.HistogramBucketInt32;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.Int32Count;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkProbeStats.ExperimentProbeCounts;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.LinkProbeStats.LinkProbeFailureReasonCount;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.StaEvent;
import java.util.Arrays;
import java.util.Comparator;
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
index c9e7db2f9..2eaa7b944 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
@@ -68,7 +68,7 @@ import android.util.Xml;
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.FastXmlSerializer;
import com.android.server.wifi.WifiNetworkFactory.AccessPoint;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.ScanResultUtil;
import com.android.server.wifi.util.WifiPermissionsUtil;
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
index adb1be81c..bf610c2c9 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
@@ -41,7 +41,7 @@ import androidx.test.filters.SmallTest;
import com.android.internal.R;
import com.android.server.wifi.WifiNetworkSelectorTestUtil.ScanDetailsAndWifiConfigs;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiPowerMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiPowerMetricsTest.java
index b1ef1a032..dfd686723 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiPowerMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiPowerMetricsTest.java
@@ -24,8 +24,8 @@ import android.text.format.DateUtils;
import androidx.test.filters.SmallTest;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiPowerStats;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiRadioUsage;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiPowerStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiRadioUsage;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiScoreCardProtoTest.java b/tests/wifitests/src/com/android/server/wifi/WifiScoreCardProtoTest.java
index d02ae2ed4..15a6f598e 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiScoreCardProtoTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiScoreCardProtoTest.java
@@ -22,12 +22,14 @@ import android.net.wifi.WifiConfiguration;
import androidx.test.filters.SmallTest;
+import com.android.server.wifi.proto.WifiScoreCardProto;
+
import org.junit.Before;
import org.junit.Test;
import org.mockito.MockitoAnnotations;
/**
- * Unit tests for {@link com.android.server.wifi.WifiScoreCardProto}.
+ * Unit tests for {@link com.android.server.wifi.proto.WifiScoreCardProto}.
*/
@SmallTest
public class WifiScoreCardProtoTest extends WifiBaseTest {
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java b/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java
index b78b248fa..69ef041d3 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java
@@ -29,11 +29,11 @@ import android.util.Pair;
import androidx.test.filters.SmallTest;
-import com.android.server.wifi.WifiScoreCardProto.AccessPoint;
-import com.android.server.wifi.WifiScoreCardProto.Event;
-import com.android.server.wifi.WifiScoreCardProto.Network;
-import com.android.server.wifi.WifiScoreCardProto.NetworkList;
-import com.android.server.wifi.WifiScoreCardProto.Signal;
+import com.android.server.wifi.proto.WifiScoreCardProto.AccessPoint;
+import com.android.server.wifi.proto.WifiScoreCardProto.Event;
+import com.android.server.wifi.proto.WifiScoreCardProto.Network;
+import com.android.server.wifi.proto.WifiScoreCardProto.NetworkList;
+import com.android.server.wifi.proto.WifiScoreCardProto.Signal;
import com.android.server.wifi.util.IntHistogram;
import org.junit.Before;
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiWakeMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiWakeMetricsTest.java
index a27b141a1..760a9a2d4 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiWakeMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiWakeMetricsTest.java
@@ -24,7 +24,7 @@ import static junit.framework.Assert.assertTrue;
import androidx.test.filters.SmallTest;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiWakeStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiWakeStats;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java
index 47772bd7e..65edbbb79 100644
--- a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java
@@ -34,7 +34,7 @@ import androidx.test.filters.SmallTest;
import com.android.server.wifi.Clock;
import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.MetricsUtils;
import com.android.server.wifi.util.WifiPermissionsUtil;
diff --git a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java
index bc69ec68a..bbfbd37b1 100644
--- a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java
@@ -25,9 +25,9 @@ import androidx.test.filters.SmallTest;
import com.android.server.wifi.Clock;
import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.nano.WifiMetricsProto.GroupEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.P2pConnectionEvent;
-import com.android.server.wifi.nano.WifiMetricsProto.WifiP2pStats;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.GroupEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiP2pStats;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
index 52439e42e..483b60686 100644
--- a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
@@ -80,7 +80,7 @@ import com.android.server.wifi.FrameworkFacade;
import com.android.server.wifi.HalDeviceManager;
import com.android.server.wifi.WifiBaseTest;
import com.android.server.wifi.WifiInjector;
-import com.android.server.wifi.nano.WifiMetricsProto.P2pConnectionEvent;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent;
import com.android.server.wifi.util.WifiPermissionsUtil;
import com.android.server.wifi.util.WifiPermissionsWrapper;
diff --git a/tests/wifitests/src/com/android/server/wifi/rtt/RttMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/rtt/RttMetricsTest.java
index 9dfd6586d..a989f0903 100644
--- a/tests/wifitests/src/com/android/server/wifi/rtt/RttMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/rtt/RttMetricsTest.java
@@ -30,7 +30,7 @@ import androidx.test.filters.SmallTest;
import com.android.server.wifi.Clock;
import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import org.junit.Before;
import org.junit.Rule;
diff --git a/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java
index 7f456482b..76f8b0f63 100644
--- a/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java
@@ -75,7 +75,7 @@ import androidx.test.filters.SmallTest;
import com.android.server.wifi.Clock;
import com.android.server.wifi.FrameworkFacade;
import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.nano.WifiMetricsProto;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.util.WifiPermissionsUtil;
import org.junit.After;
diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
index 3de22ceb0..397c61d2d 100644
--- a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
@@ -89,8 +89,8 @@ import com.android.server.wifi.WifiMetrics;
import com.android.server.wifi.WifiNative;
import com.android.server.wifi.WifiPowerMetrics;
import com.android.server.wifi.aware.WifiAwareMetrics;
-import com.android.server.wifi.nano.WifiMetricsProto;
import com.android.server.wifi.p2p.WifiP2pMetrics;
+import com.android.server.wifi.proto.nano.WifiMetricsProto;
import com.android.server.wifi.rtt.RttMetrics;
import com.android.server.wifi.util.WifiAsyncChannel;
import com.android.server.wifi.util.WifiPermissionsUtil;
diff --git a/tests/wifitests/src/com/android/server/wifi/util/IntCounterTest.java b/tests/wifitests/src/com/android/server/wifi/util/IntCounterTest.java
index d82f07334..e3029ea57 100644
--- a/tests/wifitests/src/com/android/server/wifi/util/IntCounterTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/util/IntCounterTest.java
@@ -22,7 +22,7 @@ import static com.android.server.wifi.WifiMetricsTestUtil.buildInt32Count;
import androidx.test.filters.SmallTest;
import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.nano.WifiMetricsProto.Int32Count;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.Int32Count;
import org.junit.Test;
diff --git a/tests/wifitests/src/com/android/server/wifi/util/IntHistogramTest.java b/tests/wifitests/src/com/android/server/wifi/util/IntHistogramTest.java
index 888b5f2ac..9e291af16 100644
--- a/tests/wifitests/src/com/android/server/wifi/util/IntHistogramTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/util/IntHistogramTest.java
@@ -24,7 +24,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
import androidx.test.filters.SmallTest;
import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.nano.WifiMetricsProto.HistogramBucketInt32;
+import com.android.server.wifi.proto.nano.WifiMetricsProto.HistogramBucketInt32;
import org.junit.Before;
import org.junit.Rule;