diff --git a/core/res/res/layout/autofill_fill_dialog.xml b/core/res/res/layout/autofill_fill_dialog.xml index cce9593f1f2a3..252f59e5ac628 100644 --- a/core/res/res/layout/autofill_fill_dialog.xml +++ b/core/res/res/layout/autofill_fill_dialog.xml @@ -22,8 +22,7 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/autofill_save_outer_top_margin" android:padding="@dimen/autofill_save_outer_top_padding" - android:elevation="@dimen/autofill_elevation" - android:background="?android:attr/colorBackground" + android:background="@drawable/bottomsheet_background" android:orientation="vertical"> + android:visibility="gone" /> + android:text="@string/autofill_save_no"> 3 - 56dp + 24dp 56dp diff --git a/services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java b/services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java index 75d9b7eeecbca..f9f5289ec6bfe 100644 --- a/services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java +++ b/services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java @@ -166,7 +166,9 @@ final class DialogFillUi { window.setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY); window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL - | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH); + | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH + | WindowManager.LayoutParams.FLAG_DIM_BEHIND); + window.setDimAmount(0.6f); window.addPrivateFlags(WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS); window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); window.setGravity(Gravity.BOTTOM | Gravity.CENTER); @@ -216,6 +218,8 @@ final class DialogFillUi { private void setDismissButton(View decor) { final TextView noButton = decor.findViewById(R.id.autofill_dialog_no); + // set "No thinks" by default + noButton.setText(R.string.autofill_save_no); noButton.setOnClickListener((v) -> mCallback.onCanceled()); } @@ -224,6 +228,7 @@ final class DialogFillUi { // set "Continue" by default yesButton.setText(R.string.autofill_continue_yes); yesButton.setOnClickListener(listener); + yesButton.setVisibility(View.VISIBLE); } private void initialAuthenticationLayout(View decor, FillResponse response) {