summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Lee <llee@cyngn.com>2015-03-31 01:06:29 (GMT)
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-03-31 01:13:40 (GMT)
commite423f8abb9462d0063e4504ff1386b127875e23b (patch)
tree86e6fe5d07f8485bb9f9c978ac980640cb96675f
parent5bcab957577284a89939d1cc27d4bd93829d9348 (diff)
downloadandroid_packages_apps_Trebuchet-e423f8abb9462d0063e4504ff1386b127875e23b.zip
android_packages_apps_Trebuchet-e423f8abb9462d0063e4504ff1386b127875e23b.tar.gz
android_packages_apps_Trebuchet-e423f8abb9462d0063e4504ff1386b127875e23b.tar.bz2
Trebuchet: Fix bad ui state when backing twice quickly
If a user enters the widget add screen and quickly backs up twice, the widget panel stays around and captures touch, but the ui thinks it is in the homescreen. Change-Id: I52a920fd633f3ab690ca1c959fbc8935c2d0bb69
-rw-r--r--src/com/android/launcher3/Launcher.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index b1bafb1..5d857ce 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2781,6 +2781,14 @@ public class Launcher extends Activity
} else if (f2 != null) {
mDynamicGridSizeFragment.setSize();
} else {
+ // if a user backs up twice very quickly from the widget add screen to the
+ // homescreen, the UI can get into a messed up state and mStateAnimation never
+ // completes or gets cancelled. Cancelling mStateAnimation here fixes this bug
+ if (mStateAnimation != null && mStateAnimation.isRunning()) {
+ mStateAnimation.cancel();
+ mStateAnimation = null;
+ }
+
mWorkspace.exitOverviewMode(true);
}
} else if (mWorkspace.getOpenFolder() != null) {