diff options
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 a289171b4..0cd19277e 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java @@ -130,6 +130,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; @@ -340,7 +341,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 e5c922d5a..bfc14c7f5 100644 --- a/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java @@ -62,6 +62,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; @@ -215,7 +216,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); |