mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Removing all compatibility code below Lollipop
Bug: 32745285 Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user