diff --git a/src/com/android/launcher3/model/data/WorkspaceItemInfo.java b/src/com/android/launcher3/model/data/WorkspaceItemInfo.java index a741bb8c42..c6dde71640 100644 --- a/src/com/android/launcher3/model/data/WorkspaceItemInfo.java +++ b/src/com/android/launcher3/model/data/WorkspaceItemInfo.java @@ -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; }