Using WidgetCell in the Pin Item confirmation prompt for a consistent UI

Also fixing some platform API changes in PinItemRequestCompat

Bug: 33584624
Change-Id: I255829f0079f1a3967bf8d6a337da12c890eb7ec
This commit is contained in:
Sunny Goyal committed 2017-01-20 15:44:15 -08:00
1 parent dbb28b2bf8
commit 65513ba58c
9 files changed
+139 -76

No files matched your search

@@ -592,7 +592,10 @@ public class WidgetPreviewLoader {
// Fetch the version info before we generate the preview, so that, in-case the
// app was updated while we are generating the preview, we use the old version info,
// which would gets re-written next time.
mVersions = getPackageVersion(mKey.componentName.getPackageName());
boolean persistable = mInfo.activityInfo == null
|| mInfo.activityInfo.isPersistable();
mVersions = persistable ? getPackageVersion(mKey.componentName.getPackageName())
: null;
// it's not in the db... we need to generate it
preview = generatePreview(mActivity, mInfo, unusedBitmap, mPreviewWidth, mPreviewHeight);