Refactor CPMS
- Remove Boot Reason
- Rework state machine according to updated design document
- Update CarLocationService with new CPMS states
- Update GarageMode.Controller with new CPMS states
- Update unit tests for CarLocationManager, GarageMode, and CPMS
Bug: 112548962
Test: vhal_emulator.py
(cherry picked from pi-car-dev)
Change-Id: I0e262311626c5032695ec766c34b36f40dc931ec
diff --git a/car-lib/api/system-current.txt b/car-lib/api/system-current.txt
index 55fc0c6..92f436d 100644
--- a/car-lib/api/system-current.txt
+++ b/car-lib/api/system-current.txt
@@ -698,17 +698,14 @@
package android.car.hardware.power {
public class CarPowerManager {
- field public static final int BOOT_REASON_DOOR_OPEN = 4; // 0x4
- field public static final int BOOT_REASON_DOOR_UNLOCK = 2; // 0x2
- field public static final int BOOT_REASON_REMOTE_START = 5; // 0x5
- field public static final int BOOT_REASON_TIMER = 3; // 0x3
- field public static final int BOOT_REASON_USER_POWER_ON = 1; // 0x1
}
public static abstract interface CarPowerManager.CarPowerStateListener {
method public abstract void onStateChanged(int, java.util.concurrent.CompletableFuture<java.lang.Void>);
- field public static final int SHUTDOWN_CANCELLED = 0; // 0x0
- field public static final int SHUTDOWN_ENTER = 1; // 0x1
+ field public static final int ON = 6; // 0x6
+ field public static final int SHUTDOWN_CANCELLED = 8; // 0x8
+ field public static final int SHUTDOWN_ENTER = 5; // 0x5
+ field public static final int SHUTDOWN_PREPARE = 7; // 0x7
field public static final int SUSPEND_ENTER = 2; // 0x2
field public static final int SUSPEND_EXIT = 3; // 0x3
}