Add a new attribute to allow widgets to specify a preview image.
Change-Id: I0d79c85c6a2fc477af17eda05eabaa3151b0bef5
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user