diff --git a/src/com/android/settings/notification/NotificationAccessConfirmationActivity.java b/src/com/android/settings/notification/NotificationAccessConfirmationActivity.java index 6a13282285d..66e7c44e8b7 100644 --- a/src/com/android/settings/notification/NotificationAccessConfirmationActivity.java +++ b/src/com/android/settings/notification/NotificationAccessConfirmationActivity.java @@ -82,6 +82,9 @@ public class NotificationAccessConfirmationActivity extends Activity AlertController .create(this, this, getWindow()) .installContent(p); + // Consistent with the permission dialog + // Used instead of p.mCancelable as that is only honored for AlertDialog + getWindow().setCloseOnTouchOutside(false); } private void onAllow() { @@ -108,6 +111,12 @@ public class NotificationAccessConfirmationActivity extends Activity return AlertActivity.dispatchPopulateAccessibilityEvent(this, event); } + @Override + public void onBackPressed() { + // Suppress finishing the activity on back button press, + // consistently with the permission dialog behavior + } + @Override public void cancel() { finish();