diff options
| author | Winson Chung <winsonc@google.com> | 2010-07-16 11:18:17 -0700 |
|---|---|---|
| committer | Winson Chung <winsonc@google.com> | 2010-07-19 14:48:31 -0700 |
| commit | 499cb9f516062b654952d282f211bee44c31a3c2 (patch) | |
| tree | 3c9bac8b31275e886bfbd07805c38839c185eab2 /core/java/android/appwidget/AppWidgetManager.java | |
| parent | b5b37f3bcc3065959c27e588f065dfb33a061e1d (diff) | |
Initial changes to allow collections in widgets.
Change-Id: I3cfa899bae88cd252912cecebc12e93c27a3b7c9
Diffstat (limited to 'core/java/android/appwidget/AppWidgetManager.java')
| -rw-r--r-- | core/java/android/appwidget/AppWidgetManager.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java index 3f12bf95d98c..5ee721f6f7a4 100644 --- a/core/java/android/appwidget/AppWidgetManager.java +++ b/core/java/android/appwidget/AppWidgetManager.java @@ -288,6 +288,35 @@ public class AppWidgetManager { } /** + * Notifies the specified collection view in all the specified AppWidget instances + * to invalidate their currently data. + * + * @param appWidgetIds The AppWidget instances for which to notify of view data changes. + * @param views The RemoteViews which contains the view referenced at viewId. + * @param viewId The collection view id. + */ + public void notifyAppWidgetViewDataChanged(int[] appWidgetIds, RemoteViews views, int viewId) { + try { + sService.notifyAppWidgetViewDataChanged(appWidgetIds, views, viewId); + } + catch (RemoteException e) { + throw new RuntimeException("system server dead?", e); + } + } + + /** + * Notifies the specified collection view in all the specified AppWidget instance + * to invalidate it's currently data. + * + * @param appWidgetId The AppWidget instance for which to notify of view data changes. + * @param views The RemoteViews which contains the view referenced at viewId. + * @param viewId The collection view id. + */ + public void notifyAppWidgetViewDataChanged(int appWidgetId, RemoteViews views, int viewId) { + notifyAppWidgetViewDataChanged(new int[] { appWidgetId }, views, viewId); + } + + /** * Return a list of the AppWidget providers that are currently installed. */ public List<AppWidgetProviderInfo> getInstalledProviders() { |
