summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/SystemUIService.java
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 /packages/SystemUI/src/com/android/systemui/SystemUIService.java
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 'packages/SystemUI/src/com/android/systemui/SystemUIService.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/SystemUIService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIService.java b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
index 1bde949..427fe91 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIService.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
@@ -32,6 +32,7 @@ import android.os.ServiceManager;
import android.util.Slog;
import android.view.IWindowManager;
import android.view.WindowManagerGlobal;
+import android.view.accessibility.AccessibilityManager;
public class SystemUIService extends Service {
static final String TAG = "SystemUIService";
@@ -67,6 +68,10 @@ public class SystemUIService extends Service {
@Override
public void onCreate() {
+ // Tell the accessibility layer that this process will
+ // run as the current user, i.e. run across users.
+ AccessibilityManager.createAsSharedAcrossUsers(this);
+
// Pick status bar or system bar.
IWindowManager wm = WindowManagerGlobal.getWindowManagerService();
try {