Loading services/java/com/android/server/accessibility/AccessibilityManagerService.java +42 −21 Original line number Diff line number Diff line Loading @@ -191,10 +191,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { @Override public void onSomePackagesChanged() { synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { populateAccessibilityServiceListLocked(); manageServicesLocked(); } } } @Override public void onPackageRemoved(String packageName, int uid) { Loading Loading @@ -242,12 +245,15 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public void onReceive(Context context, Intent intent) { if (intent.getAction() == Intent.ACTION_BOOT_COMPLETED) { synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { populateAccessibilityServiceListLocked(); handleAccessibilityEnabledSettingChangedLocked(); handleTouchExplorationEnabledSettingChangedLocked(); updateInputFilterLocked(); sendStateToClientsLocked(); } } return; } Loading Loading @@ -294,11 +300,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public void onChange(boolean selfChange) { super.onChange(selfChange); synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { handleAccessibilityEnabledSettingChangedLocked(); updateInputFilterLocked(); sendStateToClientsLocked(); } } } }); Uri touchExplorationRequestedUri = Settings.Secure.getUriFor( Loading @@ -309,11 +318,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public void onChange(boolean selfChange) { super.onChange(selfChange); synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { handleTouchExplorationEnabledSettingChangedLocked(); updateInputFilterLocked(); sendStateToClientsLocked(); } } } }); Uri accessibilityServicesUri = Loading @@ -324,9 +336,12 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public void onChange(boolean selfChange) { super.onChange(selfChange); synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { manageServicesLocked(); } } } }); } Loading Loading @@ -747,10 +762,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { * Manages services by starting enabled ones and stopping disabled ones. */ private void manageServicesLocked() { // While the UI automation service is running it takes over. if (mUiAutomationService != null) { return; } populateEnabledServicesLocked(mEnabledServices); final int enabledInstalledServicesCount = updateServicesStateLocked(mInstalledServices, mEnabledServices); Loading Loading @@ -926,8 +937,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { private void tryEnableTouchExploration(final Service service) { if (!mIsTouchExplorationEnabled && service.mRequestTouchExplorationMode) { if (!service.mIsAutomation) { mMainHandler.obtainMessage(MSG_SHOW_ENABLE_TOUCH_EXPLORATION_DIALOG, service).sendToTarget(); } else { Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.TOUCH_EXPLORATION_ENABLED, 1); } } } Loading Loading @@ -1479,10 +1495,15 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // the state based on values in the settings database. if (mIsAutomation) { mUiAutomationService = null; handleAccessibilityEnabledSettingChangedLocked(); sendStateToClientsLocked(); handleTouchExplorationEnabledSettingChangedLocked(); updateInputFilterLocked(); sendStateToClientsLocked(); populateAccessibilityServiceListLocked(); manageServicesLocked(); } } } Loading Loading
services/java/com/android/server/accessibility/AccessibilityManagerService.java +42 −21 Original line number Diff line number Diff line Loading @@ -191,10 +191,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { @Override public void onSomePackagesChanged() { synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { populateAccessibilityServiceListLocked(); manageServicesLocked(); } } } @Override public void onPackageRemoved(String packageName, int uid) { Loading Loading @@ -242,12 +245,15 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public void onReceive(Context context, Intent intent) { if (intent.getAction() == Intent.ACTION_BOOT_COMPLETED) { synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { populateAccessibilityServiceListLocked(); handleAccessibilityEnabledSettingChangedLocked(); handleTouchExplorationEnabledSettingChangedLocked(); updateInputFilterLocked(); sendStateToClientsLocked(); } } return; } Loading Loading @@ -294,11 +300,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public void onChange(boolean selfChange) { super.onChange(selfChange); synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { handleAccessibilityEnabledSettingChangedLocked(); updateInputFilterLocked(); sendStateToClientsLocked(); } } } }); Uri touchExplorationRequestedUri = Settings.Secure.getUriFor( Loading @@ -309,11 +318,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public void onChange(boolean selfChange) { super.onChange(selfChange); synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { handleTouchExplorationEnabledSettingChangedLocked(); updateInputFilterLocked(); sendStateToClientsLocked(); } } } }); Uri accessibilityServicesUri = Loading @@ -324,9 +336,12 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { public void onChange(boolean selfChange) { super.onChange(selfChange); synchronized (mLock) { // We will update when the automation service dies. if (mUiAutomationService == null) { manageServicesLocked(); } } } }); } Loading Loading @@ -747,10 +762,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { * Manages services by starting enabled ones and stopping disabled ones. */ private void manageServicesLocked() { // While the UI automation service is running it takes over. if (mUiAutomationService != null) { return; } populateEnabledServicesLocked(mEnabledServices); final int enabledInstalledServicesCount = updateServicesStateLocked(mInstalledServices, mEnabledServices); Loading Loading @@ -926,8 +937,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { private void tryEnableTouchExploration(final Service service) { if (!mIsTouchExplorationEnabled && service.mRequestTouchExplorationMode) { if (!service.mIsAutomation) { mMainHandler.obtainMessage(MSG_SHOW_ENABLE_TOUCH_EXPLORATION_DIALOG, service).sendToTarget(); } else { Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.TOUCH_EXPLORATION_ENABLED, 1); } } } Loading Loading @@ -1479,10 +1495,15 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // the state based on values in the settings database. if (mIsAutomation) { mUiAutomationService = null; handleAccessibilityEnabledSettingChangedLocked(); sendStateToClientsLocked(); handleTouchExplorationEnabledSettingChangedLocked(); updateInputFilterLocked(); sendStateToClientsLocked(); populateAccessibilityServiceListLocked(); manageServicesLocked(); } } } Loading