Add CarPowerManager

- Add Java API for apps to call into power manager
- Update EmbeddedKitchenSink to test API
- Update CarPowrManagementService to handle binder interface

Bug: 32061842
Test: EmbeddedKitchenSink
Change-Id: I15f5c25262507d4a6d6e5f381643f3e584f1843e
diff --git a/tests/EmbeddedKitchenSinkApp/res/layout/power_test.xml b/tests/EmbeddedKitchenSinkApp/res/layout/power_test.xml
index 6ad14d4..62f80d0 100644
--- a/tests/EmbeddedKitchenSinkApp/res/layout/power_test.xml
+++ b/tests/EmbeddedKitchenSinkApp/res/layout/power_test.xml
@@ -19,19 +19,53 @@
     android:layout_width="match_parent"
     android:orientation="vertical">
 
-    <Button
-        android:clickable="true"
-        android:id="@+id/btnPwrShutdown"
-        android:layout_height="@dimen/powerBtnHeight"
-        android:layout_width ="250dp"
-        android:text="@string/power_shutdown"
-        android:textSize="@dimen/powerTextSize"/>
+    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:orientation="horizontal">
+        <Button
+            android:clickable="true"
+            android:id="@+id/btnPwrShutdown"
+            android:layout_height="@dimen/powerBtnHeight"
+            android:layout_width ="@dimen/powerBtnWidth"
+            android:text="@string/power_shutdown"
+            android:textSize="@dimen/powerTextSize"/>
 
-    <Button
-        android:clickable="true"
-        android:id="@+id/btnPwrSleep"
-        android:layout_height="@dimen/powerBtnHeight"
-        android:layout_width ="250dp"
-        android:text="@string/power_sleep"
-        android:textSize="@dimen/powerTextSize"/>
+        <Button
+            android:clickable="true"
+            android:id="@+id/btnPwrSleep"
+            android:layout_height="@dimen/powerBtnHeight"
+            android:layout_width ="@dimen/powerBtnWidth"
+            android:text="@string/power_sleep"
+            android:textSize="@dimen/powerTextSize"/>
+    </LinearLayout>
+
+    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:orientation="horizontal">
+
+        <Button
+            android:clickable="true"
+            android:id="@+id/btnPwrRequestShutdown"
+            android:layout_height="@dimen/powerBtnHeight"
+            android:layout_width ="@dimen/powerBtnWidth"
+            android:text="@string/power_request_shutdown"
+            android:textSize="@dimen/powerTextSize"/>
+
+        <Button
+            android:clickable="true"
+            android:id="@+id/btnPwrGetBootReason"
+            android:layout_height="@dimen/powerBtnHeight"
+            android:layout_width ="@dimen/powerBtnWidth"
+            android:text="@string/power_get_boot_reason"
+            android:textSize="@dimen/powerTextSize"/>
+
+        <TextView
+            android:id="@+id/tvPowerBootReason"
+            android:layout_height="@dimen/powerBtnHeight"
+            android:layout_width ="@dimen/powerBtnWidth"
+            android:layout_weight="1"
+            android:textSize="@dimen/powerTextSize"/>
+    </LinearLayout>
 </LinearLayout>