mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
fix: Shortcut get disabled reason crashes on Android 8.1 (#6061)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
@@ -193,14 +193,20 @@ public class WorkspaceItemInfo extends ItemInfoWithIcon {
|
||||
if (shortcutInfo.isEnabled()) {
|
||||
runtimeStatusFlags &= ~FLAG_DISABLED_BY_PUBLISHER;
|
||||
} else {
|
||||
Log.w(TAG, "updateFromDeepShortcutInfo: Updated shortcut has been disabled. "
|
||||
+ " package=" + shortcutInfo.getPackage()
|
||||
+ " disabledReason=" + shortcutInfo.getDisabledReason());
|
||||
if (Utilities.ATLEAST_P) {
|
||||
Log.w(TAG, "updateFromDeepShortcutInfo: Updated shortcut has been disabled. "
|
||||
+ " package=" + shortcutInfo.getPackage()
|
||||
+ " disabledReason=" + shortcutInfo.getDisabledReason());
|
||||
}
|
||||
runtimeStatusFlags |= FLAG_DISABLED_BY_PUBLISHER;
|
||||
}
|
||||
|
||||
if (shortcutInfo.getDisabledReason() == ShortcutInfo.DISABLED_REASON_VERSION_LOWER) {
|
||||
runtimeStatusFlags |= FLAG_DISABLED_VERSION_LOWER;
|
||||
if (Utilities.ATLEAST_P) {
|
||||
if (shortcutInfo.getDisabledReason() == ShortcutInfo.DISABLED_REASON_VERSION_LOWER) {
|
||||
runtimeStatusFlags |= FLAG_DISABLED_VERSION_LOWER;
|
||||
} else {
|
||||
runtimeStatusFlags &= ~FLAG_DISABLED_VERSION_LOWER;
|
||||
}
|
||||
} else {
|
||||
runtimeStatusFlags &= ~FLAG_DISABLED_VERSION_LOWER;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user