Fix wifi test
It complains that wifi manager is null in a mocked car wifi manager
Bug: 132346634
Test: robolectric
Change-Id: Ibb6cc71788fdd6a845f649ab9a7a3a153559e5fa
diff --git a/tests/robotests/src/com/android/car/settings/testutils/ShadowCarWifiManager.java b/tests/robotests/src/com/android/car/settings/testutils/ShadowCarWifiManager.java
index 8215a8b..e07116a 100644
--- a/tests/robotests/src/com/android/car/settings/testutils/ShadowCarWifiManager.java
+++ b/tests/robotests/src/com/android/car/settings/testutils/ShadowCarWifiManager.java
@@ -29,7 +29,7 @@
import java.util.List;
-/**TODO: Refactor all methods to run without relying on sInstance. */
+/** TODO: Refactor all methods to run without relying on sInstance. */
@Implements(CarWifiManager.class)
public class ShadowCarWifiManager {
@@ -126,6 +126,12 @@
}
@Implementation
+ protected void connectToSavedWifi(AccessPoint accessPoint,
+ WifiManager.ActionListener listener) {
+ sInstance.connectToSavedWifi(accessPoint, listener);
+ }
+
+ @Implementation
protected boolean isDualModeSupported() {
return sIsDualModeSupported;
}