diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-08-29 18:32:08 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-08-30 14:33:22 -0700 |
commit | 5ac72a29593ab9a20337a2225df52bdf4754be02 (patch) | |
tree | dc5310e556b3662cb5f097b30e700a26d50a4db5 /test-runner/src/android | |
parent | e217ee4d7a8223289a1af7363627c69956c46d41 (diff) | |
download | frameworks_base-5ac72a29593ab9a20337a2225df52bdf4754be02.zip frameworks_base-5ac72a29593ab9a20337a2225df52bdf4754be02.tar.gz frameworks_base-5ac72a29593ab9a20337a2225df52bdf4754be02.tar.bz2 |
Improve multi-user broadcasts.
You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.
Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.
New Context APIs for more kinds of sending broadcasts as users.
Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.
Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.
Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
Diffstat (limited to 'test-runner/src/android')
-rw-r--r-- | test-runner/src/android/test/mock/MockContext.java | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/test-runner/src/android/test/mock/MockContext.java b/test-runner/src/android/test/mock/MockContext.java index 6047cda..eb1f2d6 100644 --- a/test-runner/src/android/test/mock/MockContext.java +++ b/test-runner/src/android/test/mock/MockContext.java @@ -311,8 +311,14 @@ public class MockContext extends Context { } @Override + public void sendBroadcastAsUser(Intent intent, UserHandle user, + String receiverPermission) { + throw new UnsupportedOperationException(); + } + + @Override public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user, - BroadcastReceiver resultReceiver, Handler scheduler, + String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, Bundle initialExtras) { throw new UnsupportedOperationException(); } @@ -335,6 +341,24 @@ public class MockContext extends Context { } @Override + public void sendStickyBroadcastAsUser(Intent intent, UserHandle user) { + throw new UnsupportedOperationException(); + } + + @Override + public void sendStickyOrderedBroadcastAsUser(Intent intent, + UserHandle user, BroadcastReceiver resultReceiver, + Handler scheduler, int initialCode, String initialData, + Bundle initialExtras) { + throw new UnsupportedOperationException(); + } + + @Override + public void removeStickyBroadcastAsUser(Intent intent, UserHandle user) { + throw new UnsupportedOperationException(); + } + + @Override public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { throw new UnsupportedOperationException(); } |