Merge "Introduce a flag for new back affordance" into tm-qpr-dev

This commit is contained in:
Peter Kalauskas
2022-06-16 15:32:02 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 4 deletions

View File

@@ -194,6 +194,8 @@ public class Flags {
public static final SysPropBooleanFlag WM_ALWAYS_ENFORCE_PREDICTIVE_BACK = public static final SysPropBooleanFlag WM_ALWAYS_ENFORCE_PREDICTIVE_BACK =
new SysPropBooleanFlag(1202, "persist.wm.debug.predictive_back_always_enforce", false); 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. // Pay no attention to the reflection behind the curtain.
// ========================== Curtain ========================== // ========================== Curtain ==========================
// | | // | |

View File

@@ -234,7 +234,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
private boolean mIsBackGestureAllowed; private boolean mIsBackGestureAllowed;
private boolean mGestureBlockingActivityRunning; private boolean mGestureBlockingActivityRunning;
private boolean mIsInPipMode; private boolean mIsInPipMode;
private boolean mIsPredictiveBackAnimEnabled; private boolean mIsNewBackAffordanceEnabled;
private InputMonitor mInputMonitor; private InputMonitor mInputMonitor;
private InputChannelCompat.InputEventReceiver mInputEventReceiver; private InputChannelCompat.InputEventReceiver mInputEventReceiver;
@@ -524,8 +524,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
Choreographer.getInstance(), this::onInputEvent); Choreographer.getInstance(), this::onInputEvent);
// Add a nav bar panel window // Add a nav bar panel window
mIsPredictiveBackAnimEnabled = mIsNewBackAffordanceEnabled = mFeatureFlags.isEnabled(Flags.NEW_BACK_AFFORDANCE);
mFeatureFlags.isEnabled(Flags.WM_ENABLE_PREDICTIVE_BACK_ANIM);
resetEdgeBackPlugin(); resetEdgeBackPlugin();
mPluginManager.addPluginListener( mPluginManager.addPluginListener(
this, NavigationEdgeBackPlugin.class, /*allowMultiple=*/ false); this, NavigationEdgeBackPlugin.class, /*allowMultiple=*/ false);
@@ -545,7 +544,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
} }
private void resetEdgeBackPlugin() { private void resetEdgeBackPlugin() {
if (mIsPredictiveBackAnimEnabled) { if (mIsNewBackAffordanceEnabled) {
setEdgeBackPlugin( setEdgeBackPlugin(
mBackPanelControllerFactory.create(mContext, mBackAnimation)); mBackPanelControllerFactory.create(mContext, mBackAnimation));
} else { } else {