Loading core/java/android/view/InsetsController.java +1 −4 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ import static android.view.WindowInsets.Type.captionBar; import static android.view.WindowInsets.Type.ime; import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.window.flags.Flags.insetsControlSeq; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; Loading Loading @@ -877,9 +876,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @InsetsType int visibleTypes = 0; @InsetsType int[] cancelledUserAnimationTypes = {0}; for (int i = 0, size = newState.sourceSize(); i < size; i++) { final InsetsSource source = insetsControlSeq() ? new InsetsSource(newState.sourceAt(i)) : newState.sourceAt(i); final InsetsSource source = new InsetsSource(newState.sourceAt(i)); @InsetsType int type = source.getType(); @AnimationType int animationType = getAnimationType(type); final InsetsSourceConsumer consumer = mSourceConsumers.get(source.getId()); Loading core/java/android/view/InsetsSourceConsumer.java +0 −4 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ import static android.view.InsetsSourceConsumerProto.SOURCE_CONTROL; import static android.view.InsetsSourceConsumerProto.TYPE_NUMBER; import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.window.flags.Flags.insetsControlSeq; import android.annotation.IntDef; import android.annotation.Nullable; Loading Loading @@ -431,9 +430,6 @@ public class InsetsSourceConsumer { // Frame is changing while animating. Keep note of the new frame but keep existing frame // until animation is finished. if (!insetsControlSeq()) { newSource = new InsetsSource(newSource); } mPendingFrame = new Rect(newSource.getFrame()); mPendingVisibleFrame = newSource.getVisibleFrame() != null ? new Rect(newSource.getVisibleFrame()) Loading core/java/android/view/ViewRootImpl.java +12 −23 Original line number Diff line number Diff line Loading @@ -130,7 +130,6 @@ import static android.window.flags.DesktopModeFlags.ENABLE_CAPTION_COMPAT_INSET_ 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.insetsControlSeq; import static com.android.window.flags.Flags.setScPropertiesInClient; import static com.android.window.flags.Flags.systemUiImmersiveConfirmationDialog; Loading Loading @@ -888,10 +887,7 @@ public final class ViewRootImpl implements ViewParent, /** Non-{@code null} if {@link #mActivityConfigCallback} is not {@code null}. */ @Nullable private ActivityWindowInfo mLastReportedActivityWindowInfo; @Nullable private final ClientWindowFrames mLastReportedFrames = insetsControlSeq() ? new ClientWindowFrames() : null; private final ClientWindowFrames mLastReportedFrames = new ClientWindowFrames(); private int mLastReportedInsetsStateSeq = getInitSeq(); private int mLastReportedActiveControlsSeq = getInitSeq(); Loading Loading @@ -2316,9 +2312,6 @@ public final class ViewRootImpl implements ViewParent, } private void onClientWindowFramesChanged(@NonNull ClientWindowFrames inOutFrames) { if (mLastReportedFrames == null) { return; } if (isIncomingSeqStale(mLastReportedFrames.seq, inOutFrames.seq)) { // If the incoming is stale, use the last reported instead. inOutFrames.setTo(mLastReportedFrames); Loading @@ -2329,14 +2322,12 @@ public final class ViewRootImpl implements ViewParent, } private void onInsetsStateChanged(@NonNull InsetsState insetsState) { if (insetsControlSeq()) { if (isIncomingSeqStale(mLastReportedInsetsStateSeq, insetsState.getSeq())) { // The incoming is stale. Skip. return; } // Keep track of the latest. mLastReportedInsetsStateSeq = insetsState.getSeq(); } if (mTranslator != null) { mTranslator.translateInsetsStateInScreenToAppWindow(insetsState); Loading @@ -2351,7 +2342,6 @@ public final class ViewRootImpl implements ViewParent, return; } if (insetsControlSeq()) { if (isIncomingSeqStale(mLastReportedActiveControlsSeq, activeControls.getSeq())) { // The incoming is stale. Skip. activeControls.release(); Loading @@ -2359,7 +2349,6 @@ public final class ViewRootImpl implements ViewParent, } // Keep track of the latest. mLastReportedActiveControlsSeq = activeControls.getSeq(); } final InsetsSourceControl[] controls = activeControls.get(); if (mTranslator != null) { Loading core/java/android/window/flags/windowing_sdk.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -66,17 +66,6 @@ flag { bug: "293658614" } flag { namespace: "windowing_sdk" name: "insets_control_seq" description: "Add seqId to InsetsControls to ensure the stale update is ignored" bug: "339380439" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "move_animation_options_to_change" Loading core/tests/coretests/src/android/view/ViewRootImplTest.java +0 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ import android.graphics.Rect; import android.hardware.display.DisplayManagerGlobal; import android.os.Binder; import android.os.SystemProperties; import android.platform.test.annotations.EnableFlags; import android.platform.test.annotations.Presubmit; import android.platform.test.annotations.RequiresFlagsEnabled; import android.platform.test.flag.junit.CheckFlagsRule; Loading Loading @@ -1599,7 +1598,6 @@ public class ViewRootImplTest { nativeCreateASurfaceControlFromSurface(mViewRootImpl.mSurface)); } @EnableFlags(Flags.FLAG_INSETS_CONTROL_SEQ) @Test public void testHandleInsetsControlChanged() { mView = new View(sContext); Loading Loading
core/java/android/view/InsetsController.java +1 −4 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ import static android.view.WindowInsets.Type.captionBar; import static android.view.WindowInsets.Type.ime; import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.window.flags.Flags.insetsControlSeq; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; Loading Loading @@ -877,9 +876,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @InsetsType int visibleTypes = 0; @InsetsType int[] cancelledUserAnimationTypes = {0}; for (int i = 0, size = newState.sourceSize(); i < size; i++) { final InsetsSource source = insetsControlSeq() ? new InsetsSource(newState.sourceAt(i)) : newState.sourceAt(i); final InsetsSource source = new InsetsSource(newState.sourceAt(i)); @InsetsType int type = source.getType(); @AnimationType int animationType = getAnimationType(type); final InsetsSourceConsumer consumer = mSourceConsumers.get(source.getId()); Loading
core/java/android/view/InsetsSourceConsumer.java +0 −4 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ import static android.view.InsetsSourceConsumerProto.SOURCE_CONTROL; import static android.view.InsetsSourceConsumerProto.TYPE_NUMBER; import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.window.flags.Flags.insetsControlSeq; import android.annotation.IntDef; import android.annotation.Nullable; Loading Loading @@ -431,9 +430,6 @@ public class InsetsSourceConsumer { // Frame is changing while animating. Keep note of the new frame but keep existing frame // until animation is finished. if (!insetsControlSeq()) { newSource = new InsetsSource(newSource); } mPendingFrame = new Rect(newSource.getFrame()); mPendingVisibleFrame = newSource.getVisibleFrame() != null ? new Rect(newSource.getVisibleFrame()) Loading
core/java/android/view/ViewRootImpl.java +12 −23 Original line number Diff line number Diff line Loading @@ -130,7 +130,6 @@ import static android.window.flags.DesktopModeFlags.ENABLE_CAPTION_COMPAT_INSET_ 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.insetsControlSeq; import static com.android.window.flags.Flags.setScPropertiesInClient; import static com.android.window.flags.Flags.systemUiImmersiveConfirmationDialog; Loading Loading @@ -888,10 +887,7 @@ public final class ViewRootImpl implements ViewParent, /** Non-{@code null} if {@link #mActivityConfigCallback} is not {@code null}. */ @Nullable private ActivityWindowInfo mLastReportedActivityWindowInfo; @Nullable private final ClientWindowFrames mLastReportedFrames = insetsControlSeq() ? new ClientWindowFrames() : null; private final ClientWindowFrames mLastReportedFrames = new ClientWindowFrames(); private int mLastReportedInsetsStateSeq = getInitSeq(); private int mLastReportedActiveControlsSeq = getInitSeq(); Loading Loading @@ -2316,9 +2312,6 @@ public final class ViewRootImpl implements ViewParent, } private void onClientWindowFramesChanged(@NonNull ClientWindowFrames inOutFrames) { if (mLastReportedFrames == null) { return; } if (isIncomingSeqStale(mLastReportedFrames.seq, inOutFrames.seq)) { // If the incoming is stale, use the last reported instead. inOutFrames.setTo(mLastReportedFrames); Loading @@ -2329,14 +2322,12 @@ public final class ViewRootImpl implements ViewParent, } private void onInsetsStateChanged(@NonNull InsetsState insetsState) { if (insetsControlSeq()) { if (isIncomingSeqStale(mLastReportedInsetsStateSeq, insetsState.getSeq())) { // The incoming is stale. Skip. return; } // Keep track of the latest. mLastReportedInsetsStateSeq = insetsState.getSeq(); } if (mTranslator != null) { mTranslator.translateInsetsStateInScreenToAppWindow(insetsState); Loading @@ -2351,7 +2342,6 @@ public final class ViewRootImpl implements ViewParent, return; } if (insetsControlSeq()) { if (isIncomingSeqStale(mLastReportedActiveControlsSeq, activeControls.getSeq())) { // The incoming is stale. Skip. activeControls.release(); Loading @@ -2359,7 +2349,6 @@ public final class ViewRootImpl implements ViewParent, } // Keep track of the latest. mLastReportedActiveControlsSeq = activeControls.getSeq(); } final InsetsSourceControl[] controls = activeControls.get(); if (mTranslator != null) { Loading
core/java/android/window/flags/windowing_sdk.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -66,17 +66,6 @@ flag { bug: "293658614" } flag { namespace: "windowing_sdk" name: "insets_control_seq" description: "Add seqId to InsetsControls to ensure the stale update is ignored" bug: "339380439" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "move_animation_options_to_change" Loading
core/tests/coretests/src/android/view/ViewRootImplTest.java +0 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ import android.graphics.Rect; import android.hardware.display.DisplayManagerGlobal; import android.os.Binder; import android.os.SystemProperties; import android.platform.test.annotations.EnableFlags; import android.platform.test.annotations.Presubmit; import android.platform.test.annotations.RequiresFlagsEnabled; import android.platform.test.flag.junit.CheckFlagsRule; Loading Loading @@ -1599,7 +1598,6 @@ public class ViewRootImplTest { nativeCreateASurfaceControlFromSurface(mViewRootImpl.mSurface)); } @EnableFlags(Flags.FLAG_INSETS_CONTROL_SEQ) @Test public void testHandleInsetsControlChanged() { mView = new View(sContext); Loading