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

Commit b4954547 authored by Holly Sun's avatar Holly Sun
Browse files

[PS] Disable long press for install app button.

For Install button - Disable long press would also disable drag logic altogether.
For apps in PS - Long press is not disabled as it. Drag is disabled in ag/25898351.

Video: https://drive.google.com/file/d/1g5jJ2vebZdiKUwjDMfkUnLwQ1oK1fWXB/view?usp=sharing

Bug: 332572841
Test: manual
Flag: aconfig com.android.launcher3.private_space_app_installer_button trunkfood
Change-Id: I418a31785b25c4f19dde2136747a74811628e92f
parent 568b84ff
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.folder.Folder;
import com.android.launcher3.logging.StatsLogManager.StatsLogger;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.PrivateSpaceInstallAppButtonInfo;
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.views.BubbleTextHolder;
@@ -150,7 +151,10 @@ public class ItemLongClickListener {
        if (launcher.getWorkspace().isSwitchingState()) return false;

        StatsLogger logger = launcher.getStatsLogManager().logger();
        if (v.getTag() instanceof ItemInfo) {
        if (v.getTag() instanceof ItemInfo itemInfo) {
            if (itemInfo instanceof PrivateSpaceInstallAppButtonInfo) {
                return false;
            }
            logger.withItemInfo((ItemInfo) v.getTag());
        }
        logger.log(LAUNCHER_ALLAPPS_ITEM_LONG_PRESSED);