diff options
author | Patrick Dubroy <dubroy@google.com> | 2010-06-23 14:56:28 -0700 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2010-06-28 16:39:19 -0700 |
commit | d2db2a579440608453994b64eb5b425840f5307a (patch) | |
tree | 1b0ac174cf229a18afa305d6cbe96a4837561b68 /services/java | |
parent | ab3593956c9eefc85e07cf6bcc847b696da8dccc (diff) | |
download | frameworks_base-d2db2a579440608453994b64eb5b425840f5307a.zip frameworks_base-d2db2a579440608453994b64eb5b425840f5307a.tar.gz frameworks_base-d2db2a579440608453994b64eb5b425840f5307a.tar.bz2 |
Add a new attribute to allow widgets to specify a preview image.
Change-Id: I0d79c85c6a2fc477af17eda05eabaa3151b0bef5
Diffstat (limited to 'services/java')
-rw-r--r-- | services/java/com/android/server/AppWidgetService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java index 3ed6c12..1674221 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 |