From 870e09fcd2dfdc12ac318962efd28b0420c562bb Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 6 Jul 2009 16:35:25 -0700 Subject: [PATCH] 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. --- api/current.xml | 22 +++++++++++++++++++ core/java/android/app/ApplicationContext.java | 7 ++++++ .../android/appwidget/AppWidgetHostView.java | 2 +- core/java/android/content/Context.java | 18 +++++++++++++++ core/java/android/content/ContextWrapper.java | 5 +++++ core/java/android/view/View.java | 5 +++++ core/java/android/widget/RemoteViews.java | 2 +- .../android/test/mock/MockContext.java | 5 +++++ 8 files changed, 64 insertions(+), 2 deletions(-) diff --git a/api/current.xml b/api/current.xml index d028faac656c5..9bce1f376cdf8 100644 --- a/api/current.xml +++ b/api/current.xml @@ -27810,6 +27810,17 @@ + + + +