Moving icon generation out of ShortcutInfo constructor so that it

can be created on the UI thread

Change-Id: If84e52041eb4ab20807f5cfd4b7f31d7b5f381ed
This commit is contained in:
Sunny Goyal
2017-01-18 11:30:23 -08:00
parent a3db1fc674
commit 1b0726359b
8 changed files with 92 additions and 85 deletions

View File

@@ -25,6 +25,7 @@ import com.android.launcher3.LauncherModel;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.ShortcutInfo;
import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.graphics.LauncherIcons;
import com.android.launcher3.shortcuts.DeepShortcutManager;
import com.android.launcher3.shortcuts.ShortcutInfoCompat;
import com.android.launcher3.shortcuts.ShortcutKey;
@@ -85,6 +86,7 @@ public class UserLockStateChangedTask extends ExtendedModelTask {
}
si.isDisabled &= ~ShortcutInfo.FLAG_DISABLED_LOCKED_USER;
si.updateFromDeepShortcutInfo(shortcut, context);
si.iconBitmap = LauncherIcons.createShortcutIcon(shortcut, context);
} else {
si.isDisabled |= ShortcutInfo.FLAG_DISABLED_LOCKED_USER;
}