diff options
13 files changed, 19 insertions, 293 deletions
diff --git a/api/current.txt b/api/current.txt index 189352cf909c..7a01e1a874fc 100644 --- a/api/current.txt +++ b/api/current.txt @@ -362,7 +362,7 @@ package android { field public static final int canControlMagnification = 16844039; // 0x1010507 field public static final int canPerformGestures = 16844045; // 0x101050d field public static final int canRecord = 16844060; // 0x101051c - field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8 + field public static final deprecated int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8 field public static final int canRequestFilterKeyEvents = 16843737; // 0x10103d9 field public static final int canRequestTouchExplorationMode = 16843735; // 0x10103d7 field public static final int canRetrieveWindowContent = 16843653; // 0x1010385 @@ -2837,7 +2837,7 @@ package android.accessibilityservice { field public static final int CAPABILITY_CAN_CAPTURE_FINGERPRINT_GESTURES = 64; // 0x40 field public static final int CAPABILITY_CAN_CONTROL_MAGNIFICATION = 16; // 0x10 field public static final int CAPABILITY_CAN_PERFORM_GESTURES = 32; // 0x20 - field public static final int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4 + field public static final deprecated int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4 field public static final int CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS = 8; // 0x8 field public static final int CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION = 2; // 0x2 field public static final int CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT = 1; // 0x1 @@ -2855,7 +2855,7 @@ package android.accessibilityservice { field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2 field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10 field public static final int FLAG_REQUEST_ACCESSIBILITY_BUTTON = 256; // 0x100 - field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8 + field public static final deprecated int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8 field public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32; // 0x20 field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4 field public static final int FLAG_RETRIEVE_INTERACTIVE_WINDOWS = 64; // 0x40 diff --git a/api/system-current.txt b/api/system-current.txt index c5b3c09a3efd..450df40795e3 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -481,7 +481,7 @@ package android { field public static final int canControlMagnification = 16844039; // 0x1010507 field public static final int canPerformGestures = 16844045; // 0x101050d field public static final int canRecord = 16844060; // 0x101051c - field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8 + field public static final deprecated int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8 field public static final int canRequestFilterKeyEvents = 16843737; // 0x10103d9 field public static final int canRequestTouchExplorationMode = 16843735; // 0x10103d7 field public static final int canRetrieveWindowContent = 16843653; // 0x1010385 @@ -2965,7 +2965,7 @@ package android.accessibilityservice { field public static final int CAPABILITY_CAN_CAPTURE_FINGERPRINT_GESTURES = 64; // 0x40 field public static final int CAPABILITY_CAN_CONTROL_MAGNIFICATION = 16; // 0x10 field public static final int CAPABILITY_CAN_PERFORM_GESTURES = 32; // 0x20 - field public static final int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4 + field public static final deprecated int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4 field public static final int CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS = 8; // 0x8 field public static final int CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION = 2; // 0x2 field public static final int CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT = 1; // 0x1 @@ -2983,7 +2983,7 @@ package android.accessibilityservice { field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2 field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10 field public static final int FLAG_REQUEST_ACCESSIBILITY_BUTTON = 256; // 0x100 - field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8 + field public static final deprecated int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8 field public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32; // 0x20 field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4 field public static final int FLAG_RETRIEVE_INTERACTIVE_WINDOWS = 64; // 0x40 diff --git a/api/test-current.txt b/api/test-current.txt index 1f49c4ab6d70..c00795db237b 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -362,7 +362,7 @@ package android { field public static final int canControlMagnification = 16844039; // 0x1010507 field public static final int canPerformGestures = 16844045; // 0x101050d field public static final int canRecord = 16844060; // 0x101051c - field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8 + field public static final deprecated int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8 field public static final int canRequestFilterKeyEvents = 16843737; // 0x10103d9 field public static final int canRequestTouchExplorationMode = 16843735; // 0x10103d7 field public static final int canRetrieveWindowContent = 16843653; // 0x1010385 @@ -2837,7 +2837,7 @@ package android.accessibilityservice { field public static final int CAPABILITY_CAN_CAPTURE_FINGERPRINT_GESTURES = 64; // 0x40 field public static final int CAPABILITY_CAN_CONTROL_MAGNIFICATION = 16; // 0x10 field public static final int CAPABILITY_CAN_PERFORM_GESTURES = 32; // 0x20 - field public static final int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4 + field public static final deprecated int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4 field public static final int CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS = 8; // 0x8 field public static final int CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION = 2; // 0x2 field public static final int CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT = 1; // 0x1 @@ -2855,7 +2855,7 @@ package android.accessibilityservice { field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2 field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10 field public static final int FLAG_REQUEST_ACCESSIBILITY_BUTTON = 256; // 0x100 - field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8 + field public static final deprecated int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8 field public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32; // 0x20 field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4 field public static final int FLAG_RETRIEVE_INTERACTIVE_WINDOWS = 64; // 0x40 diff --git a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java index 5937dd951dc4..3cda489c5005 100644 --- a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java +++ b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java @@ -95,9 +95,7 @@ public class AccessibilityServiceInfo implements Parcelable { public static final int CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION = 0x00000002; /** - * Capability: This accessibility service can request enhanced web accessibility - * enhancements. For example, installing scripts to make app content more accessible. - * @see android.R.styleable#AccessibilityService_canRequestEnhancedWebAccessibility + * @deprecated No longer used */ public static final int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 0x00000004; @@ -237,22 +235,7 @@ public class AccessibilityServiceInfo implements Parcelable { public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 0x0000004; /** - * This flag requests from the system to enable web accessibility enhancing - * extensions. Such extensions aim to provide improved accessibility support - * for content presented in a {@link android.webkit.WebView}. An example of such - * an extension is injecting JavaScript from a secure source. The system will enable - * enhanced web accessibility if there is at least one accessibility service - * that has this flag set. Hence, clearing this flag does not guarantee that the - * device will not have enhanced web accessibility enabled since there may be - * another enabled service that requested it. - * <p> - * Services that want to set this flag have to declare this capability - * in their meta-data by setting the attribute {@link android.R.attr - * #canRequestEnhancedWebAccessibility canRequestEnhancedWebAccessibility} to - * true, otherwise this flag will be ignored. For how to declare the meta-data - * of a service refer to {@value AccessibilityService#SERVICE_META_DATA}. - * </p> - * @see android.R.styleable#AccessibilityService_canRequestEnhancedWebAccessibility + * @deprecated No longer used */ public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 0x00000008; @@ -526,10 +509,6 @@ public class AccessibilityServiceInfo implements Parcelable { mCapabilities |= CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION; } if (asAttributes.getBoolean(com.android.internal.R.styleable - .AccessibilityService_canRequestEnhancedWebAccessibility, false)) { - mCapabilities |= CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY; - } - if (asAttributes.getBoolean(com.android.internal.R.styleable .AccessibilityService_canRequestFilterKeyEvents, false)) { mCapabilities |= CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS; } @@ -659,7 +638,6 @@ public class AccessibilityServiceInfo implements Parcelable { * * @see #CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT * @see #CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION - * @see #CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY * @see #CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS * @see #CAPABILITY_CAN_CONTROL_MAGNIFICATION * @see #CAPABILITY_CAN_PERFORM_GESTURES @@ -676,7 +654,6 @@ public class AccessibilityServiceInfo implements Parcelable { * * @see #CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT * @see #CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION - * @see #CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY * @see #CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS * @see #CAPABILITY_CAN_CONTROL_MAGNIFICATION * @see #CAPABILITY_CAN_PERFORM_GESTURES @@ -1074,10 +1051,6 @@ public class AccessibilityServiceInfo implements Parcelable { new CapabilityInfo(CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION, R.string.capability_title_canRequestTouchExploration, R.string.capability_desc_canRequestTouchExploration)); - sAvailableCapabilityInfos.put(CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY, - new CapabilityInfo(CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY, - R.string.capability_title_canRequestEnhancedWebAccessibility, - R.string.capability_desc_canRequestEnhancedWebAccessibility)); sAvailableCapabilityInfos.put(CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS, new CapabilityInfo(CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS, R.string.capability_title_canRequestFilterKeyEvents, diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 60ef3553e3c5..69371be4f24a 100755 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -5575,76 +5575,6 @@ public final class Settings { "high_text_contrast_enabled"; /** - * If injection of accessibility enhancing JavaScript screen-reader - * is enabled. - * <p> - * Note: The JavaScript based screen-reader is served by the - * Google infrastructure and enable users with disabilities to - * efficiently navigate in and explore web content. - * </p> - * <p> - * This property represents a boolean value. - * </p> - * @hide - */ - public static final String ACCESSIBILITY_SCRIPT_INJECTION = - "accessibility_script_injection"; - - /** - * The URL for the injected JavaScript based screen-reader used - * for providing accessibility of content in WebView. - * <p> - * Note: The JavaScript based screen-reader is served by the - * Google infrastructure and enable users with disabilities to - * efficiently navigate in and explore web content. - * </p> - * <p> - * This property represents a string value. - * </p> - * @hide - */ - public static final String ACCESSIBILITY_SCREEN_READER_URL = - "accessibility_script_injection_url"; - - /** - * Key bindings for navigation in built-in accessibility support for web content. - * <p> - * Note: These key bindings are for the built-in accessibility navigation for - * web content which is used as a fall back solution if JavaScript in a WebView - * is not enabled or the user has not opted-in script injection from Google. - * </p> - * <p> - * The bindings are separated by semi-colon. A binding is a mapping from - * a key to a sequence of actions (for more details look at - * android.webkit.AccessibilityInjector). A key is represented as the hexademical - * string representation of an integer obtained from a meta state (optional) shifted - * sixteen times left and bitwise ored with a key code. An action is represented - * as a hexademical string representation of an integer where the first two digits - * are navigation action index, the second, the third, and the fourth digit pairs - * represent the action arguments. The separate actions in a binding are colon - * separated. The key and the action sequence it maps to are separated by equals. - * </p> - * <p> - * For example, the binding below maps the DPAD right button to traverse the - * current navigation axis once without firing an accessibility event and to - * perform the same traversal again but to fire an event: - * <code> - * 0x16=0x01000100:0x01000101; - * </code> - * </p> - * <p> - * The goal of this binding is to enable dynamic rebinding of keys to - * navigation actions for web content without requiring a framework change. - * </p> - * <p> - * This property represents a string value. - * </p> - * @hide - */ - public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS = - "accessibility_web_content_key_bindings"; - - /** * Setting that specifies whether the display magnification is enabled via a system-wide * triple tap gesture. Display magnifications allows the user to zoom in the display content * and is targeted to low vision users. The current magnification scale is controlled by @@ -7014,8 +6944,6 @@ public final class Settings { ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE, - ACCESSIBILITY_SCRIPT_INJECTION, - ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS, ENABLED_ACCESSIBILITY_SERVICES, ENABLED_NOTIFICATION_LISTENERS, ENABLED_VR_LISTENERS, diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 6e790a70f6a4..3e1136886fba 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -3426,7 +3426,9 @@ <flag name="flagIncludeNotImportantViews" value="0x00000002" /> <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE}. --> <flag name="flagRequestTouchExplorationMode" value="0x00000004" /> - <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY}. --> + <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY}. + Not used by the framework. + --> <flag name="flagRequestEnhancedWebAccessibility" value="0x00000008" /> <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_REPORT_VIEW_IDS}. --> <flag name="flagReportViewIds" value="0x00000010" /> @@ -3457,12 +3459,8 @@ --> <attr name="canRequestTouchExplorationMode" format="boolean" /> <!-- Attribute whether the accessibility service wants to be able to request enhanced - web accessibility enhancements. For example, installing scripts to make app - content more accessible. - <p> - Required to allow setting the {@link android.accessibilityservice - #AccessibilityServiceInfo#FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY} flag. - </p> + web accessibility enhancements. + {@deprecated Not used by the framework} --> <attr name="canRequestEnhancedWebAccessibility" format="boolean" /> <!-- Attribute whether the accessibility service wants to be able to request to diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index a5181fee1445..35b12ffb5d68 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -713,13 +713,6 @@ <string name="capability_desc_canRequestTouchExploration">Tapped items will be spoken aloud and the screen can be explored using gestures.</string> - <!-- Title for the capability of an accessibility service to request enhanced web accessibility. --> - <string name="capability_title_canRequestEnhancedWebAccessibility">Turn on enhanced web - accessibility</string> - <!-- Description for the capability of an accessibility service to request enhanced web accessibility. --> - <string name="capability_desc_canRequestEnhancedWebAccessibility">Scripts may be installed to - make app content more accessible.</string> - <!-- Title for the capability of an accessibility service to request to filter key events. --> <string name="capability_title_canRequestFilterKeyEvents">Observe text you type</string> <!-- Description for the capability of an accessibility service to request to filter key events. --> diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java index d7887d333095..38ab86524b4e 100644 --- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java +++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java @@ -376,7 +376,6 @@ public class SettingsBackupTest { private static final Set<String> BACKUP_BLACKLISTED_SECURE_SETTINGS = newHashSet( - Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL, Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE, Settings.Secure.ALLOWED_GEOLOCATION_ORIGINS, Settings.Secure.ALWAYS_ON_VPN_APP, diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index a8629f84025b..e9dadc5fbf10 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -94,49 +94,9 @@ <!-- Default for Settings.Secure.SYNC_PARENT_SOUNDS --> <bool name="def_sync_parent_sounds">true</bool> - <!-- Default for Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION --> - <bool name="def_accessibility_script_injection">false</bool> - <!-- Default for Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD --> <bool name="def_accessibility_speak_password">true</bool> - <!-- Default for Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS --> - <string name="def_accessibility_web_content_key_bindings" translatable="false"> - <!-- DPAD/Trackball UP - traverse previous on current axis and send an event. --> - 0x13=0x01000100; - <!-- DPAD/Trackball DOWN - traverse next on current axis and send an event. --> - 0x14=0x01010100; - <!-- DPAD/Trackball LEFT - traverse previous on the character navigation axis and send event. --> - 0x15=0x02000001; - <!-- DPAD/Trackball RIGHT - traverse next on the character navigation axis end send event. --> - 0x16=0x02010001; - <!-- Alt+DPAD/Trackball UP - go to the top of the document. --> - 0x200000013=0x02000601; - <!-- Alt+DPAD/Trackball DOWN - go to the bottom of the document. --> - 0x200000014=0x02010601; - <!-- Alt+DPAD/Trackball LEFT - transition from an axis to another and sends an event.--> - <!-- Axis transitions: 2 -> 1; --> - 0x200000015=0x03020101; - <!-- Alt+DPAD/Trackball RIGHT - transition from an axis to another and sends an event. --> - <!-- Axis transitions: 1 -> 2; --> - 0x200000016=0x03010201; - <!-- Alt+g - go to the previous heading and send an event. --> - 0x200000023=0x02000301; - <!-- Alt+h - go to the next heading and send an event. --> - 0x200000024=0x02010301; - <!-- Alt+COMMA - transition to sentence navigation axis and send an event. --> - <!-- Axis transitions: 7 -> 2; --> - 0x200000037=0x03070201; - <!-- Alt+PERIOD - transition to default web view behavior axis and send an event. --> - <!-- Axis transitions: 0 -> 7; 1 - > 7; 2 -> 7; --> - 0x200000038=0x03000701:0x03010701:0x03020701; - </string> - - <!-- Default for Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION_URL --> - <string name="def_accessibility_screen_reader_url" translatable="false"> - https://ssl.gstatic.com/accessibility/javascript/android/AndroidVox_v1.js - </string> - <!-- Default for Settings.Secure.TOUCH_EXPLORATION_ENABLED --> <bool name="def_touch_exploration_enabled">false</bool> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index a645a5683a7b..b777d412ca6c 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -820,27 +820,8 @@ class DatabaseHelper extends SQLiteOpenHelper { if (upgradeVersion == 57) { /* - * New settings to: - * 1. Enable injection of accessibility scripts in WebViews. - * 2. Define the key bindings for traversing web content in WebViews. + * No longer initializing deleted setting ACCESSIBILITY_SCRIPT_INJECTION. */ - db.beginTransaction(); - SQLiteStatement stmt = null; - try { - stmt = db.compileStatement("INSERT INTO secure(name,value)" - + " VALUES(?,?);"); - loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION, - R.bool.def_accessibility_script_injection); - stmt.close(); - stmt = db.compileStatement("INSERT INTO secure(name,value)" - + " VALUES(?,?);"); - loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS, - R.string.def_accessibility_web_content_key_bindings); - db.setTransactionSuccessful(); - } finally { - db.endTransaction(); - if (stmt != null) stmt.close(); - } upgradeVersion = 58; } @@ -1085,18 +1066,7 @@ class DatabaseHelper extends SQLiteOpenHelper { } if (upgradeVersion == 74) { - // URL from which WebView loads a JavaScript based screen-reader. - db.beginTransaction(); - SQLiteStatement stmt = null; - try { - stmt = db.compileStatement("INSERT INTO secure(name,value) VALUES(?,?);"); - loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL, - R.string.def_accessibility_screen_reader_url); - db.setTransactionSuccessful(); - } finally { - db.endTransaction(); - if (stmt != null) stmt.close(); - } + // No longer using URL from which WebView loads a JavaScript based screen-reader. upgradeVersion = 75; } if (upgradeVersion == 75) { @@ -1147,19 +1117,7 @@ class DatabaseHelper extends SQLiteOpenHelper { } if (upgradeVersion == 78) { - // The JavaScript based screen-reader URL changes in JellyBean. - db.beginTransaction(); - SQLiteStatement stmt = null; - try { - stmt = db.compileStatement("INSERT OR REPLACE INTO secure(name,value)" - + " VALUES(?,?);"); - loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL, - R.string.def_accessibility_screen_reader_url); - db.setTransactionSuccessful(); - } finally { - db.endTransaction(); - if (stmt != null) stmt.close(); - } + // ACCESSIBILITY_SCREEN_READER_URL has been removed upgradeVersion = 79; } @@ -2443,12 +2401,6 @@ class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED, R.bool.def_mount_ums_notify_enabled); - loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION, - R.bool.def_accessibility_script_injection); - - loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS, - R.string.def_accessibility_web_content_key_bindings); - loadIntegerSetting(stmt, Settings.Secure.LONG_PRESS_TIMEOUT, R.integer.def_long_press_timeout_millis); @@ -2458,9 +2410,6 @@ class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, R.bool.def_accessibility_speak_password); - loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL, - R.string.def_accessibility_screen_reader_url); - if (SystemProperties.getBoolean("ro.lockscreen.disable.default", false) == true) { loadSetting(stmt, Settings.System.LOCKSCREEN_DISABLED, "1"); } else { diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java index 1c517733eb2c..d1d59b2fb24f 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java @@ -238,7 +238,6 @@ public class SettingsHelper { // these features working after the restore. switch (name) { case Settings.Secure.ACCESSIBILITY_ENABLED: - case Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION: case Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD: case Settings.Secure.TOUCH_EXPLORATION_ENABLED: case Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED: diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java index bac694f535a7..885573e86ac6 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java @@ -1057,15 +1057,6 @@ class SettingsProtoDumpUtil { Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, SecureSettingsProto.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED); dumpSetting(s, p, - Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION, - SecureSettingsProto.ACCESSIBILITY_SCRIPT_INJECTION); - dumpSetting(s, p, - Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL, - SecureSettingsProto.ACCESSIBILITY_SCREEN_READER_URL); - dumpSetting(s, p, - Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS, - SecureSettingsProto.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS); - dumpSetting(s, p, Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, SecureSettingsProto.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED); dumpSetting(s, p, diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java index 000394155ff1..b6dfdd178a1b 100644 --- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -775,7 +775,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { if ((flags & UiAutomation.FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES) == 0) { // Set the temporary state, and use it instead of settings userState.mIsTouchExplorationEnabled = false; - userState.mIsEnhancedWebAccessibilityEnabled = false; userState.mIsDisplayMagnificationEnabled = false; userState.mIsNavBarMagnificationEnabled = false; userState.mIsAutoclickEnabled = false; @@ -826,7 +825,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { } userState.mIsTouchExplorationEnabled = touchExplorationEnabled; - userState.mIsEnhancedWebAccessibilityEnabled = false; userState.mIsDisplayMagnificationEnabled = false; userState.mIsNavBarMagnificationEnabled = false; userState.mIsAutoclickEnabled = false; @@ -1727,7 +1725,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { updateFilterKeyEventsLocked(userState); updateTouchExplorationLocked(userState); updatePerformGesturesLocked(userState); - updateEnhancedWebAccessibilityLocked(userState); updateDisplayDaltonizerLocked(userState); updateDisplayInversionLocked(userState); updateMagnificationLocked(userState); @@ -1846,7 +1843,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { somethingChanged |= readTouchExplorationGrantedAccessibilityServicesLocked(userState); somethingChanged |= readTouchExplorationEnabledSettingLocked(userState); somethingChanged |= readHighTextContrastEnabledSettingLocked(userState); - somethingChanged |= readEnhancedWebAccessibilityEnabledChangedLocked(userState); somethingChanged |= readMagnificationEnabledSettingsLocked(userState); somethingChanged |= readAutoclickEnabledSettingLocked(userState); somethingChanged |= readAccessibilityShortcutSettingLocked(userState); @@ -1907,17 +1903,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { return false; } - private boolean readEnhancedWebAccessibilityEnabledChangedLocked(UserState userState) { - final boolean enhancedWeAccessibilityEnabled = Settings.Secure.getIntForUser( - mContext.getContentResolver(), Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION, - 0, userState.mUserId) == 1; - if (enhancedWeAccessibilityEnabled != userState.mIsEnhancedWebAccessibilityEnabled) { - userState.mIsEnhancedWebAccessibilityEnabled = enhancedWeAccessibilityEnabled; - return true; - } - return false; - } - private boolean readHighTextContrastEnabledSettingLocked(UserState userState) { final boolean highTextContrastEnabled = Settings.Secure.getIntForUser( mContext.getContentResolver(), @@ -2084,40 +2069,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { return false; } - private void updateEnhancedWebAccessibilityLocked(UserState userState) { - boolean enabled = false; - final int serviceCount = userState.mBoundServices.size(); - for (int i = 0; i < serviceCount; i++) { - Service service = userState.mBoundServices.get(i); - if (canRequestAndRequestsEnhancedWebAccessibilityLocked(service)) { - enabled = true; - break; - } - } - if (enabled != userState.mIsEnhancedWebAccessibilityEnabled) { - userState.mIsEnhancedWebAccessibilityEnabled = enabled; - final long identity = Binder.clearCallingIdentity(); - try { - Settings.Secure.putIntForUser(mContext.getContentResolver(), - Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION, enabled ? 1 : 0, - userState.mUserId); - } finally { - Binder.restoreCallingIdentity(identity); - } - } - } - - private boolean canRequestAndRequestsEnhancedWebAccessibilityLocked(Service service) { - if (!service.canReceiveEventsLocked() || !service.mRequestEnhancedWebAccessibility ) { - return false; - } - if (service.mIsAutomation || (service.mAccessibilityServiceInfo.getCapabilities() - & AccessibilityServiceInfo.CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY) != 0) { - return true; - } - return false; - } - private void updateDisplayDaltonizerLocked(UserState userState) { DisplayAdjustmentUtils.applyDaltonizerSetting(mContext, userState.mUserId); } @@ -2697,8 +2648,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { boolean mRequestTouchExplorationMode; - boolean mRequestEnhancedWebAccessibility; - boolean mRequestFilterKeyEvents; boolean mRetrieveInteractiveWindows; @@ -2854,8 +2803,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { mRequestTouchExplorationMode = (info.flags & AccessibilityServiceInfo.FLAG_REQUEST_TOUCH_EXPLORATION_MODE) != 0; - mRequestEnhancedWebAccessibility = (info.flags - & AccessibilityServiceInfo.FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY) != 0; mRequestFilterKeyEvents = (info.flags & AccessibilityServiceInfo.FLAG_REQUEST_FILTER_KEY_EVENTS) != 0; mRetrieveInteractiveWindows = (info.flags @@ -4933,7 +4880,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public boolean mIsTouchExplorationEnabled; public boolean mIsTextHighContrastEnabled; - public boolean mIsEnhancedWebAccessibilityEnabled; public boolean mIsDisplayMagnificationEnabled; public boolean mIsNavBarMagnificationEnabled; public boolean mIsAutoclickEnabled; @@ -5002,7 +4948,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { mEnabledServices.clear(); mTouchExplorationGrantedServices.clear(); mIsTouchExplorationEnabled = false; - mIsEnhancedWebAccessibilityEnabled = false; mIsDisplayMagnificationEnabled = false; mIsNavBarMagnificationEnabled = false; mServiceAssignedToAccessibilityButton = null; @@ -5051,9 +4996,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { private final Uri mTouchExplorationGrantedAccessibilityServicesUri = Settings.Secure .getUriFor(Settings.Secure.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES); - private final Uri mEnhancedWebAccessibilityUri = Settings.Secure - .getUriFor(Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION); - private final Uri mDisplayInversionEnabledUri = Settings.Secure.getUriFor( Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED); @@ -5093,8 +5035,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { contentResolver.registerContentObserver( mTouchExplorationGrantedAccessibilityServicesUri, false, this, UserHandle.USER_ALL); - contentResolver.registerContentObserver(mEnhancedWebAccessibilityUri, - false, this, UserHandle.USER_ALL); contentResolver.registerContentObserver( mDisplayInversionEnabledUri, false, this, UserHandle.USER_ALL); contentResolver.registerContentObserver( @@ -5144,10 +5084,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { if (readTouchExplorationGrantedAccessibilityServicesLocked(userState)) { onUserStateChangedLocked(userState); } - } else if (mEnhancedWebAccessibilityUri.equals(uri)) { - if (readEnhancedWebAccessibilityEnabledChangedLocked(userState)) { - onUserStateChangedLocked(userState); - } } else if (mDisplayDaltonizerEnabledUri.equals(uri) || mDisplayDaltonizerUri.equals(uri)) { updateDisplayDaltonizerLocked(userState); |