diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-07-16 15:12:03 -0700 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-08-06 11:01:36 +0100 |
commit | 39999cf0263d0568337a87d0e586dcafd9e22ba1 (patch) | |
tree | 1e38f5f5a2d899db203ea4375d11bbb4369fad36 /test-runner/src/android/test/mock/MockContext.java | |
parent | 8a0ee34c7047b0b3c0869b0c173a210b40fd3050 (diff) | |
download | frameworks_base-39999cf0263d0568337a87d0e586dcafd9e22ba1.zip frameworks_base-39999cf0263d0568337a87d0e586dcafd9e22ba1.tar.gz frameworks_base-39999cf0263d0568337a87d0e586dcafd9e22ba1.tar.bz2 |
Allow adding widgets from user profiles.
The goal of this change is to enable support for appwidget from
user profiles to the user main profile. A user profile is a user
which is associated as a child of the main user profile. For example,
a user may have a personal (parent) and corporate (child) profile.
The device policy should be able to control whether adding a widget
from a child profile and given packages is allowed. This change
assumes that all packages from managed profiles are white listed.
Another change will add the device policy changes.
(cherrypicked 8cd27c3c to work around Gerrit issue)
Change-Id: I267260b55d74c48b112a29979a9f59eef7a8194e
Diffstat (limited to 'test-runner/src/android/test/mock/MockContext.java')
-rw-r--r-- | test-runner/src/android/test/mock/MockContext.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test-runner/src/android/test/mock/MockContext.java b/test-runner/src/android/test/mock/MockContext.java index 8a2732d..46c81b6 100644 --- a/test-runner/src/android/test/mock/MockContext.java +++ b/test-runner/src/android/test/mock/MockContext.java @@ -572,6 +572,13 @@ public class MockContext extends Context { /** {@hide} */ @Override + public Context createApplicationContext(ApplicationInfo application, int flags) + throws PackageManager.NameNotFoundException { + return null; + } + + /** {@hide} */ + @Override public Context createPackageContextAsUser(String packageName, int flags, UserHandle user) throws PackageManager.NameNotFoundException { throw new UnsupportedOperationException(); @@ -595,7 +602,7 @@ public class MockContext extends Context { @Override public boolean isRestricted() { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException(); } /** @hide */ |