summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
l---------service/ServiceWifiResources/res/values-mcc310-mnc9501
-rw-r--r--service/ServiceWifiResources/res/values-mcc310-mnc950/config.xml28
l---------service/ServiceWifiResources/res/values-mcc311-mnc1802
-rw-r--r--service/ServiceWifiResources/res/values-mcc312-mnc670/config.xml27
l---------service/ServiceWifiResources/res/values-mcc313-mnc1401
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java2
-rw-r--r--service/java/com/android/server/wifi/LastMileLogger.java29
-rw-r--r--service/java/com/android/server/wifi/WifiInjector.java3
-rw-r--r--service/tests/wifitests/src/com/android/server/wifi/LastMileLoggerTest.java43
-rw-r--r--service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java4
-rw-r--r--service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java2
-rw-r--r--service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java19
12 files changed, 126 insertions, 35 deletions
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc950 b/service/ServiceWifiResources/res/values-mcc310-mnc950
deleted file mode 120000
index 179ce02a94..0000000000
--- a/service/ServiceWifiResources/res/values-mcc310-mnc950
+++ /dev/null
@@ -1 +0,0 @@
-values-mcc310-mnc030 \ No newline at end of file
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc950/config.xml b/service/ServiceWifiResources/res/values-mcc310-mnc950/config.xml
new file mode 100644
index 0000000000..c6fdb89325
--- /dev/null
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc950/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2025 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <integer name="config_wifiFrameworkSecureNetworkBonus">540</integer>
+
+ <string-array translatable="false" name="config_wifiOobPseudonymEnabled_carrier_overrides">
+ <item><xliff:g id="carrier_id_prefix">:::1187:::</xliff:g>true</item>
+ </string-array>
+
+ <!-- Carrier specific override for the URL of entitlement server retrieving OOB pseudonym. -->
+ <string-array translatable="false" name="config_wifiOobPseudonymEntitlementServerUrl_carrier_overrides">
+ <item><xliff:g id="carrier_id_prefix">:::1187:::</xliff:g>https://sentitlement2.npc.mobilephone.net/WFC</item>
+ </string-array>
+</resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc180 b/service/ServiceWifiResources/res/values-mcc311-mnc180
index 179ce02a94..c885455563 120000
--- a/service/ServiceWifiResources/res/values-mcc311-mnc180
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc180
@@ -1 +1 @@
-values-mcc310-mnc030 \ No newline at end of file
+values-mcc310-mnc950 \ No newline at end of file
diff --git a/service/ServiceWifiResources/res/values-mcc312-mnc670/config.xml b/service/ServiceWifiResources/res/values-mcc312-mnc670/config.xml
new file mode 100644
index 0000000000..a605db28c3
--- /dev/null
+++ b/service/ServiceWifiResources/res/values-mcc312-mnc670/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2025 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array translatable="false" name="config_wifiOobPseudonymEnabled_carrier_overrides">
+ <item><xliff:g id="carrier_id_prefix">:::2119:::</xliff:g>true</item>
+ </string-array>
+
+ <!-- Carrier specific override for the URL of entitlement server retrieving OOB pseudonym. -->
+ <string-array translatable="false" name="config_wifiOobPseudonymEntitlementServerUrl_carrier_overrides">
+ <item><xliff:g id="carrier_id_prefix">:::2119:::</xliff:g>https://sentitlement2.npc.mobilephone.net/WFC</item>
+ </string-array>
+</resources>
diff --git a/service/ServiceWifiResources/res/values-mcc313-mnc140 b/service/ServiceWifiResources/res/values-mcc313-mnc140
new file mode 120000
index 0000000000..2d21ee5bae
--- /dev/null
+++ b/service/ServiceWifiResources/res/values-mcc313-mnc140
@@ -0,0 +1 @@
+values-mcc313-mnc100 \ No newline at end of file
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index 99a6880b30..9bcf627f9a 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -219,7 +219,7 @@ public class ClientModeImpl extends StateMachine implements ClientMode {
private static final int IPCLIENT_SHUTDOWN_TIMEOUT_MS = 60_000; // 60 seconds
private static final int NETWORK_AGENT_TEARDOWN_DELAY_MS = 5_000; // Max teardown delay.
private static final int DISASSOC_AP_BUSY_DISABLE_DURATION_MS = 5 * 60 * 1000; // 5 minutes
- @VisibleForTesting public static final long CONNECTING_WATCHDOG_TIMEOUT_MS = 30_000; // 30 secs.
+ @VisibleForTesting public static final long CONNECTING_WATCHDOG_TIMEOUT_MS = 8_000; // 8 secs.
public static final int PROVISIONING_TIMEOUT_FILS_CONNECTION_MS = 36_000; // 36 secs.
@VisibleForTesting
public static final String ARP_TABLE_PATH = "/proc/net/arp";
diff --git a/service/java/com/android/server/wifi/LastMileLogger.java b/service/java/com/android/server/wifi/LastMileLogger.java
index 0c9c0addcf..49c506ed62 100644
--- a/service/java/com/android/server/wifi/LastMileLogger.java
+++ b/service/java/com/android/server/wifi/LastMileLogger.java
@@ -17,6 +17,7 @@
package com.android.server.wifi;
+import android.os.Handler;
import android.util.ArrayMap;
import com.android.internal.annotations.VisibleForTesting;
@@ -34,7 +35,9 @@ import java.util.Map;
* Provides a facility for capturing kernel trace events related to Wifi control and data paths.
*/
public class LastMileLogger {
- public LastMileLogger(WifiInjector injector) {
+ private final Handler mBackgroundHandler;
+ public LastMileLogger(WifiInjector injector, Handler handler) {
+ mBackgroundHandler = handler;
File tracefsEnablePath = new File(WIFI_EVENT_ENABLE_PATH);
if (tracefsEnablePath.exists()) {
initLastMileLogger(injector, WIFI_EVENT_BUFFER_PATH, WIFI_EVENT_ENABLE_PATH,
@@ -47,7 +50,8 @@ public class LastMileLogger {
@VisibleForTesting
public LastMileLogger(WifiInjector injector, String bufferPath, String enablePath,
- String releasePath) {
+ String releasePath, Handler handler) {
+ mBackgroundHandler = handler;
initLastMileLogger(injector, bufferPath, enablePath, releasePath);
}
@@ -62,16 +66,17 @@ public class LastMileLogger {
boolean shouldTracingBeEnabled = anyConnectionInProgress();
- if (!wasTracingEnabled && shouldTracingBeEnabled) {
- enableTracing();
- } else if (wasTracingEnabled && !shouldTracingBeEnabled) {
- disableTracing();
- }
-
- if (event == WifiDiagnostics.CONNECTION_EVENT_FAILED
- || event == WifiDiagnostics.CONNECTION_EVENT_TIMEOUT) {
- mLastMileLogForLastFailure = readTrace();
- }
+ mBackgroundHandler.post(() -> {
+ if (!wasTracingEnabled && shouldTracingBeEnabled) {
+ enableTracing();
+ } else if (wasTracingEnabled && !shouldTracingBeEnabled) {
+ disableTracing();
+ }
+ if (event == WifiDiagnostics.CONNECTION_EVENT_FAILED
+ || event == WifiDiagnostics.CONNECTION_EVENT_TIMEOUT) {
+ mLastMileLogForLastFailure = readTrace();
+ }
+ });
}
private boolean anyConnectionInProgress() {
diff --git a/service/java/com/android/server/wifi/WifiInjector.java b/service/java/com/android/server/wifi/WifiInjector.java
index 300f850d51..dcf4388095 100644
--- a/service/java/com/android/server/wifi/WifiInjector.java
+++ b/service/java/com/android/server/wifi/WifiInjector.java
@@ -418,7 +418,8 @@ public class WifiInjector {
: maxLinesHighRam);
mWifiDiagnostics = new WifiDiagnostics(
mContext, this, mWifiNative, mBuildProperties,
- new LastMileLogger(this), mClock, mWifiDiagnosticsHandlerThread.getLooper());
+ new LastMileLogger(this, BackgroundThread.getHandler()), mClock,
+ mWifiDiagnosticsHandlerThread.getLooper());
mWifiLastResortWatchdog = new WifiLastResortWatchdog(this, mContext, mClock,
mWifiMetrics, mWifiDiagnostics, wifiLooper,
mDeviceConfigFacade, mWifiThreadRunner, mWifiMonitor);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/LastMileLoggerTest.java b/service/tests/wifitests/src/com/android/server/wifi/LastMileLoggerTest.java
index 158e35bb9c..ab181f693a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/LastMileLoggerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/LastMileLoggerTest.java
@@ -24,6 +24,9 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
+import android.os.Handler;
+import android.os.test.TestLooper;
+
import androidx.test.filters.SmallTest;
import com.android.server.wifi.util.FileUtils;
@@ -52,6 +55,8 @@ public class LastMileLoggerTest extends WifiBaseTest {
@Mock WifiInjector mWifiInjector;
@Spy FakeWifiLog mLog;
+ private TestLooper mLooper;
+
@Before
public void setUp() throws Exception {
@@ -64,8 +69,10 @@ public class LastMileLoggerTest extends WifiBaseTest {
mTraceEnableFile.deleteOnExit();
mTraceReleaseFile.deleteOnExit();
FileUtils.stringToFile(mTraceEnableFile.getPath(), "0");
+ mLooper = new TestLooper();
+ Handler backgroundHandler = new Handler(mLooper.getLooper());
mLastMileLogger = new LastMileLogger(mWifiInjector, mTraceDataFile.getPath(),
- mTraceEnableFile.getPath(), mTraceReleaseFile.getPath());
+ mTraceEnableFile.getPath(), mTraceReleaseFile.getPath(), backgroundHandler);
}
private static String readFileAsString(File file) throws IOException {
@@ -75,13 +82,15 @@ public class LastMileLoggerTest extends WifiBaseTest {
@Test
public void ctorDoesNotCrash() throws Exception {
new LastMileLogger(mWifiInjector, mTraceDataFile.getPath(), mTraceEnableFile.getPath(),
- mTraceReleaseFile.getPath());
+ mTraceReleaseFile.getPath(), new Handler(mLooper.getLooper()));
+ mLooper.dispatchAll();
verifyNoMoreInteractions(mLog);
}
@Test
public void connectionEventStartedEnablesTracing() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
assertEquals("1", readFileAsString(mTraceEnableFile));
}
@@ -89,6 +98,7 @@ public class LastMileLoggerTest extends WifiBaseTest {
public void connectionEventStartedDoesNotCrashIfReleaseFileIsMissing() throws Exception {
mTraceReleaseFile.delete();
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
verify(mLog).warn(contains("Failed to open free_buffer"));
}
@@ -97,13 +107,14 @@ public class LastMileLoggerTest extends WifiBaseTest {
throws Exception {
mTraceReleaseFile.delete();
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
assertEquals("0", readFileAsString(mTraceEnableFile));
}
@Test
public void connectionEventStartedDoesNotAttemptToReopenReleaseFile() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
-
+ mLooper.dispatchAll();
// This is a rather round-about way of verifying that we don't attempt to re-open
// the file. Namely: if we delete the |release| file, and CONNECTION_EVENT_STARTED
// _did_ re-open the file, then we'd log an error message. Since the test is deleting the
@@ -114,6 +125,7 @@ public class LastMileLoggerTest extends WifiBaseTest {
// FileInputStream.
mTraceReleaseFile.delete();
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
verifyNoMoreInteractions(mLog);
}
@@ -121,36 +133,42 @@ public class LastMileLoggerTest extends WifiBaseTest {
public void connectionEventStartedDoesNotCrashIfEnableFileIsMissing() throws Exception {
mTraceEnableFile.delete();
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
}
@Test
public void connectionEventStartedDoesNotCrashOnRepeatedCalls() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
}
@Test
public void connectionEventSucceededDisablesTracing() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED);
assertEquals("0", readFileAsString(mTraceEnableFile));
+ mLooper.dispatchAll();
}
@Test
public void connectionEventSucceededDoesNotCrashIfEnableFileIsMissing() throws Exception {
mTraceEnableFile.delete();
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED);
+ mLooper.dispatchAll();
}
@Test
public void connectionEventSucceededDoesNotCrashOnRepeatedCalls() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED);
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED);
+ mLooper.dispatchAll();
}
@Test
public void connectionEventFailedDisablesTracingWhenPendingFails() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
+ mLooper.dispatchAll();
assertEquals("0", readFileAsString(mTraceEnableFile));
}
@@ -158,25 +176,30 @@ public class LastMileLoggerTest extends WifiBaseTest {
public void connectionEventTimeoutDisablesTracing() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_TIMEOUT);
+ mLooper.dispatchAll();
assertEquals("0", readFileAsString(mTraceEnableFile));
}
@Test
public void multipleIfaces() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
assertEquals("1", readFileAsString(mTraceEnableFile));
mLastMileLogger.reportConnectionEvent(WLAN1, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
assertEquals("1", readFileAsString(mTraceEnableFile));
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect");
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_TIMEOUT);
+ mLooper.dispatchAll();
assertEquals("1", readFileAsString(mTraceEnableFile));
String dumpString = getDumpString();
assertTrue(dumpString.contains("--- Last failed"));
assertTrue(dumpString.contains("rdev_connect"));
mLastMileLogger.reportConnectionEvent(WLAN1, WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED);
+ mLooper.dispatchAll();
assertEquals("0", readFileAsString(mTraceEnableFile));
}
@@ -184,25 +207,30 @@ public class LastMileLoggerTest extends WifiBaseTest {
public void connectionEventFailedDoesNotCrashIfEnableFileIsMissing() throws Exception {
mTraceEnableFile.delete();
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
+ mLooper.dispatchAll();
}
@Test
public void connectionEventFailedDoesNotCrashIfDataFileIsMissing() throws Exception {
mTraceDataFile.delete();
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
+ mLooper.dispatchAll();
}
@Test
public void connectionEventFailedDoesNotCrashOnRepeatedCalls() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
+ mLooper.dispatchAll();
}
@Test
public void dumpShowsFailureTrace() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect");
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
+ mLooper.dispatchAll();
assertTrue(getDumpString().contains("--- Last failed"));
assertTrue(getDumpString().contains("rdev_connect"));
}
@@ -211,6 +239,7 @@ public class LastMileLoggerTest extends WifiBaseTest {
@Test
public void dumpShowsPendingConnectionTrace() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect");
assertTrue(getDumpString().contains("No last mile log for \"Last failed"));
assertTrue(getDumpString().contains("--- Latest"));
@@ -220,9 +249,11 @@ public class LastMileLoggerTest extends WifiBaseTest {
@Test
public void dumpShowsLastFailureTraceAndPendingConnectionTrace() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #1");
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #2");
String dumpString = getDumpString();
@@ -233,11 +264,14 @@ public class LastMileLoggerTest extends WifiBaseTest {
@Test
public void dumpShowsLastFailureTraceAndCurrentConnectionTrace() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #1");
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #2");
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED);
+ mLooper.dispatchAll();
String dumpString = getDumpString();
assertTrue(dumpString.contains("rdev_connect try #1"));
@@ -247,8 +281,10 @@ public class LastMileLoggerTest extends WifiBaseTest {
@Test
public void dumpDoesNotClearLastFailureData() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect");
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_FAILED);
+ mLooper.dispatchAll();
getDumpString();
String dumpString = getDumpString();
@@ -258,6 +294,7 @@ public class LastMileLoggerTest extends WifiBaseTest {
@Test
public void dumpDoesNotClearPendingConnectionTrace() throws Exception {
mLastMileLogger.reportConnectionEvent(WLAN0, WifiDiagnostics.CONNECTION_EVENT_STARTED);
+ mLooper.dispatchAll();
FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect");
getDumpString();
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
index 97d11c99a5..0b6181aa89 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
@@ -1842,7 +1842,7 @@ public class WifiServiceImplTest extends WifiBaseTest {
public void testSetWifiApConfigurationNullConfigNotSaved() throws Exception {
when(mWifiPermissionsUtil.checkConfigOverridePermission(anyInt())).thenReturn(true);
assertFalse(mWifiServiceImpl.setWifiApConfiguration(null, TEST_PACKAGE_NAME));
- verify(mWifiApConfigStore, never()).setApConfiguration(isNull(SoftApConfiguration.class));
+ verify(mWifiApConfigStore, never()).setApConfiguration(isNull());
}
/**
@@ -1903,7 +1903,7 @@ public class WifiServiceImplTest extends WifiBaseTest {
public void testSetSoftApConfigurationNullConfigNotSaved() throws Exception {
when(mWifiPermissionsUtil.checkConfigOverridePermission(anyInt())).thenReturn(true);
assertFalse(mWifiServiceImpl.setSoftApConfiguration(null, TEST_PACKAGE_NAME));
- verify(mWifiApConfigStore, never()).setApConfiguration(isNull(SoftApConfiguration.class));
+ verify(mWifiApConfigStore, never()).setApConfiguration(isNull());
verify(mActiveModeWarden, never()).updateSoftApConfiguration(any());
verify(mWifiPermissionsUtil).checkConfigOverridePermission(anyInt());
}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
index 55f63e1513..b5041c7a63 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
@@ -2971,7 +2971,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest {
null, messageId, 0);
mMockLooper.dispatchAll();
inOrder.verify(mMockNative).sendMessage(transactionId.capture(), eq(subscribeId),
- eq(requestorId), eq(peerMac), isNull(byte[].class), eq(messageId));
+ eq(requestorId), eq(peerMac), isNull(), eq(messageId));
short tid = transactionId.getValue();
mDut.onMessageSendQueuedSuccessResponse(tid);
mMockLooper.dispatchAll();
diff --git a/service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java b/service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
index b037b168ee..18eb867784 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
@@ -141,12 +141,9 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
public void externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() {
mWifiMonitor.sendMessage(IFACE_NAME, WifiMonitor.SCAN_RESULTS_EVENT);
mLooper.dispatchAll();
- verify(mAlarmManager.getAlarmManager(), never()).cancel(any(PendingIntent.class));
+ verify(mAlarmManager.getAlarmManager(), never()).cancel(nullable(PendingIntent.class));
verify(mAlarmManager.getAlarmManager(), never())
- .cancel(any(AlarmManager.OnAlarmListener.class));
- verify(mAlarmManager.getAlarmManager(), never()).cancel(isNull(PendingIntent.class));
- verify(mAlarmManager.getAlarmManager(), never())
- .cancel(isNull(AlarmManager.OnAlarmListener.class));
+ .cancel(nullable(AlarmManager.OnAlarmListener.class));
}
@Test
@@ -166,12 +163,11 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
mWifiMonitor.sendMessage(IFACE_NAME, WifiMonitor.SCAN_RESULTS_EVENT);
mLooper.dispatchAll();
- verify(mAlarmManager.getAlarmManager(), never()).cancel(any(PendingIntent.class));
+ verify(mAlarmManager.getAlarmManager(), never()).cancel(nullable(PendingIntent.class));
verify(mAlarmManager.getAlarmManager(), times(1))
.cancel(any(AlarmManager.OnAlarmListener.class));
- verify(mAlarmManager.getAlarmManager(), never()).cancel(isNull(PendingIntent.class));
verify(mAlarmManager.getAlarmManager(), never())
- .cancel(isNull(AlarmManager.OnAlarmListener.class));
+ .cancel((AlarmManager.OnAlarmListener)isNull());
}
@Test
@@ -198,12 +194,9 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
mWifiMonitor.sendMessage(IFACE_NAME, WifiMonitor.SCAN_RESULTS_EVENT);
mLooper.dispatchAll();
- verify(mAlarmManager.getAlarmManager(), never()).cancel(any(PendingIntent.class));
- verify(mAlarmManager.getAlarmManager(), never())
- .cancel(any(AlarmManager.OnAlarmListener.class));
- verify(mAlarmManager.getAlarmManager(), never()).cancel(isNull(PendingIntent.class));
+ verify(mAlarmManager.getAlarmManager(), never()).cancel(nullable(PendingIntent.class));
verify(mAlarmManager.getAlarmManager(), never())
- .cancel(isNull(AlarmManager.OnAlarmListener.class));
+ .cancel(nullable(AlarmManager.OnAlarmListener.class));
}
/**