Changing app widget "extras" to "options" and another small API Review issue

-> (issue 6427146), (issue 6427861)

Change-Id: Ib69a9b3717a5b62317ec227936bc3b2fd5954043
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 @@
         int appWidgetId;
         Provider provider;
         RemoteViews views;
-        Bundle extras;
+        Bundle options;
         Host host;
     }
 
@@ -820,7 +820,7 @@
         }
     }
 
-    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 @@
                 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;
             }