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/service/src/com/android/car/CarLocationService.java b/service/src/com/android/car/CarLocationService.java
index e0a55c9..a16c3e3 100644
--- a/service/src/com/android/car/CarLocationService.java
+++ b/service/src/com/android/car/CarLocationService.java
@@ -161,10 +161,9 @@
 
     @Override
     public void onStateChanged(int state, CompletableFuture<Void> future) {
+        logd("onStateChanged: " + state);
         switch (state) {
-            case CarPowerStateListener.SHUTDOWN_ENTER:
-            case CarPowerStateListener.SUSPEND_ENTER:
-                logd("onStateChanged: " + state);
+            case CarPowerStateListener.SHUTDOWN_PREPARE:
                 asyncOperation(() -> {
                     storeLocation();
                     // Notify the CarPowerManager that it may proceed to shutdown or suspend.
@@ -173,8 +172,7 @@
                     }
                 });
                 break;
-            case CarPowerStateListener.SHUTDOWN_CANCELLED:
-            case CarPowerStateListener.SUSPEND_EXIT:
+            default:
                 // This service does not need to do any work for these events but should still
                 // notify the CarPowerManager that it may proceed.
                 if (future != null) {