diff options
author | Adam Cohen <adamcohen@google.com> | 2012-05-01 18:10:28 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2012-05-02 09:32:42 -0700 |
commit | d2097ebacf3a3658624cad10669a4d98e8d7d846 (patch) | |
tree | 26b3c0dbf7e27274800377c3e0a6086da4201416 /services | |
parent | ffc46a5c7c60c911fdaab48681c323c89b570dac (diff) | |
download | frameworks_base-d2097ebacf3a3658624cad10669a4d98e8d7d846.zip frameworks_base-d2097ebacf3a3658624cad10669a4d98e8d7d846.tar.gz frameworks_base-d2097ebacf3a3658624cad10669a4d98e8d7d846.tar.bz2 |
Changing app widget "extras" to "options" and another small API Review issue
-> (issue 6427146), (issue 6427861)
Change-Id: Ib69a9b3717a5b62317ec227936bc3b2fd5954043
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/AppWidgetService.java | 8 | ||||
-rw-r--r-- | services/java/com/android/server/AppWidgetServiceImpl.java | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java index 7e71b08..38f4554 100644 --- a/services/java/com/android/server/AppWidgetService.java +++ b/services/java/com/android/server/AppWidgetService.java @@ -279,13 +279,13 @@ class AppWidgetService extends IAppWidgetService.Stub } @Override - public void updateAppWidgetExtras(int appWidgetId, Bundle extras) { - getImplForUser().updateAppWidgetExtras(appWidgetId, extras); + public void updateAppWidgetOptions(int appWidgetId, Bundle options) { + getImplForUser().updateAppWidgetOptions(appWidgetId, options); } @Override - public Bundle getAppWidgetExtras(int appWidgetId) { - return getImplForUser().getAppWidgetExtras(appWidgetId); + public Bundle getAppWidgetOptions(int appWidgetId) { + return getImplForUser().getAppWidgetOptions(appWidgetId); } static int[] getAppWidgetIds(Provider p) { diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java index a0b8c531..a0c5d21 100644 --- a/services/java/com/android/server/AppWidgetServiceImpl.java +++ b/services/java/com/android/server/AppWidgetServiceImpl.java @@ -112,7 +112,7 @@ class AppWidgetServiceImpl { int appWidgetId; Provider provider; RemoteViews views; - Bundle extras; + Bundle options; Host host; } @@ -820,7 +820,7 @@ class AppWidgetServiceImpl { } } - public void updateAppWidgetExtras(int appWidgetId, Bundle extras) { + public void updateAppWidgetOptions(int appWidgetId, Bundle options) { synchronized (mAppWidgetIds) { ensureStateLoadedLocked(); AppWidgetId id = lookupAppWidgetIdLocked(appWidgetId); @@ -829,23 +829,23 @@ class AppWidgetServiceImpl { return; } Provider p = id.provider; - id.extras = extras; + id.options = options; // send the broacast saying that this appWidgetId has been deleted - Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_EXTRAS_CHANGED); + Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED); intent.setComponent(p.info.provider); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, id.appWidgetId); - intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_EXTRAS, extras); + intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS, options); mContext.sendBroadcast(intent, mUserId); } } - public Bundle getAppWidgetExtras(int appWidgetId) { + public Bundle getAppWidgetOptions(int appWidgetId) { synchronized (mAppWidgetIds) { ensureStateLoadedLocked(); AppWidgetId id = lookupAppWidgetIdLocked(appWidgetId); - if (id != null && id.extras != null) { - return id.extras; + if (id != null && id.options != null) { + return id.options; } else { return Bundle.EMPTY; } |