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

Commit 0d22b079 authored by Matthew Ng's avatar Matthew Ng
Browse files

Cancels out long press on recents button when viewing home screen

Cancel the long press when viewing home (launcher) to disable the
double vibration that should occur when in multiwindow mode.

Fixes: 29927464
Test: manual - at home and multiwindow to long press recents button
Change-Id: Ic9c8a5096ce9f30fc1265774ebb82c1356b1221b
parent 5686ade0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -146,10 +146,12 @@ import com.android.systemui.plugins.qs.QS.ActivityStarter;
import com.android.systemui.plugins.qs.QS.BaseStatusBarHeader;
import com.android.systemui.qs.QSFragment;
import com.android.systemui.qs.QSPanel;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.ScreenPinningRequest;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.AppTransitionFinishedEvent;
import com.android.systemui.recents.events.activity.UndockingTaskEvent;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.stackdivider.Divider;
import com.android.systemui.stackdivider.WindowManagerProxy;
import com.android.systemui.statusbar.ActivatableNotificationView;
@@ -1360,6 +1362,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
                return false;
            }

            ActivityManager.RunningTaskInfo runningTask =
                    Recents.getSystemServices().getRunningTask();
            boolean isRunningTaskInHomeOrRecentsStack = runningTask != null &&
                    ActivityManager.StackId.isHomeOrRecentsStack(runningTask.stackId);
            if (isRunningTaskInHomeOrRecentsStack) {
                return false;
            }

            toggleSplitScreenMode(MetricsEvent.ACTION_WINDOW_DOCK_LONGPRESS,
                    MetricsEvent.ACTION_WINDOW_UNDOCK_LONGPRESS);
            return true;