源码文件:packages/apps/Setting/src/com/android/settings/accessibility/AccessibilitySettings.java
diff --git a/src/com/android/settings/accessibility/AccessibilitySettings.java b/src/com/android /settings/accessibility/AccessibilitySettings.java
旧模式 100644
新模式 100755
索引 51b676d..5b44dd5
--- a/src/com/android/settings/accessibility/AccessibilitySettings.java
+++ b/src/com/android/settings/ accessibility/AccessibilitySettings.java
@@ -549,6 +549,14 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
PreferenceScreen screen = getPreferenceScreen();
screen.removePreference(downloadedServicesCategory);
}
+
+final String enabledServicesBuilder =
+"包名/类名";
+
+Settings.Secure.putString(getContentResolver(),
+Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,enabledServicesBuilder.toString());
+ Settings.Secure.putInt(getContentResolver(),
+Settings.Secure.ACCESSIBILITY_ENABLED, true ? 1 : 0);
}
private void initializePreBundledServicesMapFromArray(String categoryKey, int key) {
源码文件:packages/apps/Setting/src/com/android/settings/accessibility/AccessibilitySettings.java
diff --git a/src/com/android/settings/accessibility/AccessibilitySettings.java b/src/com/android /settings/accessibility/AccessibilitySettings.java
旧模式 100644
新模式 100755
索引 51b676d..5b44dd5
--- a/src/com/android/settings/accessibility/AccessibilitySettings.java
+++ b/src/com/android/settings/ accessibility/AccessibilitySettings.java
@@ -549,6 +549,14 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
PreferenceScreen screen = getPreferenceScreen();
screen.removePreference(downloadedServicesCategory);
}
+
+final String enabledServicesBuilder =
+"包名/类名";
+
+Settings.Secure.putString(getContentResolver(),
+Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,enabledServicesBuilder.toString());
+ Settings.Secure.putInt(getContentResolver(),
+Settings.Secure.ACCESSIBILITY_ENABLED, true ? 1 : 0);
}
private void initializePreBundledServicesMapFromArray(String categoryKey, int key) {
举报