Home
last modified time | relevance | path

Searched refs:mDeviceIdleService (Results 1 – 4 of 4) sorted by relevance

/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/
H A DPowerAllowlistBackendTest.java56 private IDeviceIdleController mDeviceIdleService; field in PowerAllowlistBackendTest
68 doReturn(new String[] {}).when(mDeviceIdleService).getFullPowerWhitelist(); in setUp()
69 doReturn(new String[] {}).when(mDeviceIdleService).getSystemPowerWhitelist(); in setUp()
71 doNothing().when(mDeviceIdleService).addPowerSaveWhitelistApp(anyString()); in setUp()
72 doNothing().when(mDeviceIdleService).removePowerSaveWhitelistApp(anyString()); in setUp()
77 mPowerAllowlistBackend = new PowerAllowlistBackend(mContext, mDeviceIdleService); in setUp()
82 doReturn(new String[] {PACKAGE_ONE}).when(mDeviceIdleService).getFullPowerWhitelist(); in testIsAllowlisted()
92 verify(mDeviceIdleService, atLeastOnce()).addPowerSaveWhitelistApp(PACKAGE_TWO); in testIsAllowlisted()
100 verify(mDeviceIdleService, atLeastOnce()).removePowerSaveWhitelistApp(PACKAGE_TWO); in testIsAllowlisted()
108 verify(mDeviceIdleService, atLeastOnce()).removePowerSaveWhitelistApp(PACKAGE_ONE); in testIsAllowlisted()
[all …]
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/fuelgauge/
H A DPowerAllowlistBackend.java48 private final IDeviceIdleController mDeviceIdleService; field in PowerAllowlistBackend
61 mDeviceIdleService = deviceIdleService; in PowerAllowlistBackend()
117 return mDeviceIdleService.isPowerSaveWhitelistExceptIdleApp(pkg); in isAllowlistedExceptIdle()
148 mDeviceIdleService.addPowerSaveWhitelistApp(pkg); in addApp()
161 mDeviceIdleService.removePowerSaveWhitelistApp(pkg); in removeApp()
176 if (mDeviceIdleService == null) { in refreshList()
180 final String[] allowlistedApps = mDeviceIdleService.getFullPowerWhitelist(); in refreshList()
184 final String[] sysAllowlistedApps = mDeviceIdleService.getSystemPowerWhitelist(); in refreshList()
/aosp12/frameworks/base/apex/jobscheduler/service/java/com/android/server/deviceidle/
H A DTvConstraintController.java36 private final DeviceIdleInternal mDeviceIdleService; field in TvConstraintController
44 mDeviceIdleService = LocalServices.getService(DeviceIdleInternal.class); in TvConstraintController()
48 ? new BluetoothConstraint(mContext, mHandler, mDeviceIdleService) in TvConstraintController()
55 mDeviceIdleService.registerDeviceIdleConstraint( in start()
63 mDeviceIdleService.unregisterDeviceIdleConstraint(mBluetoothConstraint); in stop()
/aosp12/frameworks/base/services/tests/mockingservicestests/src/com/android/server/deviceidle/
H A DBluetoothConstraintTest.java74 private DeviceIdleInternal mDeviceIdleService; field in BluetoothConstraintTest
86 mConstraint = new BluetoothConstraint(mContext, mHandler, mDeviceIdleService); in setUp()
118 verify(mDeviceIdleService, never()).onConstraintStateChanged(any(), anyBoolean()); in testStartMonitoring_updatesActiveAtCorrectTimes()
121 InOrder order = inOrder(mDeviceIdleService); in testStartMonitoring_updatesActiveAtCorrectTimes()
126 order.verify(mDeviceIdleService, times(1)).onConstraintStateChanged(any(), eq(false)); in testStartMonitoring_updatesActiveAtCorrectTimes()
133 order.verify(mDeviceIdleService, times(1)).exitIdle(eq("bluetooth")); in testStartMonitoring_updatesActiveAtCorrectTimes()