From 0d9cbae4dd6603870d1cd26c9a7b547b5eea6b0c Mon Sep 17 00:00:00 2001 From: Casey Burkhardt Date: Fri, 4 Oct 2013 14:13:15 -0700 Subject: Disable clings when explore by touch is enabled. Bug: 11067870 Change-Id: If203f3a23de3bd3192ff748bbccc04d74b0a73fa --- src/com/android/launcher3/Launcher.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index e3e065e03..45c95736e 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -87,6 +87,7 @@ import android.view.ViewTreeObserver; import android.view.ViewTreeObserver.OnGlobalLayoutListener; import android.view.WindowManager; import android.view.accessibility.AccessibilityEvent; +import android.view.accessibility.AccessibilityManager; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.DecelerateInterpolator; import android.view.inputmethod.InputMethodManager; @@ -4091,6 +4092,13 @@ public class Launcher extends Activity // disable clings when running in a test harness if(ActivityManager.isRunningInTestHarness()) return false; + // Disable clings for accessibility when explore by touch is enabled + final AccessibilityManager a11yManager = (AccessibilityManager) getSystemService( + ACCESSIBILITY_SERVICE); + if (a11yManager.isTouchExplorationEnabled()) { + return false; + } + // Restricted secondary users (child mode) will potentially have very few apps // seeded when they start up for the first time. Clings won't work well with that // boolean supportsLimitedUsers = -- cgit v1.2.3