Bug 739493 - Add "Accessibility:IsEnabled" message for Android
This commit is contained in:
@@ -1456,12 +1456,6 @@ public class GeckoAppShell
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean getAccessibilityEnabled() {
|
||||
AccessibilityManager accessibilityManager =
|
||||
(AccessibilityManager) GeckoApp.mAppContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
|
||||
return accessibilityManager.isEnabled();
|
||||
}
|
||||
|
||||
public static void addPluginView(View view,
|
||||
int x, int y,
|
||||
int w, int h,
|
||||
@@ -1739,7 +1733,17 @@ public class GeckoAppShell
|
||||
}
|
||||
return promptServiceResult;
|
||||
}
|
||||
|
||||
|
||||
if (type.equals("Accessibility:IsEnabled")) {
|
||||
JSONObject ret = new JSONObject();
|
||||
AccessibilityManager accessibilityManager =
|
||||
(AccessibilityManager) GeckoApp.mAppContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
|
||||
try {
|
||||
ret.put("enabled", accessibilityManager.isEnabled());
|
||||
} catch (Exception ex) { }
|
||||
return ret.toString();
|
||||
}
|
||||
|
||||
if (mEventListeners == null)
|
||||
return "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user