diff options
author | Dan Stoza <stoza@google.com> | 2020-02-19 18:18:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-02-19 18:18:30 +0000 |
commit | 29c1c28ab297ed0d629a5440b4c9cfa736923064 (patch) | |
tree | 8a2bafafb865c6a67b3cdf75f769103858c03859 /tests | |
parent | b7391079514a96e446ba747b72ab2d6f62d8f00d (diff) | |
parent | dc8f66221b3190572d850eca0785170b580e7e63 (diff) |
Merge "wifitests: Update to pass IThermalService into PM"
Diffstat (limited to 'tests')
3 files changed, 9 insertions, 3 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java index 185811cfe..e10600972 100644 --- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java @@ -94,6 +94,7 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.IPowerManager; +import android.os.IThermalService; import android.os.Looper; import android.os.Message; import android.os.Messenger; @@ -236,7 +237,8 @@ public class ClientModeImplTest extends WifiBaseTest { when(context.getContentResolver()).thenReturn(mockContentResolver); when(context.getSystemService(Context.POWER_SERVICE)).thenReturn( - new PowerManager(context, mock(IPowerManager.class), new Handler())); + new PowerManager(context, mock(IPowerManager.class), mock(IThermalService.class), + new Handler())); mAlarmManager = new TestAlarmManager(); when(context.getSystemService(Context.ALARM_SERVICE)).thenReturn( diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java index 586ab3222..35f377b19 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java @@ -131,6 +131,7 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.IPowerManager; +import android.os.IThermalService; import android.os.Message; import android.os.PowerManager; import android.os.Process; @@ -342,7 +343,9 @@ public class WifiServiceImplTest extends WifiBaseTest { when(mContext.getSystemService(Context.ACTIVITY_SERVICE)).thenReturn(mActivityManager); when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); IPowerManager powerManagerService = mock(IPowerManager.class); - mPowerManager = new PowerManager(mContext, powerManagerService, new Handler()); + IThermalService thermalService = mock(IThermalService.class); + mPowerManager = + new PowerManager(mContext, powerManagerService, thermalService, new Handler()); when(mContext.getSystemServiceName(PowerManager.class)).thenReturn(Context.POWER_SERVICE); when(mContext.getSystemService(PowerManager.class)).thenReturn(mPowerManager); WifiAsyncChannel wifiAsyncChannel = new WifiAsyncChannel("WifiServiceImplTest"); 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 ec08f4100..84c26dff1 100644 --- a/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java @@ -61,6 +61,7 @@ import android.net.wifi.rtt.WifiRttManager; import android.os.Handler; import android.os.IBinder; import android.os.IPowerManager; +import android.os.IThermalService; import android.os.PowerManager; import android.os.RemoteException; import android.os.UserHandle; @@ -212,7 +213,7 @@ public class RttServiceImplTest extends WifiBaseTest { true); mMockPowerManager = new PowerManager(mockContext, mock(IPowerManager.class), - new Handler(mMockLooper.getLooper())); + mock(IThermalService.class), new Handler(mMockLooper.getLooper())); when(mMockPowerManager.isDeviceIdleMode()).thenReturn(false); when(mockContext.getSystemServiceName(PowerManager.class)).thenReturn( Context.POWER_SERVICE); |