mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Merge "Ensuring that ShortcutInfo always has an icon" into ub-launcher3-master
This commit is contained in:
@@ -170,7 +170,6 @@ public class Workspace extends PagedView
|
||||
private CellLayout mDropToLayout = null;
|
||||
|
||||
@Thunk Launcher mLauncher;
|
||||
@Thunk IconCache mIconCache;
|
||||
@Thunk DragController mDragController;
|
||||
|
||||
// These are temporary variables to prevent having to allocate a new object just to
|
||||
@@ -514,9 +513,7 @@ public class Workspace extends PagedView
|
||||
*/
|
||||
protected void initWorkspace() {
|
||||
mCurrentPage = getDefaultPage();
|
||||
LauncherAppState app = LauncherAppState.getInstance();
|
||||
DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
mIconCache = app.getIconCache();
|
||||
setWillNotDraw(false);
|
||||
setClipChildren(false);
|
||||
setClipToPadding(false);
|
||||
@@ -3391,7 +3388,7 @@ public class Workspace extends PagedView
|
||||
break;
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
|
||||
view = FolderIcon.fromXml(R.layout.folder_icon, mLauncher, cellLayout,
|
||||
(FolderInfo) info, mIconCache);
|
||||
(FolderInfo) info);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Unknown item type: " + info.itemType);
|
||||
@@ -3999,8 +3996,7 @@ public class Workspace extends PagedView
|
||||
Drawable oldIcon = getTextViewIcon(shortcut);
|
||||
boolean oldPromiseState = (oldIcon instanceof PreloadIconDrawable)
|
||||
&& ((PreloadIconDrawable) oldIcon).hasNotCompleted();
|
||||
shortcut.applyFromShortcutInfo(si, mIconCache,
|
||||
si.isPromise() != oldPromiseState);
|
||||
shortcut.applyFromShortcutInfo(si, si.isPromise() != oldPromiseState);
|
||||
}
|
||||
// process all the shortcuts
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user