summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/WindowManager/Shell/res/layout/letterbox_restart_dialog_layout.xml4
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/RestartDialogLayout.java4
2 files changed, 7 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/res/layout/letterbox_restart_dialog_layout.xml b/libs/WindowManager/Shell/res/layout/letterbox_restart_dialog_layout.xml
index 5aff4159e135..7f1aac3551b6 100644
--- a/libs/WindowManager/Shell/res/layout/letterbox_restart_dialog_layout.xml
+++ b/libs/WindowManager/Shell/res/layout/letterbox_restart_dialog_layout.xml
@@ -73,11 +73,13 @@
android:textAlignment="center"/>
<LinearLayout
+ android:id="@+id/letterbox_restart_dialog_checkbox_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingVertical="14dp"
android:orientation="horizontal"
android:layout_gravity="center_vertical"
- android:layout_marginVertical="32dp">
+ android:layout_marginVertical="18dp">
<CheckBox
android:id="@+id/letterbox_restart_dialog_checkbox"
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/RestartDialogLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/RestartDialogLayout.java
index c53e6389331a..05fd5f1172e1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/RestartDialogLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/RestartDialogLayout.java
@@ -95,6 +95,9 @@ public class RestartDialogLayout extends ConstraintLayout implements DialogConta
@Override
protected void onFinishInflate() {
super.onFinishInflate();
+ final View checkboxContainer = findViewById(
+ R.id.letterbox_restart_dialog_checkbox_container);
+ final CheckBox checkbox = findViewById(R.id.letterbox_restart_dialog_checkbox);
mDialogContainer = findViewById(R.id.letterbox_restart_dialog_container);
mDialogTitle = findViewById(R.id.letterbox_restart_dialog_title);
mBackgroundDim = getBackground().mutate();
@@ -103,5 +106,6 @@ public class RestartDialogLayout extends ConstraintLayout implements DialogConta
// We add a no-op on-click listener to the dialog container so that clicks on it won't
// propagate to the listener of the layout (which represents the background dim).
mDialogContainer.setOnClickListener(view -> {});
+ checkboxContainer.setOnClickListener(view -> checkbox.performClick());
}
}