diff options
author | Jim Miller <jaggies@google.com> | 2013-02-07 16:53:32 -0800 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2013-02-20 15:41:14 -0800 |
commit | a75a883fe9ea1790803148f0a561473073e3f264 (patch) | |
tree | a76a69d684a9643db3e22b72155aeb849c85a7f5 /test-runner | |
parent | 7a60c43d874bd047ea4b93b94c9b8771ea5739cc (diff) | |
download | frameworks_base-a75a883fe9ea1790803148f0a561473073e3f264.zip frameworks_base-a75a883fe9ea1790803148f0a561473073e3f264.tar.gz frameworks_base-a75a883fe9ea1790803148f0a561473073e3f264.tar.bz2 |
Add explicit userId to AppWidget binder calls
Keyguard currently relies on being in the system process to grab the
given user's widgets. When we split keyguard into a new process,
it will need to have access to user-specific info to instantiate a
specific user's widgets. In order to accomplish this, we add an
explicit userid to each binder call as well as new permission
check to allow keyguard access.
This also fixes a potential race condition of having an incorrect user id
due to an async call to change the user. Every binder call now has a specific
user id. The user id is either the calling process user's id or an explicit
one passed by applications like keyguard. It is created once when an
AppWidgetManager is instantiated and remains for the lifetime of the object.
Fixed bug where widgets sometimes didn't show up for secondary users.
Moved permission check in AppWidgetService into getImplForUser()
Refactored to use userid from context associated AppWidgetManager instance.
Clean up AppWidgetHost to use userId from Context.
Remove redundant userId check in checkPermission since it's handled by
ActivityManager.handleIncomingUser()
Removed redundant userid check.
Upload after rebase...
Change-Id: Iae3e20f2b342c323bb58768b3d22051510f8268b
Diffstat (limited to 'test-runner')
-rw-r--r-- | test-runner/src/android/test/mock/MockContext.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test-runner/src/android/test/mock/MockContext.java b/test-runner/src/android/test/mock/MockContext.java index cfc6bd7..29d6e4d 100644 --- a/test-runner/src/android/test/mock/MockContext.java +++ b/test-runner/src/android/test/mock/MockContext.java @@ -551,6 +551,12 @@ public class MockContext extends Context { throw new UnsupportedOperationException(); } + /** {@hide} */ + @Override + public int getUserId() { + throw new UnsupportedOperationException(); + } + @Override public Context createConfigurationContext(Configuration overrideConfiguration) { throw new UnsupportedOperationException(); |