commit | 79ba8068e2f2bb89085f4a5f9212a88592473928 | [log] [tgz] |
---|---|---|
author | Amin Shaikh <ashaikh@google.com> | Thu May 09 17:07:09 2019 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Thu May 09 17:07:09 2019 -0700 |
tree | 2687b726e93a75ec8a620df733fd3949a6b61d0f | |
parent | 53b06a4a523a73b1d3aca339450926d83c6f8558 [diff] | |
parent | f333dadbfc8ee12ca41f88fd76edb2b357b451a1 [diff] |
Do not finish activity onBackPressed. am: f333dadbfc Change-Id: I5023861b26f89fb2a85071afe29617174797f852
diff --git a/src/com/android/customization/picker/CustomizationPickerActivity.java b/src/com/android/customization/picker/CustomizationPickerActivity.java index c20b73f..8759dab 100644 --- a/src/com/android/customization/picker/CustomizationPickerActivity.java +++ b/src/com/android/customization/picker/CustomizationPickerActivity.java
@@ -266,6 +266,17 @@ } } + @Override + public void onBackPressed() { + if (getSupportFragmentManager().popBackStackImmediate()) { + return; + } + if (moveTaskToBack(false)) { + return; + } + super.onBackPressed(); + } + private void navigateToSection(@IdRes int id) { mBottomNav.setSelectedItemId(id); }