summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-09-11 12:00:40 -0700
committerd34d <clark@cyngn.com>2015-09-11 12:04:11 -0700
commit91bdbdf5505c34541abaefd59aa90efe5a499627 (patch)
tree7c9e8e1613388fcd8f34e9cf510ddb2707e41009
parentc598d73c8af75ac004f18e74fbc37e8867c97bbd (diff)
downloadpackages_apps_ThemeChooser-91bdbdf5505c34541abaefd59aa90efe5a499627.zip
packages_apps_ThemeChooser-91bdbdf5505c34541abaefd59aa90efe5a499627.tar.gz
packages_apps_ThemeChooser-91bdbdf5505c34541abaefd59aa90efe5a499627.tar.bz2
Don't process touch events if being destroyed
This will prevent a user from releasing the FAB into the delete box and then quickly touch the FAB again, preventing it from being removed. Change-Id: I69eccf6a76534c21ce9800e75fbfd03537bc27d0
-rw-r--r--src/com/cyngn/theme/perapptheming/PerAppThemingWindow.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/cyngn/theme/perapptheming/PerAppThemingWindow.java b/src/com/cyngn/theme/perapptheming/PerAppThemingWindow.java
index a23f714..357e6aa 100644
--- a/src/com/cyngn/theme/perapptheming/PerAppThemingWindow.java
+++ b/src/com/cyngn/theme/perapptheming/PerAppThemingWindow.java
@@ -194,6 +194,8 @@ public class PerAppThemingWindow extends Service implements OnTouchListener,
@Override
public boolean onTouch(View v, MotionEvent event) {
+ if (mIsBeingDestroyed) return true;
+
switch(event.getAction()) {
case MotionEvent.ACTION_DOWN:
if (mThemeListLayout.isAttachedToWindow()) {