Loading src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java +10 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ import static android.view.accessibility.AccessibilityNodeInfo.ACTION_LONG_CLICK import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.IGNORE; import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_NOT_PINNABLE; import android.appwidget.AppWidgetProviderInfo; import android.graphics.Point; Loading Loading @@ -124,12 +125,19 @@ public class LauncherAccessibilityDelegate extends BaseAccessibilityDelegate<Lau } } if ((item instanceof WorkspaceItemFactory) || (item instanceof WorkspaceItemInfo) || (item instanceof PendingAddItemInfo)) { if (supportAddToWorkSpace(item)) { out.add(mActions.get(ADD_TO_WORKSPACE)); } } private boolean supportAddToWorkSpace(ItemInfo item) { return (item instanceof WorkspaceItemFactory) || ((item instanceof WorkspaceItemInfo) && (((WorkspaceItemInfo) item).runtimeStatusFlags & FLAG_NOT_PINNABLE) == 0) || ((item instanceof PendingAddItemInfo) && (((PendingAddItemInfo) item).runtimeStatusFlags & FLAG_NOT_PINNABLE) == 0); } /** * Returns all the accessibility actions that can be handled by the host. */ Loading src/com/android/launcher3/model/data/ItemInfoWithIcon.java +5 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,11 @@ public abstract class ItemInfoWithIcon extends ItemInfo { | FLAG_DISABLED_QUIET_USER | FLAG_DISABLED_BY_PUBLISHER | FLAG_DISABLED_LOCKED_USER | FLAG_DISABLED_VERSION_LOWER; /** * Flag indicating this item can't be pinned to home screen. */ public static final int FLAG_NOT_PINNABLE = 1 << 13; /** * Status associated with the system state of the underlying item. This is calculated every * time a new info is created and not persisted on the disk. Loading Loading
src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java +10 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ import static android.view.accessibility.AccessibilityNodeInfo.ACTION_LONG_CLICK import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.IGNORE; import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_NOT_PINNABLE; import android.appwidget.AppWidgetProviderInfo; import android.graphics.Point; Loading Loading @@ -124,12 +125,19 @@ public class LauncherAccessibilityDelegate extends BaseAccessibilityDelegate<Lau } } if ((item instanceof WorkspaceItemFactory) || (item instanceof WorkspaceItemInfo) || (item instanceof PendingAddItemInfo)) { if (supportAddToWorkSpace(item)) { out.add(mActions.get(ADD_TO_WORKSPACE)); } } private boolean supportAddToWorkSpace(ItemInfo item) { return (item instanceof WorkspaceItemFactory) || ((item instanceof WorkspaceItemInfo) && (((WorkspaceItemInfo) item).runtimeStatusFlags & FLAG_NOT_PINNABLE) == 0) || ((item instanceof PendingAddItemInfo) && (((PendingAddItemInfo) item).runtimeStatusFlags & FLAG_NOT_PINNABLE) == 0); } /** * Returns all the accessibility actions that can be handled by the host. */ Loading
src/com/android/launcher3/model/data/ItemInfoWithIcon.java +5 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,11 @@ public abstract class ItemInfoWithIcon extends ItemInfo { | FLAG_DISABLED_QUIET_USER | FLAG_DISABLED_BY_PUBLISHER | FLAG_DISABLED_LOCKED_USER | FLAG_DISABLED_VERSION_LOWER; /** * Flag indicating this item can't be pinned to home screen. */ public static final int FLAG_NOT_PINNABLE = 1 << 13; /** * Status associated with the system state of the underlying item. This is calculated every * time a new info is created and not persisted on the disk. Loading