diff options
| author | Svet Ganov <svetoslavganov@google.com> | 2014-08-25 18:26:48 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-25 18:26:48 +0000 |
| commit | 8907a0eebe21f8c736de0c4282a55456fa880d8b (patch) | |
| tree | 5381e8a9f4cd1155bd5d459b368ef87a495f58ef /core/java/android | |
| parent | af9bf968ce2f688734565509ca124d480866b53f (diff) | |
| parent | c14c828fcd7152c545bbf1ebcc287066bb4b6ae7 (diff) | |
| download | frameworks_base-8907a0eebe21f8c736de0c4282a55456fa880d8b.zip frameworks_base-8907a0eebe21f8c736de0c4282a55456fa880d8b.tar.gz frameworks_base-8907a0eebe21f8c736de0c4282a55456fa880d8b.tar.bz2 | |
am 3de47446: am 43e9ef49: am bd394c7a: Merge "RemoteViews service not unbound." into lmp-dev
* commit '3de4744625297a0d67267725d84518685d67efd4':
RemoteViews service not unbound.
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/appwidget/AppWidgetHost.java | 17 | ||||
| -rw-r--r-- | core/java/android/appwidget/AppWidgetManager.java | 2 | ||||
| -rw-r--r-- | core/java/android/widget/RemoteViewsAdapter.java | 2 |
3 files changed, 10 insertions, 11 deletions
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java index 69716e5..24c6793 100644 --- a/core/java/android/appwidget/AppWidgetHost.java +++ b/core/java/android/appwidget/AppWidgetHost.java @@ -24,7 +24,6 @@ import android.annotation.Nullable; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Context; -import android.content.Intent; import android.content.IntentSender; import android.os.Binder; import android.os.Bundle; @@ -155,7 +154,7 @@ public class AppWidgetHost { int[] updatedIds; ArrayList<RemoteViews> updatedViews = new ArrayList<RemoteViews>(); try { - updatedIds = sService.startListening(mCallbacks, mContext.getPackageName(), mHostId, + updatedIds = sService.startListening(mCallbacks, mContext.getOpPackageName(), mHostId, updatedViews); } catch (RemoteException e) { @@ -174,7 +173,7 @@ public class AppWidgetHost { */ public void stopListening() { try { - sService.stopListening(mContext.getPackageName(), mHostId); + sService.stopListening(mContext.getOpPackageName(), mHostId); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); @@ -192,7 +191,7 @@ public class AppWidgetHost { */ public int allocateAppWidgetId() { try { - return sService.allocateAppWidgetId(mContext.getPackageName(), mHostId); + return sService.allocateAppWidgetId(mContext.getOpPackageName(), mHostId); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); @@ -222,7 +221,7 @@ public class AppWidgetHost { int appWidgetId, int intentFlags, int requestCode, @Nullable Bundle options) { try { IntentSender intentSender = sService.createAppWidgetConfigIntentSender( - mContext.getPackageName(), appWidgetId, intentFlags); + mContext.getOpPackageName(), appWidgetId, intentFlags); if (intentSender != null) { activity.startIntentSenderForResult(intentSender, requestCode, null, 0, 0, 0, options); @@ -246,7 +245,7 @@ public class AppWidgetHost { if (sService == null) { bindService(); } - return sService.getAppWidgetIdsForHost(mContext.getPackageName(), mHostId); + return sService.getAppWidgetIdsForHost(mContext.getOpPackageName(), mHostId); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); } @@ -263,7 +262,7 @@ public class AppWidgetHost { synchronized (mViews) { mViews.remove(appWidgetId); try { - sService.deleteAppWidgetId(mContext.getPackageName(), appWidgetId); + sService.deleteAppWidgetId(mContext.getOpPackageName(), appWidgetId); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); @@ -281,7 +280,7 @@ public class AppWidgetHost { */ public void deleteHost() { try { - sService.deleteHost(mContext.getPackageName(), mHostId); + sService.deleteHost(mContext.getOpPackageName(), mHostId); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); @@ -319,7 +318,7 @@ public class AppWidgetHost { } RemoteViews views; try { - views = sService.getAppWidgetViews(mContext.getPackageName(), appWidgetId); + views = sService.getAppWidgetViews(mContext.getOpPackageName(), appWidgetId); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); } diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java index 086eb7d..bd45c7e 100644 --- a/core/java/android/appwidget/AppWidgetManager.java +++ b/core/java/android/appwidget/AppWidgetManager.java @@ -441,7 +441,7 @@ public class AppWidgetManager { * @hide */ public AppWidgetManager(Context context, IAppWidgetService service) { - mPackageName = context.getPackageName(); + mPackageName = context.getOpPackageName(); mService = service; mDisplayMetrics = context.getResources().getDisplayMetrics(); } diff --git a/core/java/android/widget/RemoteViewsAdapter.java b/core/java/android/widget/RemoteViewsAdapter.java index 5d21e0b..602f955 100644 --- a/core/java/android/widget/RemoteViewsAdapter.java +++ b/core/java/android/widget/RemoteViewsAdapter.java @@ -157,7 +157,7 @@ public class RemoteViewsAdapter extends BaseAdapter implements Handler.Callback RemoteViewsAdapter adapter; final AppWidgetManager mgr = AppWidgetManager.getInstance(context); if ((adapter = mAdapter.get()) != null) { - mgr.bindRemoteViewsService(context.getPackageName(), appWidgetId, + mgr.bindRemoteViewsService(context.getOpPackageName(), appWidgetId, intent, asBinder()); } else { Slog.w(TAG, "bind: adapter was null"); |
