summaryrefslogtreecommitdiffstats
path: root/core/java/android/appwidget
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2011-01-13 17:55:37 -0800
committerPatrick Dubroy <dubroy@google.com>2011-01-14 14:13:31 -0800
commitec84c3a189e4aa70aa6ea8ba712e5a4f260a153b (patch)
treebe5f82da1bec89ee491154bbc001bc8523e3b531 /core/java/android/appwidget
parent2150553dc374204a1cb3033ed3fa65c2f22dd5e7 (diff)
downloadframeworks_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.java11
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();
+ }
}