summaryrefslogtreecommitdiffstats
path: root/test-runner
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2012-09-20 16:06:08 -0700
committerJeff Sharkey <jsharkey@android.com>2012-09-21 19:49:43 -0700
commit6d51571835737c7502a2e111ee9dc2527ebad984 (patch)
tree8298f3a36bdfbdb95a4fdd52681f82e7f396d31b /test-runner
parent08681adda06f4699f85838861170fbb062c9fdfe (diff)
downloadframeworks_base-6d51571835737c7502a2e111ee9dc2527ebad984.zip
frameworks_base-6d51571835737c7502a2e111ee9dc2527ebad984.tar.gz
frameworks_base-6d51571835737c7502a2e111ee9dc2527ebad984.tar.bz2
Allow acquiring ContentProviders across users.
Otherwise services like SystemUI will always open content://-style Uris as USER_OWNER. Surfaces through createPackageContextAsUser() which points all ContentResolver operations towards a given user. Start using in RemoteViews, so that Notifications correctly resolve image Uris to the sending user. Also add user support for "content" shell tool. Bug: 7202982 Change-Id: I8cb7fb8a812e825bb0b5833799dba87055ff8699
Diffstat (limited to 'test-runner')
-rw-r--r--test-runner/src/android/test/mock/MockContext.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/test-runner/src/android/test/mock/MockContext.java b/test-runner/src/android/test/mock/MockContext.java
index 5c9282e..1f815e7 100644
--- a/test-runner/src/android/test/mock/MockContext.java
+++ b/test-runner/src/android/test/mock/MockContext.java
@@ -523,6 +523,13 @@ public class MockContext extends Context {
throw new UnsupportedOperationException();
}
+ /** {@hide} */
+ @Override
+ public Context createPackageContextAsUser(String packageName, int flags, UserHandle user)
+ throws PackageManager.NameNotFoundException {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public Context createConfigurationContext(Configuration overrideConfiguration) {
throw new UnsupportedOperationException();