Update the string on how to exit pinning mode in gesture navigation
Bug: 139438042 Test: Back gesture in screen pinning mode Change-Id: Ia21e0324cb9a78c6664f4ba787189c6a2423a03d
This commit is contained in:
@@ -1386,6 +1386,8 @@
|
|||||||
buttons</string>
|
buttons</string>
|
||||||
<string name="screen_pinning_toast_recents_invisible">To unpin this screen, touch & hold Back
|
<string name="screen_pinning_toast_recents_invisible">To unpin this screen, touch & hold Back
|
||||||
and Home buttons</string>
|
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 & hold</string>
|
||||||
<!-- Screen pinning positive response. -->
|
<!-- Screen pinning positive response. -->
|
||||||
<string name="screen_pinning_positive">Got it</string>
|
<string name="screen_pinning_positive">Got it</string>
|
||||||
<!-- Screen pinning negative response. -->
|
<!-- Screen pinning negative response. -->
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package com.android.systemui.statusbar.phone;
|
package com.android.systemui.statusbar.phone;
|
||||||
|
|
||||||
|
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_HOME_DISABLED;
|
||||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
|
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
|
||||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
|
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
|
||||||
@@ -955,7 +957,8 @@ public class NavigationBarView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showPinningEscapeToast() {
|
public void showPinningEscapeToast() {
|
||||||
mScreenPinningNotify.showEscapeToast(isRecentsButtonVisible());
|
mScreenPinningNotify.showEscapeToast(
|
||||||
|
mNavBarMode == NAV_BAR_MODE_GESTURAL, isRecentsButtonVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVertical() {
|
public boolean isVertical() {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public class ScreenPinningNotify {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Show a toast that describes the gesture the user should use to escape pinned mode. */
|
/** 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();
|
long showToastTime = SystemClock.elapsedRealtime();
|
||||||
if ((showToastTime - mLastShowToastTime) < SHOW_TOAST_MINIMUM_INTERVAL) {
|
if ((showToastTime - mLastShowToastTime) < SHOW_TOAST_MINIMUM_INTERVAL) {
|
||||||
Slog.i(TAG, "Ignore toast since it is requested in very short interval.");
|
Slog.i(TAG, "Ignore toast since it is requested in very short interval.");
|
||||||
@@ -60,9 +60,11 @@ public class ScreenPinningNotify {
|
|||||||
if (mLastToast != null) {
|
if (mLastToast != null) {
|
||||||
mLastToast.cancel();
|
mLastToast.cancel();
|
||||||
}
|
}
|
||||||
mLastToast = makeAllUserToastAndShow(isRecentsButtonVisible
|
mLastToast = makeAllUserToastAndShow(isGestureNavEnabled
|
||||||
? R.string.screen_pinning_toast
|
? R.string.screen_pinning_toast_gesture_nav
|
||||||
: R.string.screen_pinning_toast_recents_invisible);
|
: isRecentsButtonVisible
|
||||||
|
? R.string.screen_pinning_toast
|
||||||
|
: R.string.screen_pinning_toast_recents_invisible);
|
||||||
mLastShowToastTime = showToastTime;
|
mLastShowToastTime = showToastTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user