Requesting ApplicationInfo in cached object
Bug: 363324203 Test: Presubmit Flag: EXEMPT refactor Change-Id: I92f3d3ed8c267b895dc439ba1f01eb67d7f63965
This commit is contained in:
1 parent
a3169790fd
commit
f7c32a29fd
15 files changed
+227
-158
No files matched your search
@@ -32,7 +32,8 @@ import android.os.SystemClock;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.icons.ShortcutCachingLogic;
|
||||
import com.android.launcher3.icons.CacheableShortcutCachingLogic;
|
||||
import com.android.launcher3.icons.CacheableShortcutInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
|
||||
public class PinRequestHelper {
|
||||
@@ -78,7 +79,8 @@ public class PinRequestHelper {
|
||||
// Apply the unbadged icon synchronously using the caching logic directly and
|
||||
// fetch the actual icon asynchronously.
|
||||
LauncherAppState app = LauncherAppState.getInstance(context);
|
||||
info.bitmap = new ShortcutCachingLogic().loadIcon(context, app.getIconCache(), si);
|
||||
info.bitmap = CacheableShortcutCachingLogic.INSTANCE.loadIcon(
|
||||
context, app.getIconCache(), new CacheableShortcutInfo(si, context));
|
||||
app.getModel().updateAndBindWorkspaceItem(info, si);
|
||||
return info;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user