When the user select a wallpaper and then click back key in SUW, it should become unselect state instead of going back to previous page.
Bug: 156205781
Change-Id: I52fccea7a730858d1971d5cbde367d4d39b2f6fe
diff --git a/src/com/android/wallpaper/picker/TopLevelPickerActivity.java b/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
index 01c4001..482b77e 100755
--- a/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
+++ b/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
@@ -228,6 +228,12 @@
@Override
public void onBackPressed() {
+ Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
+ if (fragment instanceof BottomActionBarFragment
+ && ((BottomActionBarFragment) fragment).onBackPressed()) {
+ return;
+ }
+
CategoryFragment categoryFragment = getCategoryFragment();
if (categoryFragment != null && categoryFragment.popChildFragment()) {
return;