diff options
| author | Patrick Dubroy <dubroy@google.com> | 2011-01-13 17:55:37 -0800 |
|---|---|---|
| committer | Patrick Dubroy <dubroy@google.com> | 2011-01-14 14:13:31 -0800 |
| commit | ec84c3a189e4aa70aa6ea8ba712e5a4f260a153b (patch) | |
| tree | be5f82da1bec89ee491154bbc001bc8523e3b531 /core/java/android/appwidget | |
| parent | 2150553dc374204a1cb3033ed3fa65c2f22dd5e7 (diff) | |
| download | frameworks_base-ec84c3a189e4aa70aa6ea8ba712e5a4f260a153b.zip frameworks_base-ec84c3a189e4aa70aa6ea8ba712e5a4f260a153b.tar.gz frameworks_base-ec84c3a189e4aa70aa6ea8ba712e5a4f260a153b.tar.bz2 | |
Allow old view hierarchy to be GC'ed more quickly during rotation.
Diffstat (limited to 'core/java/android/appwidget')
| -rw-r--r-- | core/java/android/appwidget/AppWidgetHost.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java index 7730942..9835484 100644 --- a/core/java/android/appwidget/AppWidgetHost.java +++ b/core/java/android/appwidget/AppWidgetHost.java @@ -214,6 +214,10 @@ public class AppWidgetHost { } } + /** + * Create the AppWidgetHostView for the given widget. + * The AppWidgetHost retains a pointer to the newly-created View. + */ public final AppWidgetHostView createView(Context context, int appWidgetId, AppWidgetProviderInfo appWidget) { AppWidgetHostView view = onCreateView(context, appWidgetId, appWidget); @@ -272,6 +276,13 @@ public class AppWidgetHost { v.viewDataChanged(viewId); } } + + /** + * Clear the list of Views that have been created by this AppWidgetHost. + */ + protected void clearViews() { + mViews.clear(); + } } |
