Home
last modified time | relevance | path

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

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hardware/power/
DCarPowerManagerUnitTest.java110 private CarPowerManager mCarPowerManager; field in CarPowerManagerUnitTest
137 mCarPowerManager = new CarPowerManager(mCar, mService); in setUp()
151 mCarPowerManager.requestShutdownOnNextSuspend(); in testRequestShutdownOnNextSuspend_positive()
177 mCarPowerManager.scheduleNextWakeupTime(wakeTime); in testScheduleNextWakeupTime()
225 mCarPowerManager.clearListener(); in testClearListener()
238 assertThat(mCarPowerManager.getPowerState()).isEqualTo(PowerHalService.SET_ON); in testGetPowerState()
244 assertThat(mCarPowerManager.getPowerState()) in testGetPowerState()
269 mCarPowerManager.applyPowerPolicy(definition.policyId); in testGetCurrentPowerPolicy()
272 assertPolicyIdentical(expected, mCarPowerManager.getCurrentPowerPolicy()); in testGetCurrentPowerPolicy()
281 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/services/Car/tests/CarSecurityPermissionTest/src/com/android/car/power/
DCarPowerManagerPermissionTest.java54 private CarPowerManager mCarPowerManager; field in CarPowerManagerPermissionTest
59 mCarPowerManager = (CarPowerManager) car.getCarManager(POWER_SERVICE); in setUp()
64 Exception e = expectThrows(SecurityException.class, () -> mCarPowerManager.getPowerState()); in testGetPowerState()
72 () -> mCarPowerManager.requestShutdownOnNextSuspend()); in testRequestShutdownOnNextSuspend()
80 () -> mCarPowerManager.scheduleNextWakeupTime(100)); in testScheduleNextWakeupTime()
88 () -> mCarPowerManager.setListener(null)); in testSetListener()
96 () -> mCarPowerManager.setListenerWithCompletion(null)); in testSetListenerWithCompletion()
104 () -> mCarPowerManager.getCurrentPowerPolicy()); in testGetCurrentPowerPolicy()
112 () -> mCarPowerManager.applyPowerPolicy("policy_id")); in testApplyPowerPolicy()
123 () -> mCarPowerManager.addPowerPolicyListener(executor, filter, (p) -> { })); in testAddPowerPolicyChangeListener()
/packages/services/Car/service/src/com/android/car/garagemode/
DController.java50 private CarPowerManager mCarPowerManager; field in Controller
71 mCarPowerManager = CarLocalServices.createCarPowerManager(mContext); in init()
72 mCarPowerManager.setListenerWithCompletion(Controller.this); in init()
78 mCarPowerManager.clearListener(); in release()
172 mCarPowerManager = cpm; in setCarPowerManager()
181 mCarPowerManager.scheduleNextWakeupTime(seconds); in scheduleNextWakeup()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/power/
DPowerTestFragment.java39 private CarPowerManager mCarPowerManager; field in PowerTestFragment
49 mCarPowerManager = ((KitchenSinkActivity) getActivity()).getPowerManager(); in onCreate()
51 mCarPowerManager.setListener(mPowerListener); in onCreate()
64 mCarPowerManager.clearListener(); in onDestroy()
88 mCarPowerManager.requestShutdownOnNextSuspend(); in requestShutdownBtn()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/notification/
DPowerManagerHelper.java39 private CarPowerManager mCarPowerManager; field in PowerManagerHelper
49 mCarPowerManager = (CarPowerManager) car.getCarManager(Car.POWER_SERVICE); in PowerManagerHelper()
50 if (mCarPowerManager != null) { in PowerManagerHelper()
51 mCarPowerManager.setListener(mCarPowerStateListener); in PowerManagerHelper()
/packages/services/Car/service/src/com/android/car/
DCarLocationService.java97 private CarPowerManager mCarPowerManager; field in CarLocationService
184 mCarPowerManager = CarLocalServices.createCarPowerManager(mContext); in init()
185 if (mCarPowerManager != null) { // null case happens for testing. in init()
186 mCarPowerManager.setListenerWithCompletion(CarLocationService.this); in init()
197 if (mCarPowerManager != null) { in release()
198 mCarPowerManager.clearListener(); in release()
/packages/services/Car/service/src/com/android/car/user/
DCarUserNoticeService.java107 private CarPowerManager mCarPowerManager; field in CarUserNoticeService
395 mCarPowerManager = CarLocalServices.createCarPowerManager(mContext); in init()
396 carPowerManager = mCarPowerManager; in init()
423 carPowerManager = mCarPowerManager; in release()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserNoticeServiceTest.java87 private CarPowerManager mCarPowerManager; field in CarUserNoticeServiceTest
118 doReturn(mCarPowerManager).when(() -> CarLocalServices.createCarPowerManager(mMockContext)); in setUpMocks()
141 verify(mCarPowerManager).setListener(mPowerStateListener.capture()); in setUpMocks()
/packages/services/Car/service/src/com/android/car/am/
DFixedActivityService.java257 private CarPowerManager mCarPowerManager; field in FixedActivityService
336 mCarPowerManager = carPowerManager; in startMonitoringEvents()
369 carPowerManager = mCarPowerManager; in stopMonitoringEvents()
370 mCarPowerManager = null; in stopMonitoringEvents()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/am/
DFixedActivityServiceTest.java89 private CarPowerManager mCarPowerManager; field in FixedActivityServiceTest
104 doReturn(mCarPowerManager).when(() -> CarLocalServices.createCarPowerManager(mContext)); in setUp()