diff options
author | Romain Guy <romainguy@android.com> | 2009-07-06 16:35:25 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2009-07-06 16:45:17 -0700 |
commit | 870e09fcd2dfdc12ac318962efd28b0420c562bb (patch) | |
tree | e96f3395c7176695e7007b21ec054c1e3d5a5e71 /test-runner | |
parent | 453dd50e707aa3a4d24240935f3ff7ea0a08dc7a (diff) | |
download | frameworks_base-870e09fcd2dfdc12ac318962efd28b0420c562bb.zip frameworks_base-870e09fcd2dfdc12ac318962efd28b0420c562bb.tar.gz frameworks_base-870e09fcd2dfdc12ac318962efd28b0420c562bb.tar.bz2 |
Fixes #1963229. Introduces Context#isRestricted().
A restricted Context is a special type of Context that prevents specific features
from being used. For instance, android:onClick, used by View, can be dangerous when
used from within apps widgets. By using a restricted Context to inflate apps widgets,
widgets providers are prevented from using android:onClick.
Diffstat (limited to 'test-runner')
-rw-r--r-- | test-runner/android/test/mock/MockContext.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test-runner/android/test/mock/MockContext.java b/test-runner/android/test/mock/MockContext.java index efc4880..b83a44d 100644 --- a/test-runner/android/test/mock/MockContext.java +++ b/test-runner/android/test/mock/MockContext.java @@ -397,4 +397,9 @@ public class MockContext extends Context { throws PackageManager.NameNotFoundException { throw new UnsupportedOperationException(); } + + @Override + public boolean isRestricted() { + throw new UnsupportedOperationException(); + } } |