diff --git a/api/current.xml b/api/current.xml
index dc4ba2c9bc5da..8f07408f9e9ce 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -7555,6 +7555,17 @@
visibility="public"
>
+
+
This field corresponds to the android:previewImage attribute in
+ * the <receiver> element in the AndroidManifest.xml file.
+ *
+ * @hide Pending API approval
+ */
+ public int previewImage;
public AppWidgetProviderInfo() {
}
@@ -130,6 +141,7 @@ public class AppWidgetProviderInfo implements Parcelable {
}
this.label = in.readString();
this.icon = in.readInt();
+ this.previewImage = in.readInt();
}
@@ -152,6 +164,7 @@ public class AppWidgetProviderInfo implements Parcelable {
}
out.writeString(this.label);
out.writeInt(this.icon);
+ out.writeInt(this.previewImage);
}
public int describeContents() {
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 3d31c2785d16e..7470eca5fb56e 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -3585,6 +3585,9 @@
+
+
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 3d2db3919553e..e98c8afc95468 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1299,6 +1299,7 @@
+
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java
index 3ed6c12371ed0..16742215938ab 100644
--- a/services/java/com/android/server/AppWidgetService.java
+++ b/services/java/com/android/server/AppWidgetService.java
@@ -741,6 +741,9 @@ class AppWidgetService extends IAppWidgetService.Stub
}
info.label = activityInfo.loadLabel(mPackageManager).toString();
info.icon = ri.getIconResource();
+ info.previewImage = sa.getResourceId(
+ com.android.internal.R.styleable.AppWidgetProviderInfo_previewImage, 0);
+
sa.recycle();
} catch (Exception e) {
// Ok to catch Exception here, because anything going wrong because