summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/accessibility/AccessibilityManagerService.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2013-04-18 09:35:43 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2013-04-18 09:47:48 -0700
commit0ecfa017decd230051d5e42d9f49129afd58838b (patch)
tree61cb1e8708c5cd03fe5ccec07a578b69729b5f06 /services/java/com/android/server/accessibility/AccessibilityManagerService.java
parent869d273503adbccfae3bac7425649f2e1d2aefad (diff)
downloadframeworks_base-0ecfa017decd230051d5e42d9f49129afd58838b.zip
frameworks_base-0ecfa017decd230051d5e42d9f49129afd58838b.tar.gz
frameworks_base-0ecfa017decd230051d5e42d9f49129afd58838b.tar.bz2
Reload accessibility service infos for reisntalled packages.
When something that affects the state of accessibility in the sysytem changes, we run a reolve method that reloads all relevant information and if it changed we call a method that makes everyting right. One of the interesting properties we read is the isntalled accessibliity services. We are using equals to figure out whether these services have changed but this is not correct since AccessibilityServiceInfo does not use all internal members for equals and using all memthis is not reasible since some of these internal members do not support equals propertly, for example ResolveInfo. Therefore, when a package is reinstalled we remove all installed services from the list of ones we know about which forces them to be reloaded, thus capturing the current state of a reinstalled package. bug:8621960 Change-Id: Ie1ef4bf1036d8d6e033cd9528ea2292ce24e5320
Diffstat (limited to 'services/java/com/android/server/accessibility/AccessibilityManagerService.java')
-rw-r--r--services/java/com/android/server/accessibility/AccessibilityManagerService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
index 110c4da..a7a77ce 100644
--- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -237,6 +237,11 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
}
// We will update when the automation service dies.
UserState userState = getCurrentUserStateLocked();
+ // We have to reload the installed services since some services may
+ // have different attributes, resolve info (does not support equals),
+ // etc. Remove them then to force reload. Do it even if automation is
+ // running since when it goes away, we will have to reload as well.
+ userState.mInstalledServices.clear();
if (userState.mUiAutomationService == null) {
if (readConfigurationForUserStateLocked(userState)) {
onUserStateChangedLocked(userState);