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

Commit fb692acb authored by Matthew Ng's avatar Matthew Ng
Browse files

Longpress overview in minimized mode only for resizable launches (1/2)

Since resizable launchers in minimized mode shows more of the docked
stack than in non-resizable launchers, it will play the same
functionality as split screen where long press overview button will
exit split screen into fullscreen mode.

Test: test was written - adb shell am instrument -w -e class
com.android.androidbvt.SysUIMultiWindowTests
com.android.androidbvt/android.support.test.runner.AndroidJUnitRunner
Fixes: 34892561
Change-Id: I9f957dada1b325b36068d59fa9b2d1fa4912b804
parent ec321183
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -72,6 +72,10 @@ public class Divider extends SystemUI {
        return mMinimized;
    }

    public boolean isHomeStackResizable() {
        return mHomeStackResizable;
    }

    private void addDivider(Configuration configuration) {
        mView = (DividerView)
                LayoutInflater.from(mContext).inflate(R.layout.docked_stack_divider, null);
@@ -119,6 +123,7 @@ public class Divider extends SystemUI {
        mView.post(new Runnable() {
            @Override
            public void run() {
                mHomeStackResizable = isHomeStackResizable;
                if (mMinimized != minimized) {
                    mMinimized = minimized;
                    updateTouchable();
+2 −1
Original line number Diff line number Diff line
@@ -1241,7 +1241,8 @@ public class DividerView extends FrameLayout implements OnTouchListener,

    public final void onBusEvent(UndockingTaskEvent undockingTaskEvent) {
        int dockSide = mWindowManagerProxy.getDockSide();
        if (dockSide != WindowManager.DOCKED_INVALID && !mDockedStackMinimized) {
        if (dockSide != WindowManager.DOCKED_INVALID && (mHomeStackResizable
                || !mDockedStackMinimized)) {
            startDragging(false /* animate */, false /* touching */);
            SnapTarget target = dockSideTopLeft(dockSide)
                    ? mSnapAlgorithm.getDismissEndTarget()
+1 −1
Original line number Diff line number Diff line
@@ -1496,7 +1496,7 @@ public class StatusBar extends SystemUI implements DemoMode,
                    ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT, null, metricsDockAction);
        } else {
            Divider divider = getComponent(Divider.class);
            if (divider != null && divider.isMinimized()) {
            if (divider != null && divider.isMinimized() && !divider.isHomeStackResizable()) {
                // Undocking from the minimized state is not supported
                return false;
            } else {