Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fe83ec9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Removing "remove" accessibility action for deep shortcuts in menu" into ub-launcher3-master

parents 8baf9214 26850a2f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.launcher3;

import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT;

import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
@@ -62,8 +64,12 @@ public class DeleteDropTarget extends ButtonDropTarget {
     */
    @Override
    public boolean supportsAccessibilityDrop(ItemInfo info, View view) {
        return (info instanceof ShortcutInfo)
                || (info instanceof LauncherAppWidgetInfo)
        if (info instanceof ShortcutInfo) {
            // Support the action unless the item is in a context menu.
            return info.screenId >= 0;
        }

        return (info instanceof LauncherAppWidgetInfo)
                || (info instanceof FolderInfo);
    }