summaryrefslogtreecommitdiffstats
path: root/test-runner
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2012-09-18 12:04:19 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2012-09-21 16:48:07 -0700
commit58d37b55bd228032355360ea3303e46a804e0516 (patch)
tree7a931f0e6054ef5835f2935dd8d2faa52a93ff53 /test-runner
parent059aedf808c8b9b3da1457eef52f3d477878d50b (diff)
downloadframeworks_base-58d37b55bd228032355360ea3303e46a804e0516.zip
frameworks_base-58d37b55bd228032355360ea3303e46a804e0516.tar.gz
frameworks_base-58d37b55bd228032355360ea3303e46a804e0516.tar.bz2
Multi-user support for the accessibility layer.
1. This change converts the accessibility manager service to maintain a state per user. When the user changes the services for the user that is going away are disconnected, the local accessibility managers in the processes for this user are disabled, the state is swapped with the new user's one, and the new user state is refreshed. This change updates all calls into the system to use their user specific versions when applicable. For example, regisetring content observers, package monitors, calls into other system services, etc. There are some components that are shared across users such as UI created by the system process and the SystemUI package. Such components are managed as a global state shared across all users and are updated accordingly on a user switch. Since the SystemUI is running in a normal app process this change adds hidden APIs on the local window manager to allow the SystemUI to notify the accessibility layer that it will run accross users. Calls to AccessibiltyManager's isEnabled(), isTouchExplorationEnabled() and sendAccessibilityEvent return false or a are a nop for a background user sice he should not send accessibility events, and should not perform touch exploration. Update the internal accessibility tests due to changes in the AccessibilityManager. This change also fixes several issues that were encountered such as calling out the accessibility manager service with a lock held. Removed some incorrect debugging code from the TouchExplorer that was leading to a system crash. bug:6967373 Change-Id: I2cf32ffdee1d827a8197ae4ce717dc0ff798b259
Diffstat (limited to 'test-runner')
-rw-r--r--test-runner/src/android/test/mock/MockPackageManager.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/test-runner/src/android/test/mock/MockPackageManager.java b/test-runner/src/android/test/mock/MockPackageManager.java
index cd7ee76..7b7a7b3 100644
--- a/test-runner/src/android/test/mock/MockPackageManager.java
+++ b/test-runner/src/android/test/mock/MockPackageManager.java
@@ -38,10 +38,8 @@ import android.content.pm.PermissionInfo;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
-import android.content.pm.UserInfo;
import android.content.pm.VerificationParams;
import android.content.pm.VerifierDeviceIdentity;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
@@ -216,6 +214,12 @@ public class MockPackageManager extends PackageManager {
throw new UnsupportedOperationException();
}
+ /** @hide */
+ @Override
+ public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) {
throw new UnsupportedOperationException();
@@ -223,7 +227,7 @@ public class MockPackageManager extends PackageManager {
/** @hide */
@Override
- public List<ResolveInfo> queryIntentActivitiesForUser(Intent intent,
+ public List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent,
int flags, int userId) {
throw new UnsupportedOperationException();
}
@@ -255,6 +259,12 @@ public class MockPackageManager extends PackageManager {
throw new UnsupportedOperationException();
}
+ /** @hide */
+ @Override
+ public List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int flags, int userId) {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public ProviderInfo resolveContentProvider(String name, int flags) {
throw new UnsupportedOperationException();