diff options
author | Winson Chung <winsonc@google.com> | 2010-09-28 17:36:42 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2010-09-28 17:38:13 -0700 |
commit | f58a96152cecb480decf8c0352b01322663e5cbc (patch) | |
tree | 430440bf8acc703503a514b262595eba948190ac /core | |
parent | b974d0c8f21000354bec04dea9cc6c938cdccccd (diff) | |
download | frameworks_base-f58a96152cecb480decf8c0352b01322663e5cbc.zip frameworks_base-f58a96152cecb480decf8c0352b01322663e5cbc.tar.gz frameworks_base-f58a96152cecb480decf8c0352b01322663e5cbc.tar.bz2 |
Making the calls to the RemoteViewsFactory synchronized to prevent threading issues.
Change-Id: I6efcfb070a9a6cb0467a87a801dfe46c358710f7
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/RemoteViewsService.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/widget/RemoteViewsService.java b/core/java/android/widget/RemoteViewsService.java index b9ded190..16126aa 100644 --- a/core/java/android/widget/RemoteViewsService.java +++ b/core/java/android/widget/RemoteViewsService.java @@ -82,27 +82,27 @@ public abstract class RemoteViewsService extends Service { public RemoteViewsFactoryAdapter(RemoteViewsFactory factory) { mFactory = factory; } - public void onDataSetChanged() { + public synchronized void onDataSetChanged() { mFactory.onDataSetChanged(); } - public int getCount() { + public synchronized int getCount() { return mFactory.getCount(); } - public RemoteViews getViewAt(int position) { + public synchronized RemoteViews getViewAt(int position) { RemoteViews rv = mFactory.getViewAt(position); rv.setIsWidgetCollectionChild(true); return rv; } - public RemoteViews getLoadingView() { + public synchronized RemoteViews getLoadingView() { return mFactory.getLoadingView(); } - public int getViewTypeCount() { + public synchronized int getViewTypeCount() { return mFactory.getViewTypeCount(); } - public long getItemId(int position) { + public synchronized long getItemId(int position) { return mFactory.getItemId(position); } - public boolean hasStableIds() { + public synchronized boolean hasStableIds() { return mFactory.hasStableIds(); } |