Loading core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -61775,7 +61775,7 @@ package android.window { public final class BackEvent { ctor public BackEvent(float, float, float, int); ctor @FlaggedApi("com.android.window.flags.predictive_back_timestamp_api") public BackEvent(float, float, float, int, long); method @FlaggedApi("com.android.window.flags.predictive_back_timestamp_api") public long getFrameTime(); method @FlaggedApi("com.android.window.flags.predictive_back_timestamp_api") public long getFrameTimeMillis(); method @FloatRange(from=0, to=1) public float getProgress(); method public int getSwipeEdge(); method public float getTouchX(); core/java/android/window/BackEvent.java +10 −10 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ public final class BackEvent { private final float mTouchX; private final float mTouchY; private final float mProgress; private final long mFrameTime; private final long mFrameTimeMillis; @SwipeEdge private final int mSwipeEdge; Loading @@ -68,7 +68,7 @@ public final class BackEvent { if (predictiveBackTimestampApi()) { return new BackEvent(backMotionEvent.getTouchX(), backMotionEvent.getTouchY(), backMotionEvent.getProgress(), backMotionEvent.getSwipeEdge(), backMotionEvent.getFrameTime()); backMotionEvent.getFrameTimeMillis()); } else { return new BackEvent(backMotionEvent.getTouchX(), backMotionEvent.getTouchY(), backMotionEvent.getProgress(), backMotionEvent.getSwipeEdge()); Loading @@ -88,7 +88,7 @@ public final class BackEvent { mTouchY = touchY; mProgress = progress; mSwipeEdge = swipeEdge; mFrameTime = System.nanoTime() / TimeUtils.NANOS_PER_MS; mFrameTimeMillis = System.nanoTime() / TimeUtils.NANOS_PER_MS; } /** Loading @@ -98,16 +98,16 @@ public final class BackEvent { * @param touchY Absolute Y location of the touch point of this event. * @param progress Value between 0 and 1 on how far along the back gesture is. * @param swipeEdge Indicates which edge the swipe starts from. * @param frameTime frame time of the back event. * @param frameTimeMillis frame time of the back event. */ @FlaggedApi(FLAG_PREDICTIVE_BACK_TIMESTAMP_API) public BackEvent(float touchX, float touchY, float progress, @SwipeEdge int swipeEdge, long frameTime) { long frameTimeMillis) { mTouchX = touchX; mTouchY = touchY; mProgress = progress; mSwipeEdge = swipeEdge; mFrameTime = frameTime; mFrameTimeMillis = frameTimeMillis; } /** Loading Loading @@ -160,8 +160,8 @@ public final class BackEvent { * Returns the frameTime of the BackEvent in milliseconds. Useful for calculating velocity. */ @FlaggedApi(FLAG_PREDICTIVE_BACK_TIMESTAMP_API) public long getFrameTime() { return mFrameTime; public long getFrameTimeMillis() { return mFrameTimeMillis; } @Override Loading @@ -177,7 +177,7 @@ public final class BackEvent { && mTouchY == that.mTouchY && mProgress == that.mProgress && mSwipeEdge == that.mSwipeEdge && mFrameTime == that.mFrameTime; && mFrameTimeMillis == that.mFrameTimeMillis; } @Override Loading @@ -187,7 +187,7 @@ public final class BackEvent { + ", mTouchY=" + mTouchY + ", mProgress=" + mProgress + ", mSwipeEdge=" + mSwipeEdge + ", mFrameTime=" + mFrameTime + "ms" + ", mFrameTimeMillis=" + mFrameTimeMillis + "}"; } } core/java/android/window/BackMotionEvent.java +9 −9 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import android.view.RemoteAnimationTarget; public final class BackMotionEvent implements Parcelable { private final float mTouchX; private final float mTouchY; private final long mFrameTime; private final long mFrameTimeMillis; private final float mProgress; private final boolean mTriggerBack; Loading @@ -49,7 +49,7 @@ public final class BackMotionEvent implements Parcelable { * * @param touchX Absolute X location of the touch point of this event. * @param touchY Absolute Y location of the touch point of this event. * @param frameTime Event time of the corresponding touch event. * @param frameTimeMillis Event time of the corresponding touch event. * @param progress Value between 0 and 1 on how far along the back gesture is. * @param triggerBack Indicates whether the back arrow is in the triggered state or not * @param swipeEdge Indicates which edge the swipe starts from. Loading @@ -59,14 +59,14 @@ public final class BackMotionEvent implements Parcelable { public BackMotionEvent( float touchX, float touchY, long frameTime, long frameTimeMillis, float progress, boolean triggerBack, @BackEvent.SwipeEdge int swipeEdge, @Nullable RemoteAnimationTarget departingAnimationTarget) { mTouchX = touchX; mTouchY = touchY; mFrameTime = frameTime; mFrameTimeMillis = frameTimeMillis; mProgress = progress; mTriggerBack = triggerBack; mSwipeEdge = swipeEdge; Loading @@ -80,7 +80,7 @@ public final class BackMotionEvent implements Parcelable { mTriggerBack = in.readBoolean(); mSwipeEdge = in.readInt(); mDepartingAnimationTarget = in.readTypedObject(RemoteAnimationTarget.CREATOR); mFrameTime = in.readLong(); mFrameTimeMillis = in.readLong(); } @NonNull Loading Loading @@ -109,7 +109,7 @@ public final class BackMotionEvent implements Parcelable { dest.writeBoolean(mTriggerBack); dest.writeInt(mSwipeEdge); dest.writeTypedObject(mDepartingAnimationTarget, flags); dest.writeLong(mFrameTime); dest.writeLong(mFrameTimeMillis); } /** Loading Loading @@ -156,8 +156,8 @@ public final class BackMotionEvent implements Parcelable { /** * Returns the frame time of the BackMotionEvent in milliseconds. */ public long getFrameTime() { return mFrameTime; public long getFrameTimeMillis() { return mFrameTimeMillis; } /** Loading @@ -175,7 +175,7 @@ public final class BackMotionEvent implements Parcelable { return "BackMotionEvent{" + "mTouchX=" + mTouchX + ", mTouchY=" + mTouchY + ", mFrameTime=" + mFrameTime + "ms" + ", mFrameTimeMillis=" + mFrameTimeMillis + ", mProgress=" + mProgress + ", mTriggerBack=" + mTriggerBack + ", mSwipeEdge=" + mSwipeEdge Loading core/java/android/window/BackTouchTracker.java +2 −2 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public class BackTouchTracker { return new BackMotionEvent( /* touchX = */ mInitTouchX, /* touchY = */ mInitTouchY, /* frameTime = */ 0, /* frameTimeMillis = */ 0, /* progress = */ 0, /* triggerBack = */ mTriggerBack, /* swipeEdge = */ mSwipeEdge, Loading Loading @@ -236,7 +236,7 @@ public class BackTouchTracker { return new BackMotionEvent( /* touchX = */ mLatestTouchX, /* touchY = */ mLatestTouchY, /* frameTime = */ 0, /* frameTimeMillis = */ 0, /* progress = */ progress, /* triggerBack = */ mTriggerBack, /* swipeEdge = */ mSwipeEdge, Loading core/java/android/window/ImeOnBackInvokedDispatcher.java +2 −2 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc try { long frameTime = 0; if (predictiveBackTimestampApi()) { frameTime = backEvent.getFrameTime(); frameTime = backEvent.getFrameTimeMillis(); } mIOnBackInvokedCallback.onBackStarted( new BackMotionEvent(backEvent.getTouchX(), backEvent.getTouchY(), frameTime, Loading @@ -254,7 +254,7 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc try { long frameTime = 0; if (predictiveBackTimestampApi()) { frameTime = backEvent.getFrameTime(); frameTime = backEvent.getFrameTimeMillis(); } mIOnBackInvokedCallback.onBackProgressed( new BackMotionEvent(backEvent.getTouchX(), backEvent.getTouchY(), frameTime, Loading Loading
core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -61775,7 +61775,7 @@ package android.window { public final class BackEvent { ctor public BackEvent(float, float, float, int); ctor @FlaggedApi("com.android.window.flags.predictive_back_timestamp_api") public BackEvent(float, float, float, int, long); method @FlaggedApi("com.android.window.flags.predictive_back_timestamp_api") public long getFrameTime(); method @FlaggedApi("com.android.window.flags.predictive_back_timestamp_api") public long getFrameTimeMillis(); method @FloatRange(from=0, to=1) public float getProgress(); method public int getSwipeEdge(); method public float getTouchX();
core/java/android/window/BackEvent.java +10 −10 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ public final class BackEvent { private final float mTouchX; private final float mTouchY; private final float mProgress; private final long mFrameTime; private final long mFrameTimeMillis; @SwipeEdge private final int mSwipeEdge; Loading @@ -68,7 +68,7 @@ public final class BackEvent { if (predictiveBackTimestampApi()) { return new BackEvent(backMotionEvent.getTouchX(), backMotionEvent.getTouchY(), backMotionEvent.getProgress(), backMotionEvent.getSwipeEdge(), backMotionEvent.getFrameTime()); backMotionEvent.getFrameTimeMillis()); } else { return new BackEvent(backMotionEvent.getTouchX(), backMotionEvent.getTouchY(), backMotionEvent.getProgress(), backMotionEvent.getSwipeEdge()); Loading @@ -88,7 +88,7 @@ public final class BackEvent { mTouchY = touchY; mProgress = progress; mSwipeEdge = swipeEdge; mFrameTime = System.nanoTime() / TimeUtils.NANOS_PER_MS; mFrameTimeMillis = System.nanoTime() / TimeUtils.NANOS_PER_MS; } /** Loading @@ -98,16 +98,16 @@ public final class BackEvent { * @param touchY Absolute Y location of the touch point of this event. * @param progress Value between 0 and 1 on how far along the back gesture is. * @param swipeEdge Indicates which edge the swipe starts from. * @param frameTime frame time of the back event. * @param frameTimeMillis frame time of the back event. */ @FlaggedApi(FLAG_PREDICTIVE_BACK_TIMESTAMP_API) public BackEvent(float touchX, float touchY, float progress, @SwipeEdge int swipeEdge, long frameTime) { long frameTimeMillis) { mTouchX = touchX; mTouchY = touchY; mProgress = progress; mSwipeEdge = swipeEdge; mFrameTime = frameTime; mFrameTimeMillis = frameTimeMillis; } /** Loading Loading @@ -160,8 +160,8 @@ public final class BackEvent { * Returns the frameTime of the BackEvent in milliseconds. Useful for calculating velocity. */ @FlaggedApi(FLAG_PREDICTIVE_BACK_TIMESTAMP_API) public long getFrameTime() { return mFrameTime; public long getFrameTimeMillis() { return mFrameTimeMillis; } @Override Loading @@ -177,7 +177,7 @@ public final class BackEvent { && mTouchY == that.mTouchY && mProgress == that.mProgress && mSwipeEdge == that.mSwipeEdge && mFrameTime == that.mFrameTime; && mFrameTimeMillis == that.mFrameTimeMillis; } @Override Loading @@ -187,7 +187,7 @@ public final class BackEvent { + ", mTouchY=" + mTouchY + ", mProgress=" + mProgress + ", mSwipeEdge=" + mSwipeEdge + ", mFrameTime=" + mFrameTime + "ms" + ", mFrameTimeMillis=" + mFrameTimeMillis + "}"; } }
core/java/android/window/BackMotionEvent.java +9 −9 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import android.view.RemoteAnimationTarget; public final class BackMotionEvent implements Parcelable { private final float mTouchX; private final float mTouchY; private final long mFrameTime; private final long mFrameTimeMillis; private final float mProgress; private final boolean mTriggerBack; Loading @@ -49,7 +49,7 @@ public final class BackMotionEvent implements Parcelable { * * @param touchX Absolute X location of the touch point of this event. * @param touchY Absolute Y location of the touch point of this event. * @param frameTime Event time of the corresponding touch event. * @param frameTimeMillis Event time of the corresponding touch event. * @param progress Value between 0 and 1 on how far along the back gesture is. * @param triggerBack Indicates whether the back arrow is in the triggered state or not * @param swipeEdge Indicates which edge the swipe starts from. Loading @@ -59,14 +59,14 @@ public final class BackMotionEvent implements Parcelable { public BackMotionEvent( float touchX, float touchY, long frameTime, long frameTimeMillis, float progress, boolean triggerBack, @BackEvent.SwipeEdge int swipeEdge, @Nullable RemoteAnimationTarget departingAnimationTarget) { mTouchX = touchX; mTouchY = touchY; mFrameTime = frameTime; mFrameTimeMillis = frameTimeMillis; mProgress = progress; mTriggerBack = triggerBack; mSwipeEdge = swipeEdge; Loading @@ -80,7 +80,7 @@ public final class BackMotionEvent implements Parcelable { mTriggerBack = in.readBoolean(); mSwipeEdge = in.readInt(); mDepartingAnimationTarget = in.readTypedObject(RemoteAnimationTarget.CREATOR); mFrameTime = in.readLong(); mFrameTimeMillis = in.readLong(); } @NonNull Loading Loading @@ -109,7 +109,7 @@ public final class BackMotionEvent implements Parcelable { dest.writeBoolean(mTriggerBack); dest.writeInt(mSwipeEdge); dest.writeTypedObject(mDepartingAnimationTarget, flags); dest.writeLong(mFrameTime); dest.writeLong(mFrameTimeMillis); } /** Loading Loading @@ -156,8 +156,8 @@ public final class BackMotionEvent implements Parcelable { /** * Returns the frame time of the BackMotionEvent in milliseconds. */ public long getFrameTime() { return mFrameTime; public long getFrameTimeMillis() { return mFrameTimeMillis; } /** Loading @@ -175,7 +175,7 @@ public final class BackMotionEvent implements Parcelable { return "BackMotionEvent{" + "mTouchX=" + mTouchX + ", mTouchY=" + mTouchY + ", mFrameTime=" + mFrameTime + "ms" + ", mFrameTimeMillis=" + mFrameTimeMillis + ", mProgress=" + mProgress + ", mTriggerBack=" + mTriggerBack + ", mSwipeEdge=" + mSwipeEdge Loading
core/java/android/window/BackTouchTracker.java +2 −2 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public class BackTouchTracker { return new BackMotionEvent( /* touchX = */ mInitTouchX, /* touchY = */ mInitTouchY, /* frameTime = */ 0, /* frameTimeMillis = */ 0, /* progress = */ 0, /* triggerBack = */ mTriggerBack, /* swipeEdge = */ mSwipeEdge, Loading Loading @@ -236,7 +236,7 @@ public class BackTouchTracker { return new BackMotionEvent( /* touchX = */ mLatestTouchX, /* touchY = */ mLatestTouchY, /* frameTime = */ 0, /* frameTimeMillis = */ 0, /* progress = */ progress, /* triggerBack = */ mTriggerBack, /* swipeEdge = */ mSwipeEdge, Loading
core/java/android/window/ImeOnBackInvokedDispatcher.java +2 −2 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc try { long frameTime = 0; if (predictiveBackTimestampApi()) { frameTime = backEvent.getFrameTime(); frameTime = backEvent.getFrameTimeMillis(); } mIOnBackInvokedCallback.onBackStarted( new BackMotionEvent(backEvent.getTouchX(), backEvent.getTouchY(), frameTime, Loading @@ -254,7 +254,7 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc try { long frameTime = 0; if (predictiveBackTimestampApi()) { frameTime = backEvent.getFrameTime(); frameTime = backEvent.getFrameTimeMillis(); } mIOnBackInvokedCallback.onBackProgressed( new BackMotionEvent(backEvent.getTouchX(), backEvent.getTouchY(), frameTime, Loading