Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -61760,6 +61760,7 @@ package android.window { method public float getTouchX(); method public float getTouchY(); field public static final int EDGE_LEFT = 0; // 0x0 field @FlaggedApi("com.android.window.flags.predictive_back_swipe_edge_none_api") public static final int EDGE_NONE = 2; // 0x2 field public static final int EDGE_RIGHT = 1; // 0x1 } core/java/android/view/ViewRootImpl.java +8 −2 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ import static android.window.DesktopModeFlags.ENABLE_CAPTION_COMPAT_INSET_FORCE_ import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.text.flags.Flags.disableHandwritingInitiatorForIme; import static com.android.window.flags.Flags.enableBufferTransformHintFromDisplay; import static com.android.window.flags.Flags.predictiveBackSwipeEdgeNoneApi; import static com.android.window.flags.Flags.setScPropertiesInClient; import static com.android.window.flags.Flags.systemUiImmersiveConfirmationDialog; Loading Loading @@ -7559,8 +7560,13 @@ public final class ViewRootImpl implements ViewParent, // - 0 means the button was pressed. // - 1 means the button continues to be pressed (long press). if (keyEvent.getRepeatCount() == 0) { animationCallback.onBackStarted( new BackEvent(0, 0, 0f, BackEvent.EDGE_LEFT)); BackEvent backEvent; if (predictiveBackSwipeEdgeNoneApi()) { backEvent = new BackEvent(0, 0, 0f, BackEvent.EDGE_NONE); } else { backEvent = new BackEvent(0, 0, 0f, BackEvent.EDGE_LEFT); } animationCallback.onBackStarted(backEvent); } break; case KeyEvent.ACTION_UP: Loading core/java/android/window/BackEvent.java +9 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.window; import static com.android.window.flags.Flags.FLAG_PREDICTIVE_BACK_SWIPE_EDGE_NONE_API; import static com.android.window.flags.Flags.FLAG_PREDICTIVE_BACK_TIMESTAMP_API; import static com.android.window.flags.Flags.predictiveBackTimestampApi; Loading @@ -37,11 +38,19 @@ public final class BackEvent { public static final int EDGE_LEFT = 0; /** Indicates that the edge swipe starts from the right edge of the screen */ public static final int EDGE_RIGHT = 1; /** * Indicates that the back event was not triggered by an edge swipe back gesture. This applies * to cases like using the back button in 3-button navigation or pressing a hardware back * button. */ @FlaggedApi(FLAG_PREDICTIVE_BACK_SWIPE_EDGE_NONE_API) public static final int EDGE_NONE = 2; /** @hide */ @IntDef({ EDGE_LEFT, EDGE_RIGHT, EDGE_NONE, }) @Retention(RetentionPolicy.SOURCE) public @interface SwipeEdge{} Loading core/java/android/window/flags/windowing_frontend.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -332,3 +332,11 @@ flag { is_fixed_read_only: true bug: "362938401" } flag { name: "predictive_back_swipe_edge_none_api" namespace: "systemui" description: "EDGE_NONE swipeEdge option in BackEvent" is_fixed_read_only: true bug: "362938401" } Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -61760,6 +61760,7 @@ package android.window { method public float getTouchX(); method public float getTouchY(); field public static final int EDGE_LEFT = 0; // 0x0 field @FlaggedApi("com.android.window.flags.predictive_back_swipe_edge_none_api") public static final int EDGE_NONE = 2; // 0x2 field public static final int EDGE_RIGHT = 1; // 0x1 }
core/java/android/view/ViewRootImpl.java +8 −2 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ import static android.window.DesktopModeFlags.ENABLE_CAPTION_COMPAT_INSET_FORCE_ import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.text.flags.Flags.disableHandwritingInitiatorForIme; import static com.android.window.flags.Flags.enableBufferTransformHintFromDisplay; import static com.android.window.flags.Flags.predictiveBackSwipeEdgeNoneApi; import static com.android.window.flags.Flags.setScPropertiesInClient; import static com.android.window.flags.Flags.systemUiImmersiveConfirmationDialog; Loading Loading @@ -7559,8 +7560,13 @@ public final class ViewRootImpl implements ViewParent, // - 0 means the button was pressed. // - 1 means the button continues to be pressed (long press). if (keyEvent.getRepeatCount() == 0) { animationCallback.onBackStarted( new BackEvent(0, 0, 0f, BackEvent.EDGE_LEFT)); BackEvent backEvent; if (predictiveBackSwipeEdgeNoneApi()) { backEvent = new BackEvent(0, 0, 0f, BackEvent.EDGE_NONE); } else { backEvent = new BackEvent(0, 0, 0f, BackEvent.EDGE_LEFT); } animationCallback.onBackStarted(backEvent); } break; case KeyEvent.ACTION_UP: Loading
core/java/android/window/BackEvent.java +9 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.window; import static com.android.window.flags.Flags.FLAG_PREDICTIVE_BACK_SWIPE_EDGE_NONE_API; import static com.android.window.flags.Flags.FLAG_PREDICTIVE_BACK_TIMESTAMP_API; import static com.android.window.flags.Flags.predictiveBackTimestampApi; Loading @@ -37,11 +38,19 @@ public final class BackEvent { public static final int EDGE_LEFT = 0; /** Indicates that the edge swipe starts from the right edge of the screen */ public static final int EDGE_RIGHT = 1; /** * Indicates that the back event was not triggered by an edge swipe back gesture. This applies * to cases like using the back button in 3-button navigation or pressing a hardware back * button. */ @FlaggedApi(FLAG_PREDICTIVE_BACK_SWIPE_EDGE_NONE_API) public static final int EDGE_NONE = 2; /** @hide */ @IntDef({ EDGE_LEFT, EDGE_RIGHT, EDGE_NONE, }) @Retention(RetentionPolicy.SOURCE) public @interface SwipeEdge{} Loading
core/java/android/window/flags/windowing_frontend.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -332,3 +332,11 @@ flag { is_fixed_read_only: true bug: "362938401" } flag { name: "predictive_back_swipe_edge_none_api" namespace: "systemui" description: "EDGE_NONE swipeEdge option in BackEvent" is_fixed_read_only: true bug: "362938401" }