mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Moving some abstract classes to interfaces, to better use java-8 features
Change-Id: I862af4931c95cbde052130d8b7d4ac3375db782f
This commit is contained in:
@@ -478,15 +478,11 @@ public class LoaderTask implements Runnable {
|
||||
}
|
||||
info = new ShortcutInfo(pinnedShortcut, context);
|
||||
final ShortcutInfo finalInfo = info;
|
||||
Provider<Bitmap> fallbackIconProvider = new Provider<Bitmap>() {
|
||||
@Override
|
||||
public Bitmap get() {
|
||||
// If the pinned deep shortcut is no longer published,
|
||||
// use the last saved icon instead of the default.
|
||||
return c.loadIcon(finalInfo)
|
||||
? finalInfo.iconBitmap : null;
|
||||
}
|
||||
};
|
||||
// If the pinned deep shortcut is no longer published,
|
||||
// use the last saved icon instead of the default.
|
||||
Provider<Bitmap> fallbackIconProvider = () ->
|
||||
c.loadIcon(finalInfo) ? finalInfo.iconBitmap : null;
|
||||
|
||||
LauncherIcons li = LauncherIcons.obtain(context);
|
||||
li.createShortcutIcon(pinnedShortcut,
|
||||
true /* badged */, fallbackIconProvider).applyTo(info);
|
||||
|
||||
Reference in New Issue
Block a user