Fix bug where pebble app triggers accessibility mode in navbar camera

Apparently the Pebble application uses accessibility.  This was
triggering the navbar to resort to accessibility mode for launching
the camera.  The fix is to also require touch exploration to be
enabled.

Fixes bug 11061505

Change-Id: I2245bd37eef9e68911862ce86147b1343816f1a4
This commit is contained in:
Jim Miller
2013-10-05 19:01:00 -07:00
parent fd65373dd7
commit 158fbd3ab8

View File

@@ -391,7 +391,7 @@ public class NavigationBarView extends LinearLayout {
final AccessibilityManager accessibilityManager =
(AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
if (accessibilityManager.isEnabled()) {
if (accessibilityManager.isEnabled() && accessibilityManager.isTouchExplorationEnabled()) {
// In accessibility mode, we add a simple click handler since swipe is tough to
// trigger near screen edges.
View camera = getCameraButton();