From 870e09fcd2dfdc12ac318962efd28b0420c562bb Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 6 Jul 2009 16:35:25 -0700 Subject: 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. --- test-runner/android/test/mock/MockContext.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test-runner') 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(); + } } -- cgit v1.1