/packages/services/Car/service/src/com/android/car/garagemode/ |
D | GarageModeController.java | 23 import android.car.hardware.power.CarPowerManager; 86 case CarPowerManager.STATE_SHUTDOWN_CANCELLED: in onStateChanged() 89 case CarPowerManager.STATE_SHUTDOWN_ENTER: in onStateChanged() 90 case CarPowerManager.STATE_SUSPEND_ENTER: in onStateChanged() 91 case CarPowerManager.STATE_HIBERNATION_ENTER: in onStateChanged() 97 case CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE: in onStateChanged() 98 case CarPowerManager.STATE_POST_SHUTDOWN_ENTER: in onStateChanged() 99 case CarPowerManager.STATE_POST_SUSPEND_ENTER: in onStateChanged() 100 case CarPowerManager.STATE_POST_HIBERNATION_ENTER: in onStateChanged() 103 case CarPowerManager.STATE_SHUTDOWN_PREPARE: in onStateChanged()
|
/packages/services/Car/car-lib/native/include/ |
D | CarPowerManager.h | 32 class CarPowerManager : public android::RefBase { 59 CarPowerManager() = default; 60 virtual ~CarPowerManager() { in ~CarPowerManager() 80 explicit CarPowerStateListener(CarPowerManager* parent) : mParent(parent) {} in CarPowerStateListener() 83 android::sp<CarPowerManager> parent = mParent; in onStateChanged() 97 android::sp<CarPowerManager> mParent;
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hardware/power/ |
D | CarPowerManagerUnitTest.java | 49 import android.car.hardware.power.CarPowerManager; 128 private CarPowerManager mCarPowerManager; 146 super(CarPowerManager.TAG); in CarPowerManagerUnitTest() 161 mCarPowerManager = new CarPowerManager(mCar, mService); in setUp() 224 List.of(CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE, in testSetListener() 225 CarPowerManager.STATE_SHUTDOWN_PREPARE, in testSetListener() 226 CarPowerManager.STATE_SUSPEND_ENTER)); in testSetListener() 232 List<Integer> expectedStates = List.of(CarPowerManager.STATE_ON, in testSetListenerWithCompletion() 233 CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE, in testSetListenerWithCompletion() 234 CarPowerManager.STATE_SHUTDOWN_PREPARE, in testSetListenerWithCompletion() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | CarLocationServiceTest.java | 38 import android.car.hardware.power.CarPowerManager; 39 import android.car.hardware.power.CarPowerManager.CompletablePowerStateChangeFuture; 338 mCarLocationService.onStateChanged(CarPowerManager.STATE_SHUTDOWN_PREPARE, future); in testStoresLocationUponShutdownPrepare() 356 mCarLocationService.onStateChanged(CarPowerManager.STATE_SUSPEND_ENTER, in testDoesNotThrowExceptionUponPowerStateChanged() 358 mCarLocationService.onStateChanged(CarPowerManager.STATE_SUSPEND_EXIT, in testDoesNotThrowExceptionUponPowerStateChanged() 360 mCarLocationService.onStateChanged(CarPowerManager.STATE_SHUTDOWN_ENTER, in testDoesNotThrowExceptionUponPowerStateChanged() 362 mCarLocationService.onStateChanged(CarPowerManager.STATE_ON, /* future= */ null); in testDoesNotThrowExceptionUponPowerStateChanged() 363 mCarLocationService.onStateChanged(CarPowerManager.STATE_WAIT_FOR_VHAL, in testDoesNotThrowExceptionUponPowerStateChanged() 365 mCarLocationService.onStateChanged(CarPowerManager.STATE_SHUTDOWN_CANCELLED, in testDoesNotThrowExceptionUponPowerStateChanged() 367 mCarLocationService.onStateChanged(CarPowerManager.STATE_HIBERNATION_EXIT, in testDoesNotThrowExceptionUponPowerStateChanged() [all …]
|
/packages/services/Car/tests/carservice_test/src/com/android/car/garagemode/ |
D | GarageModeControllerTest.java | 38 import android.car.hardware.power.CarPowerManager; 144 mController.onStateChanged(CarPowerManager.STATE_SHUTDOWN_PREPARE, INVALID_TIMEOUT); in testOnShutdownPrepare_shouldInitiateGarageMode() 159 mController.onStateChanged(CarPowerManager.STATE_SHUTDOWN_PREPARE, INVALID_TIMEOUT); in testOnShutdownCancelled_shouldCancelGarageMode() 162 mController.onStateChanged(CarPowerManager.STATE_SHUTDOWN_CANCELLED, INVALID_TIMEOUT); in testOnShutdownCancelled_shouldCancelGarageMode() 173 eq(CarPowerManager.STATE_SHUTDOWN_PREPARE), eq(mController)); in testOnShutdownCancelled_shouldCancelGarageMode() 206 controller.onStateChanged(CarPowerManager.STATE_SHUTDOWN_CANCELLED, INVALID_TIMEOUT); in testOnStateChanged() 210 controller.onStateChanged(CarPowerManager.STATE_SHUTDOWN_ENTER, INVALID_TIMEOUT); in testOnStateChanged() 214 controller.onStateChanged(CarPowerManager.STATE_SUSPEND_ENTER, INVALID_TIMEOUT); in testOnStateChanged() 218 controller.onStateChanged(CarPowerManager.STATE_HIBERNATION_ENTER, INVALID_TIMEOUT); in testOnStateChanged() 222 controller.onStateChanged(CarPowerManager.STATE_INVALID , INVALID_TIMEOUT); in testOnStateChanged()
|
/packages/apps/Car/Settings/src/com/android/car/settings/common/ |
D | PowerPolicyListener.java | 20 import android.car.hardware.power.CarPowerManager; 43 private final CarPowerManager.CarPowerPolicyListener mPolicyListener = 44 new CarPowerManager.CarPowerPolicyListener() { 51 @Nullable private CarPowerManager mCarPowerManager; 73 mCarPowerManager = (CarPowerManager) mCar.getCarManager(Car.POWER_SERVICE); in PowerPolicyListener()
|
/packages/services/Car/service/src/com/android/car/power/ |
D | CarPowerManagementService.java | 19 import static android.car.hardware.power.CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE; 20 import static android.car.hardware.power.CarPowerManager.STATE_SHUTDOWN_PREPARE; 48 import android.car.hardware.power.CarPowerManager; 321 @CarPowerManager.CarPowerState 322 private int mStateForCompletion = CarPowerManager.STATE_INVALID; 613 onApPowerStateChange(CpmsState.WAIT_FOR_VHAL, CarPowerManager.STATE_WAIT_FOR_VHAL); in init() 616 onApPowerStateChange(CpmsState.ON, CarPowerManager.STATE_ON); in init() 772 CarPowerManager.STATE_WAIT_FOR_VHAL, /* canPostpone= */ false)); in setStateForWakeUp() 783 @CarPowerManager.CarPowerState int carPowerStateListenerState) { in onApPowerStateChange() 896 private void notifyPowerStateChangeToDaemon(@CarPowerManager.CarPowerState int powerState) { in notifyPowerStateChangeToDaemon() [all …]
|
/packages/services/Car/car-lib/native/CarPowerManager/ |
D | CarPowerManager.cpp | 32 int CarPowerManager::clearListener() { in clearListener() 43 int CarPowerManager::requestShutdownOnNextSuspend() { in requestShutdownOnNextSuspend() 53 int CarPowerManager::setListener(Listener listener) { in setListener() 71 bool CarPowerManager::connectToCarService() { in connectToCarService()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/notification/ |
D | PowerManagerHelper.java | 21 import android.car.hardware.power.CarPowerManager; 22 import android.car.hardware.power.CarPowerManager.CarPowerStateListener; 44 private CarPowerManager mCarPowerManager; 54 mCarPowerManager = (CarPowerManager) car.getCarManager(Car.POWER_SERVICE); in PowerManagerHelper()
|
/packages/services/Car/car-lib/src/android/car/hardware/power/ |
D | CarPowerManager.java | 52 public class CarPowerManager extends CarManagerBase { class 55 public static final String TAG = CarPowerManager.class.getSimpleName(); 358 public CarPowerManager(Car car, IBinder service) { in CarPowerManager() method in CarPowerManager 697 case CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE: in isCompletionAllowed() 698 case CarPowerManager.STATE_SHUTDOWN_PREPARE: in isCompletionAllowed() 699 case CarPowerManager.STATE_SHUTDOWN_ENTER: in isCompletionAllowed() 700 case CarPowerManager.STATE_SUSPEND_ENTER: in isCompletionAllowed() 701 case CarPowerManager.STATE_HIBERNATION_ENTER: in isCompletionAllowed() 702 case CarPowerManager.STATE_POST_SHUTDOWN_ENTER: in isCompletionAllowed() 703 case CarPowerManager.STATE_POST_SUSPEND_ENTER: in isCompletionAllowed() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/wifi/ |
D | CarWifiServiceUnitTest.java | 31 import android.car.hardware.power.CarPowerManager; 167 getCarPowerStateListener().onStateChanged(CarPowerManager.STATE_ON, 0); in testPersistCarSettingOn_userUnlockBeforePowerOn_tetheringOn() 184 getCarPowerStateListener().onStateChanged(CarPowerManager.STATE_ON, 0); in testPersistCarSettingOn_notOnLast_noTethering() 199 getCarPowerStateListener().onStateChanged(CarPowerManager.STATE_ON, 0); in testPersistCarSettingOn_tetheringAlreadyEnabled_noTethering() 209 when(mCarPowerManagementService.getPowerState()).thenReturn(CarPowerManager.STATE_ON); in testPersistCarSettingOn_powerOnBeforeUserUnlock_tetheringOn() 213 getCarPowerStateListener().onStateChanged(CarPowerManager.STATE_ON, 0); in testPersistCarSettingOn_powerOnBeforeUserUnlock_tetheringOn() 225 when(mCarPowerManagementService.getPowerState()).thenReturn(CarPowerManager.STATE_ON); in testPersistCarSettingOff_powerOnBeforeUserUnlock_noTethering() 229 getCarPowerStateListener().onStateChanged(CarPowerManager.STATE_ON, 0); in testPersistCarSettingOff_powerOnBeforeUserUnlock_noTethering() 240 getCarPowerStateListener().onStateChanged(CarPowerManager.STATE_ON, 0); in testPersistCarSettingOff_userUnlockBeforePowerOn_noTethering()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/sessioncontroller/ |
D | SessionControllerUnitTest.java | 29 import android.car.hardware.power.CarPowerManager; 126 mPowerStateListenerCaptor.getValue().onStateChanged(CarPowerManager.STATE_ON, 0); in testRegisterCallback_stateChangeTriggersCallback() 142 mPowerStateListenerCaptor.getValue().onStateChanged(CarPowerManager.STATE_ON, 0); in testGetSessionAnnotation_sessionOnSessionOffSequence() 161 mPowerStateListenerCaptor.getValue().onStateChanged(CarPowerManager.STATE_SHUTDOWN_PREPARE, in testGetSessionAnnotation_sessionOnSessionOffSequence() 192 doReturn(CarPowerManager.STATE_ON).when(mMockCarPowerManagementService).getPowerState(); in testInitSession_triggersCallback()
|
/packages/services/Car/service/src/com/android/car/user/ |
D | CarUserNoticeService.java | 19 import static android.car.hardware.power.CarPowerManager.CarPowerStateListener; 36 import android.car.hardware.power.CarPowerManager; 118 private CarPowerManager mCarPowerManager; 150 if (state == CarPowerManager.STATE_SHUTDOWN_PREPARE) { 152 } else if (state == CarPowerManager.STATE_ON) { 404 CarPowerManager carPowerManager; in init() 435 CarPowerManager carPowerManager; in release()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/qc/ |
D | QCScreenOffButtonController.java | 19 import android.car.hardware.power.CarPowerManager; 41 private CarPowerManager mCarPowerManager; 45 mCarPowerManager = car.getCarManager(CarPowerManager.class);
|
/packages/services/Car/service/src/com/android/car/ |
D | CarLocalServices.java | 22 import android.car.hardware.power.CarPowerManager; 109 public static CarPowerManager createCarPowerManager(Context context) { in createCarPowerManager() 116 return new CarPowerManager(car, service); in createCarPowerManager()
|
D | CarLocationService.java | 27 import android.car.hardware.power.CarPowerManager; 28 import android.car.hardware.power.CarPowerManager.CarPowerStateListenerWithCompletion; 29 import android.car.hardware.power.CarPowerManager.CompletablePowerStateChangeFuture; 105 private final CarPowerManager mCarPowerManager; 336 case CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE: in onStateChanged() 341 case CarPowerManager.STATE_SHUTDOWN_PREPARE: in onStateChanged() 348 case CarPowerManager.STATE_SUSPEND_EXIT: in onStateChanged()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/ |
D | KitchenSinkHelperImpl.java | 24 import android.car.hardware.power.CarPowerManager; 50 private CarPowerManager mPowerManager; 126 public CarPowerManager getPowerManager() { in getPowerManager() 129 mPowerManager = (CarPowerManager) mCarApi.getCarManager( in getPowerManager()
|
D | KitchenSinkHelper.java | 24 import android.car.hardware.power.CarPowerManager; 64 CarPowerManager getPowerManager(); in getPowerManager()
|
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/qc/ |
D | QCScreenOffButtonControllerTest.java | 27 import android.car.hardware.power.CarPowerManager; 59 private CarPowerManager mCarPowerManager; 80 when(mCar.getCarManager(CarPowerManager.class)).thenReturn(mCarPowerManager); in setUp()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/ |
D | CarUserNoticeServiceTest.java | 37 import android.car.hardware.power.CarPowerManager; 38 import android.car.hardware.power.CarPowerManager.CarPowerStateListener; 92 private CarPowerManager mCarPowerManager; 297 sendPowerStateChange(CarPowerManager.STATE_SHUTDOWN_PREPARE); in sendPowerShutDown() 303 sendPowerStateChange(CarPowerManager.STATE_ON); in sendPowerOn()
|
/packages/services/Car/service/src/com/android/car/telemetry/sessioncontroller/ |
D | SessionController.java | 21 import android.car.hardware.power.CarPowerManager; 113 case CarPowerManager.STATE_SHUTDOWN_PREPARE: in onCarPowerStateChanged() 116 case CarPowerManager.STATE_ON: in onCarPowerStateChanged()
|
/packages/services/Car/tests/carservice_test/src/com/android/car/power/ |
D | CarPowerManagementTest.java | 25 import android.car.hardware.power.CarPowerManager; 436 testShutdownPostponeWhileListenerPendingInState(CarPowerManager.STATE_HIBERNATION_ENTER, in testShutdownPostponeDuringHibernationEnter() 443 testShutdownPostponeWhileListenerPendingInState(CarPowerManager.STATE_SHUTDOWN_ENTER, in testShutdownPostponeDuringShutdownEnter() 450 testShutdownPostponeWhileListenerPendingInState(CarPowerManager.STATE_SUSPEND_ENTER, in testShutdownPostponeDuringSuspendEnter() 457 testShutdownPostponeWhileListenerPendingInState(CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE, in testShutdownPostponeDuringPreShutdownPrepare() 464 testShutdownPostponeWhileListenerPendingInState(CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE, in testShutdownPostponeDuringPreShutdownPrepareWithImmediately() 495 if (state == CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE) { in testSleepShutdownFromPreShutdownPrepare() 558 if (state == CarPowerManager.STATE_PRE_SHUTDOWN_PREPARE) { in testShutdownImmediatelyFromPreShutdownPrepare() 718 if (state == CarPowerManager.STATE_SHUTDOWN_PREPARE in registerListenerToFakeGarageMode()
|
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/userpicker/ |
D | CarServiceMediatorTest.java | 42 import android.car.hardware.power.CarPowerManager; 79 private CarPowerManager mMockCarPowerManager; 100 doReturn(mMockCarPowerManager).when(mMockCar).getCarManager(CarPowerManager.class); in setUp()
|
/packages/services/Car/service/src/com/android/car/watchdog/ |
D | CarWatchdogService.java | 52 import android.car.hardware.power.CarPowerManager; 853 case CarPowerManager.STATE_SHUTDOWN_PREPARE: in carPowerStateToPowerCycle() 855 case CarPowerManager.STATE_SHUTDOWN_ENTER: in carPowerStateToPowerCycle() 856 case CarPowerManager.STATE_SUSPEND_ENTER: in carPowerStateToPowerCycle() 857 case CarPowerManager.STATE_HIBERNATION_ENTER: in carPowerStateToPowerCycle() 859 case CarPowerManager.STATE_SUSPEND_EXIT: in carPowerStateToPowerCycle() 860 case CarPowerManager.STATE_HIBERNATION_EXIT: in carPowerStateToPowerCycle() 863 case CarPowerManager.STATE_ON: in carPowerStateToPowerCycle()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userpicker/ |
D | CarServiceMediator.java | 41 import android.car.hardware.power.CarPowerManager; 76 private CarPowerManager mCarPowerManager; 104 mCarPowerManager = car.getCarManager(CarPowerManager.class); in onConnect()
|