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

Commit 5bdaa0b8 authored by Hongwei Wang's avatar Hongwei Wang Committed by android-build-merger
Browse files

Merge "Update the string on how to exit pinning mode in gesture navigation" into qt-qpr1-dev

am: e6c9ed5f

Change-Id: Ic4cad25be6307b9706ffe56491a7fb58ee5a04e7
parents ee1cdc61 e6c9ed5f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1386,6 +1386,8 @@
        buttons</string>
    <string name="screen_pinning_toast_recents_invisible">To unpin this screen, touch &amp; hold Back
        and Home buttons</string>
    <!-- Notify (in toast) user how to unpin screen in gesture navigation mode [CHAR LIMIT=NONE] -->
    <string name="screen_pinning_toast_gesture_nav">To unpin this screen, swipe up &amp; hold</string>
    <!-- Screen pinning positive response. -->
    <string name="screen_pinning_positive">Got it</string>
    <!-- Screen pinning negative response. -->
+3 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.phone;

import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL;

import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
@@ -920,7 +921,8 @@ public class NavigationBarView extends FrameLayout implements
    }

    public void showPinningEscapeToast() {
        mScreenPinningNotify.showEscapeToast(isRecentsButtonVisible());
        mScreenPinningNotify.showEscapeToast(
                mNavBarMode == NAV_BAR_MODE_GESTURAL, isRecentsButtonVisible());
    }

    public boolean isVertical() {
+6 −4
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ public class ScreenPinningNotify {
    }

    /** Show a toast that describes the gesture the user should use to escape pinned mode. */
    public void showEscapeToast(boolean isRecentsButtonVisible) {
    public void showEscapeToast(boolean isGestureNavEnabled, boolean isRecentsButtonVisible) {
        long showToastTime = SystemClock.elapsedRealtime();
        if ((showToastTime - mLastShowToastTime) < SHOW_TOAST_MINIMUM_INTERVAL) {
            Slog.i(TAG, "Ignore toast since it is requested in very short interval.");
@@ -60,7 +60,9 @@ public class ScreenPinningNotify {
        if (mLastToast != null) {
            mLastToast.cancel();
        }
        mLastToast = makeAllUserToastAndShow(isRecentsButtonVisible
        mLastToast = makeAllUserToastAndShow(isGestureNavEnabled
                ? R.string.screen_pinning_toast_gesture_nav
                : isRecentsButtonVisible
                        ? R.string.screen_pinning_toast
                        : R.string.screen_pinning_toast_recents_invisible);
        mLastShowToastTime = showToastTime;