OSDN Git Service

Regression in screen introspection APIs due to the multi-user change.
authorSvetoslav Ganov <svetoslavganov@google.com>
Tue, 25 Sep 2012 20:03:18 +0000 (13:03 -0700)
committerSvetoslav Ganov <svetoslavganov@google.com>
Tue, 25 Sep 2012 20:59:37 +0000 (13:59 -0700)
commita8afa694d6881266ad762aacdac92b2047f9a86c
treefb6a052539cfc763eecbb6060b003d60bd622363
parent1ab8a08a9b85aa62045a6a78fd93859382c88b0f
Regression in screen introspection APIs due to the multi-user change.

1. The initial user was set to USER_NULL but some clients were registering
   before the user change callback happens. Since the initial user is
   the owner the current user id defaults to USER_OWNER.

2. The check for global clients and window connections was using the
   calling UID but there are processes that run in a per user basis
   as system UID (Setting for example). Now the check is stronger
   and comparing the caller PID with that of the system process.

3. The code for finding the focused window id was not checking the
   global window token list in addition to that of the current user.

4. The code updating the active window id was calling out into the
   window manager with a lock held.

bug:7224670

Change-Id: I9f4b7ea67eb5598b30ee7d1b68a1d3ce0cf8cfb4
services/java/com/android/server/accessibility/AccessibilityManagerService.java