diff options
author | Winson Chung <winsonc@google.com> | 2010-08-16 10:14:56 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2010-08-17 14:25:06 -0700 |
commit | 6394c0e52cf641d93f678fd052499aa952e3595d (patch) | |
tree | 94131f4b7bf90e48a741767f5d70036786209bb1 /services | |
parent | 385df2c7a5315fd114fd133b33e31f320987ad43 (diff) | |
download | frameworks_base-6394c0e52cf641d93f678fd052499aa952e3595d.zip frameworks_base-6394c0e52cf641d93f678fd052499aa952e3595d.tar.gz frameworks_base-6394c0e52cf641d93f678fd052499aa952e3595d.tar.bz2 |
Adding callback and fix to RemoteViewsFactory on notifyDataSetChanged.
Also removing extra parameter in AppWidgetManager.notifyDataSetChanged.
Change-Id: Ic771fe045ae793a6dacf09f1230e7c1c4b59a13e
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/AppWidgetService.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java index b8b8880..f825df9 100644 --- a/services/java/com/android/server/AppWidgetService.java +++ b/services/java/com/android/server/AppWidgetService.java @@ -442,7 +442,7 @@ class AppWidgetService extends IAppWidgetService.Stub } } - public void notifyAppWidgetViewDataChanged(int[] appWidgetIds, RemoteViews views, int viewId) { + public void notifyAppWidgetViewDataChanged(int[] appWidgetIds, int viewId) { if (appWidgetIds == null) { return; } @@ -454,7 +454,7 @@ class AppWidgetService extends IAppWidgetService.Stub synchronized (mAppWidgetIds) { for (int i=0; i<N; i++) { AppWidgetId id = lookupAppWidgetIdLocked(appWidgetIds[i]); - notifyAppWidgetViewDataChangedInstanceLocked(id, views, viewId); + notifyAppWidgetViewDataChangedInstanceLocked(id, viewId); } } } @@ -502,18 +502,16 @@ class AppWidgetService extends IAppWidgetService.Stub } } - void notifyAppWidgetViewDataChangedInstanceLocked(AppWidgetId id, RemoteViews views, int viewId) { + void notifyAppWidgetViewDataChangedInstanceLocked(AppWidgetId id, int viewId) { // allow for stale appWidgetIds and other badness // lookup also checks that the calling process can access the appWidgetId // drop unbound appWidgetIds (shouldn't be possible under normal circumstances) if (id != null && id.provider != null && !id.provider.zombie && !id.host.zombie) { - id.views = views; - // is anyone listening? if (id.host.callbacks != null) { try { // the lock is held, but this is a oneway call - id.host.callbacks.viewDataChanged(id.appWidgetId, views, viewId); + id.host.callbacks.viewDataChanged(id.appWidgetId, viewId); } catch (RemoteException e) { // It failed; remove the callback. No need to prune because // we know that this host is still referenced by this instance. |