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

Commit fb4694d5 authored by Jagrut Desai's avatar Jagrut Desai Committed by Automerger Merge Worker
Browse files

Merge "Apply ForciblyShown WindowLayoutParam flags for Transient Taskbar" into...

Merge "Apply ForciblyShown WindowLayoutParam flags for Transient Taskbar" into udc-qpr-dev am: 733d440a am: a1e8f327

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24709295



Change-Id: Id84c65adba08bae631cccfd6792c6a90b6992637
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 3edb22bd a1e8f327
Loading
Loading
Loading
Loading
+20 −3
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import android.view.Gravity;
import android.view.RoundedCorner;
import android.view.Surface;
import android.view.View;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.Toast;
@@ -854,6 +855,21 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
        mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams);
    }

    /**
     * Applies forcibly show flag to taskbar window iff transient taskbar is unstashed.
     */
    public void applyForciblyShownFlagWhileTransientTaskbarUnstashed(boolean shouldForceShow) {
        if (!DisplayController.isTransientTaskbar(this)) {
            return;
        }
        if (shouldForceShow) {
            mWindowLayoutParams.forciblyShownTypes |= WindowInsets.Type.navigationBars();
        } else {
            mWindowLayoutParams.forciblyShownTypes &= ~WindowInsets.Type.navigationBars();
        }
        notifyUpdateLayoutParams();
    }

    /**
     * Either adds or removes {@link WindowManager.LayoutParams#FLAG_NOT_FOCUSABLE} on the taskbar
     * window. If we're now focusable, also move nav buttons to a separate window above IME.
@@ -1055,6 +1071,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {

    /**
     * Called when we detect a long press in the nav region before passing the gesture slop.
     *
     * @return Whether taskbar handled the long press, and thus should cancel the gesture.
     */
    public boolean onLongPressToUnstashTaskbar() {
+1 −0
Original line number Diff line number Diff line
@@ -1101,6 +1101,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
                    TaskbarAutohideSuspendController.FLAG_AUTOHIDE_SUSPEND_TRANSIENT_TASKBAR,
                    !hasAnyFlag(FLAG_STASHED_IN_APP_AUTO));
        }
        mActivity.applyForciblyShownFlagWhileTransientTaskbarUnstashed(!isStashedInApp());
    }

    private void notifyStashChange(boolean visible, boolean stashed) {