Home
last modified time | relevance | path

Searched refs:mCarPowerManager (Results 1 – 14 of 14) sorted by relevance

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hardware/power/
DCarPowerManagerUnitTest.java128 private CarPowerManager mCarPowerManager; field in CarPowerManagerUnitTest
161 mCarPowerManager = new CarPowerManager(mCar, mService); in setUp()
175 mCarPowerManager.requestShutdownOnNextSuspend(); in testRequestShutdownOnNextSuspend_positive()
201 mCarPowerManager.scheduleNextWakeupTime(wakeTime); in testScheduleNextWakeupTime()
257 mCarPowerManager.clearListener(); in testClearListener()
270 assertThat(mCarPowerManager.getPowerState()).isEqualTo(PowerHalService.SET_ON); in testGetPowerState()
276 assertThat(mCarPowerManager.getPowerState()) in testGetPowerState()
301 mCarPowerManager.applyPowerPolicy(definition.policyId); in testGetCurrentPowerPolicy()
304 assertPolicyIdentical(expected, mCarPowerManager.getCurrentPowerPolicy()); in testGetCurrentPowerPolicy()
313 mCarPowerManager.applyPowerPolicy(policyId); in testApplyPowerPolicy()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/common/
DPowerPolicyListener.java51 @Nullable private CarPowerManager mCarPowerManager; field in PowerPolicyListener
73 mCarPowerManager = (CarPowerManager) mCar.getCarManager(Car.POWER_SERVICE); in PowerPolicyListener()
74 if (mCarPowerManager != null) { in PowerPolicyListener()
75 mCarPowerManager.addPowerPolicyListener(mExecutor, filter, in PowerPolicyListener()
81 mCarPowerManager = null; in PowerPolicyListener()
91 if (mCarPowerManager != null) { in release()
92 mCarPowerManager.removePowerPolicyListener(mPolicyListener); in release()
108 if (mCarPowerManager == null) { in handleCurrentPolicy()
112 CarPowerPolicy policy = mCarPowerManager.getCurrentPowerPolicy(); in handleCurrentPolicy()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/notification/
DPowerManagerHelper.java44 private CarPowerManager mCarPowerManager; field in PowerManagerHelper
54 mCarPowerManager = (CarPowerManager) car.getCarManager(Car.POWER_SERVICE); in PowerManagerHelper()
55 if (mCarPowerManager != null) { in PowerManagerHelper()
56 mCarPowerManager.setListener(getMainExecutor(), mCarPowerStateListener); in PowerManagerHelper()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/qc/
DQCScreenOffButtonController.java41 private CarPowerManager mCarPowerManager; field in QCScreenOffButtonController
45 mCarPowerManager = car.getCarManager(CarPowerManager.class);
84 if (mCarPowerManager != null) { in turnScreenOff()
85 mCarPowerManager.setDisplayPowerState(getContext().getDisplayId(), /* enable= */ false); in turnScreenOff()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/power/
DPowerTestFragment.java55 private CarPowerManager mCarPowerManager; field in PowerTestFragment
73 mCarPowerManager = ((KitchenSinkActivity) getActivity()).getPowerManager(); in onCreate()
75 mCarPowerManager.setListener(getContext().getMainExecutor(), mPowerListener); in onCreate()
90 mCarPowerManager.clearListener(); in onDestroy()
135 mCarPowerManager.requestShutdownOnNextSuspend(); in requestShutdownBtn()
163 mCarPowerManager.setDisplayPowerState(selectedDisplayId, /* enable */ true); in displayOnBtn()
171 mCarPowerManager.setDisplayPowerState(selectedDisplayId, /* enable */ false); in displayOffBtn()
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/qc/
DQCScreenOffButtonControllerTest.java59 private CarPowerManager mCarPowerManager; field in QCScreenOffButtonControllerTest
80 when(mCar.getCarManager(CarPowerManager.class)).thenReturn(mCarPowerManager); in setUp()
88 verify(mCarPowerManager).setDisplayPowerState(anyInt(), eq(false)); in onPowerButtonClicked_setDisplayPowerState()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/input/
DDisplayInputSinkController.java101 private CarPowerManager mCarPowerManager; field in DisplayInputSinkController
194 mCarPowerManager = car.getCarManager(CarPowerManager.class);
336 if (mCarPowerManager != null) { in mayStartDisplayInputLock()
337 mCarPowerManager.notifyUserActivity(event.getDisplayId()); in mayStartDisplayInputLock()
373 if (mCarPowerManager != null) { in mayStartDisplayInputMonitor()
374 mCarPowerManager.notifyUserActivity(event.getDisplayId()); in mayStartDisplayInputMonitor()
/packages/services/Car/service/src/com/android/car/
DCarLocationService.java105 private final CarPowerManager mCarPowerManager; field in CarLocationService
246 mCarPowerManager = CarLocalServices.createCarPowerManager(mContext); in CarLocationService()
247 if (mCarPowerManager == null) { in CarLocationService()
279 if (mCarPowerManager != null) { // null case happens for testing. in init()
280 mCarPowerManager.setListenerWithCompletion((command) -> mHandler.post(command), in init()
303 if (mCarPowerManager != null) { in release()
304 mCarPowerManager.clearListener(); in release()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userpicker/
DCarServiceMediator.java76 private CarPowerManager mCarPowerManager; field in CarServiceMediator
104 mCarPowerManager = car.getCarManager(CarPowerManager.class); in onConnect()
245 if (mCarPowerManager == null) { in screenOffDisplay()
249 mCarPowerManager.setDisplayPowerState(displayId, /* enable= */ false); in screenOffDisplay()
/packages/services/Car/service/src/com/android/car/user/
DCarUserNoticeService.java118 private CarPowerManager mCarPowerManager; field in CarUserNoticeService
406 mCarPowerManager = CarLocalServices.createCarPowerManager(mContext); in init()
407 carPowerManager = mCarPowerManager; in init()
437 carPowerManager = mCarPowerManager; in release()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserNoticeServiceTest.java92 private CarPowerManager mCarPowerManager; field in CarUserNoticeServiceTest
129 doReturn(mCarPowerManager).when(() -> CarLocalServices.createCarPowerManager(mMockContext)); in setUpMocks()
155 verify(mCarPowerManager).setListener(any(), mPowerStateListener.capture()); in setUpMocks()
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/input/
DDisplayInputSinkControllerTest.java94 private CarPowerManager mCarPowerManager; field in DisplayInputSinkControllerTest
138 doReturn(mCarPowerManager).when(mCar).getCarManager(CarPowerManager.class); in setUp()
419 verify(mCarPowerManager, times(1)).notifyUserActivity(mPassengerDisplayId1); in displayInputMonitorCallback_triggers_notifyUserActivity()
435 verify(mCarPowerManager, times(1)).notifyUserActivity(mPassengerDisplayId2); in displayInputLockCallback_triggers_notifyUserActivity()
/packages/services/Car/service/src/com/android/car/am/
DFixedActivityService.java254 private CarPowerManager mCarPowerManager; field in FixedActivityService
337 mCarPowerManager = carPowerManager; in startMonitoringEvents()
368 carPowerManager = mCarPowerManager; in stopMonitoringEvents()
369 mCarPowerManager = null; in stopMonitoringEvents()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/am/
DFixedActivityServiceTest.java96 private CarPowerManager mCarPowerManager; field in FixedActivityServiceTest
120 doReturn(mCarPowerManager).when(() -> CarLocalServices.createCarPowerManager(mContext)); in setUp()