Merge "Introduce a flag for new back affordance" into tm-qpr-dev am: 593ac5567c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18917212 Change-Id: I5fbf44fa30eb94f506cf6d55e97b79d414172dc9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -194,6 +194,8 @@ public class Flags {
|
||||
public static final SysPropBooleanFlag WM_ALWAYS_ENFORCE_PREDICTIVE_BACK =
|
||||
new SysPropBooleanFlag(1202, "persist.wm.debug.predictive_back_always_enforce", false);
|
||||
|
||||
public static final BooleanFlag NEW_BACK_AFFORDANCE = new BooleanFlag(1203, true);
|
||||
|
||||
// Pay no attention to the reflection behind the curtain.
|
||||
// ========================== Curtain ==========================
|
||||
// | |
|
||||
|
||||
@@ -234,7 +234,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
|
||||
private boolean mIsBackGestureAllowed;
|
||||
private boolean mGestureBlockingActivityRunning;
|
||||
private boolean mIsInPipMode;
|
||||
private boolean mIsPredictiveBackAnimEnabled;
|
||||
private boolean mIsNewBackAffordanceEnabled;
|
||||
|
||||
private InputMonitor mInputMonitor;
|
||||
private InputChannelCompat.InputEventReceiver mInputEventReceiver;
|
||||
@@ -524,8 +524,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
|
||||
Choreographer.getInstance(), this::onInputEvent);
|
||||
|
||||
// Add a nav bar panel window
|
||||
mIsPredictiveBackAnimEnabled =
|
||||
mFeatureFlags.isEnabled(Flags.WM_ENABLE_PREDICTIVE_BACK_ANIM);
|
||||
mIsNewBackAffordanceEnabled = mFeatureFlags.isEnabled(Flags.NEW_BACK_AFFORDANCE);
|
||||
resetEdgeBackPlugin();
|
||||
mPluginManager.addPluginListener(
|
||||
this, NavigationEdgeBackPlugin.class, /*allowMultiple=*/ false);
|
||||
@@ -545,7 +544,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
|
||||
}
|
||||
|
||||
private void resetEdgeBackPlugin() {
|
||||
if (mIsPredictiveBackAnimEnabled) {
|
||||
if (mIsNewBackAffordanceEnabled) {
|
||||
setEdgeBackPlugin(
|
||||
mBackPanelControllerFactory.create(mContext, mBackAnimation));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user