Removing all compatibility code below Lollipop

Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
This commit is contained in:
Sunny Goyal
2016-12-16 15:04:51 -08:00
parent 90a40570bc
commit a52ecb0390
49 changed files with 220 additions and 1178 deletions

View File

@@ -302,7 +302,7 @@ public class WidgetPreviewLoader {
Drawable drawable = null;
if (info.previewImage != 0) {
try {
drawable = mWidgetManager.loadPreview(info);
drawable = info.loadPreviewImage(launcher.getApplicationContext(), 0);
} catch (OutOfMemoryError e) {
Log.w(TAG, "Error loading widget preview for: " + info.provider, e);
// During OutOfMemoryError, the previous heap stack is not affected. Catching
@@ -395,7 +395,7 @@ public class WidgetPreviewLoader {
float iconScale = Math.min((float) smallestSide / (appIconSize + 2 * minOffset), scale);
try {
Drawable icon = mWidgetManager.loadIcon(info, mIconCache);
Drawable icon = info.getIcon(launcher, mIconCache);
if (icon != null) {
icon = mutateOnMainThread(icon);
int hoffset = (int) ((tileW - appIconSize * iconScale) / 2) + x;