Loading services/core/java/com/android/server/wm/InsetsSourceProvider.java +0 −23 Original line number Original line Diff line number Diff line Loading @@ -26,7 +26,6 @@ import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSource import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.FRAME; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.FRAME; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.IS_LEASH_READY_FOR_DISPATCHING; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.IS_LEASH_READY_FOR_DISPATCHING; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.PENDING_CONTROL_TARGET_IDENTIFIER; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.PENDING_CONTROL_TARGET_IDENTIFIER; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SEAMLESS_ROTATING; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SERVER_VISIBLE; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SERVER_VISIBLE; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SOURCE; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SOURCE; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SOURCE_WINDOW_STATE_IDENTIFIER; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SOURCE_WINDOW_STATE_IDENTIFIER; Loading Loading @@ -127,8 +126,6 @@ class InsetsSourceProvider { */ */ private boolean mServerVisible; private boolean mServerVisible; private boolean mSeamlessRotating; private final boolean mControllable; private final boolean mControllable; InsetsSourceProvider(@NonNull InsetsSource source, InsetsSourceProvider(@NonNull InsetsSource source, Loading Loading @@ -221,7 +218,6 @@ class InsetsSourceProvider { // animate-out as new one animates-in. // animate-out as new one animates-in. mWin.cancelAnimation(); mWin.cancelAnimation(); mWin.getInsetsSourceProviders().remove(mSource.getId()); mWin.getInsetsSourceProviders().remove(mSource.getId()); mSeamlessRotating = false; mHasPendingPosition = false; mHasPendingPosition = false; } } ProtoLog.d(WM_DEBUG_WINDOW_INSETS, "setWin %s for type %s", ProtoLog.d(WM_DEBUG_WINDOW_INSETS, "setWin %s for type %s", Loading Loading @@ -472,11 +468,6 @@ class InsetsSourceProvider { void updateControlForTarget(@Nullable InsetsControlTarget target, boolean force, void updateControlForTarget(@Nullable InsetsControlTarget target, boolean force, @Nullable ImeTracker.Token statsToken) { @Nullable ImeTracker.Token statsToken) { if (mSeamlessRotating) { // We are un-rotating the window against the display rotation. We don't want the target // to control the window for now. return; } mPendingControlTarget = target; mPendingControlTarget = target; if (mWin != null && mWin.getSurfaceControl() == null) { if (mWin != null && mWin.getSurfaceControl() == null) { Loading Loading @@ -567,19 +558,6 @@ class InsetsSourceProvider { mStateController.notifySurfaceTransactionReady(this, 0, false); mStateController.notifySurfaceTransactionReady(this, 0, false); } } void startSeamlessRotation() { if (!mSeamlessRotating) { mSeamlessRotating = true; if (mWin != null) { mWin.cancelAnimation(); } } } void finishSeamlessRotation() { mSeamlessRotating = false; } boolean updateClientVisibility(@NonNull InsetsTarget caller, boolean updateClientVisibility(@NonNull InsetsTarget caller, @Nullable ImeTracker.Token statsToken) { @Nullable ImeTracker.Token statsToken) { final boolean requestedVisible = caller.isRequestedVisible(mSource.getType()); final boolean requestedVisible = caller.isRequestedVisible(mSource.getType()); Loading Loading @@ -772,7 +750,6 @@ class InsetsSourceProvider { proto.write(IS_LEASH_READY_FOR_DISPATCHING, isLeashReadyForDispatching()); proto.write(IS_LEASH_READY_FOR_DISPATCHING, isLeashReadyForDispatching()); proto.write(CLIENT_VISIBLE, mClientVisible); proto.write(CLIENT_VISIBLE, mClientVisible); proto.write(SERVER_VISIBLE, mServerVisible); proto.write(SERVER_VISIBLE, mServerVisible); proto.write(SEAMLESS_ROTATING, mSeamlessRotating); proto.write(CONTROLLABLE, mControllable); proto.write(CONTROLLABLE, mControllable); if (mWin != null) { if (mWin != null) { mWin.writeIdentifierToProto(proto, SOURCE_WINDOW_STATE_IDENTIFIER); mWin.writeIdentifierToProto(proto, SOURCE_WINDOW_STATE_IDENTIFIER); Loading services/tests/wmtests/src/com/android/server/wm/InsetsSourceProviderTest.java +0 −15 Original line number Original line Diff line number Diff line Loading @@ -132,21 +132,6 @@ public class InsetsSourceProviderTest extends WindowTestsBase { assertNotNull(mProvider.getControl(target)); assertNotNull(mProvider.getControl(target)); assertNotNull(mProvider.getControlTarget()); assertNotNull(mProvider.getControlTarget()); // We must not have control or control target while we are performing seamless rotation. // And the control and the control target must not be updated during that. mProvider.startSeamlessRotation(); assertNull(mProvider.getControl(target)); assertNull(mProvider.getControlTarget()); mProvider.updateControlForTarget(target, true /* force */, null /* statsToken */); assertNull(mProvider.getControl(target)); assertNull(mProvider.getControlTarget()); // We can have the control and the control target after seamless rotation. mProvider.finishSeamlessRotation(); mProvider.updateControlForTarget(target, false /* force */, null /* statsToken */); assertNotNull(mProvider.getControl(target)); assertNotNull(mProvider.getControlTarget()); // We can clear the control and the control target. // We can clear the control and the control target. mProvider.updateControlForTarget(null, false /* force */, null /* statsToken */); mProvider.updateControlForTarget(null, false /* force */, null /* statsToken */); assertNull(mProvider.getControl(target)); assertNull(mProvider.getControl(target)); Loading Loading
services/core/java/com/android/server/wm/InsetsSourceProvider.java +0 −23 Original line number Original line Diff line number Diff line Loading @@ -26,7 +26,6 @@ import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSource import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.FRAME; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.FRAME; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.IS_LEASH_READY_FOR_DISPATCHING; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.IS_LEASH_READY_FOR_DISPATCHING; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.PENDING_CONTROL_TARGET_IDENTIFIER; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.PENDING_CONTROL_TARGET_IDENTIFIER; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SEAMLESS_ROTATING; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SERVER_VISIBLE; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SERVER_VISIBLE; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SOURCE; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SOURCE; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SOURCE_WINDOW_STATE_IDENTIFIER; import static android.internal.perfetto.protos.Windowmanagerservice.InsetsSourceProviderProto.SOURCE_WINDOW_STATE_IDENTIFIER; Loading Loading @@ -127,8 +126,6 @@ class InsetsSourceProvider { */ */ private boolean mServerVisible; private boolean mServerVisible; private boolean mSeamlessRotating; private final boolean mControllable; private final boolean mControllable; InsetsSourceProvider(@NonNull InsetsSource source, InsetsSourceProvider(@NonNull InsetsSource source, Loading Loading @@ -221,7 +218,6 @@ class InsetsSourceProvider { // animate-out as new one animates-in. // animate-out as new one animates-in. mWin.cancelAnimation(); mWin.cancelAnimation(); mWin.getInsetsSourceProviders().remove(mSource.getId()); mWin.getInsetsSourceProviders().remove(mSource.getId()); mSeamlessRotating = false; mHasPendingPosition = false; mHasPendingPosition = false; } } ProtoLog.d(WM_DEBUG_WINDOW_INSETS, "setWin %s for type %s", ProtoLog.d(WM_DEBUG_WINDOW_INSETS, "setWin %s for type %s", Loading Loading @@ -472,11 +468,6 @@ class InsetsSourceProvider { void updateControlForTarget(@Nullable InsetsControlTarget target, boolean force, void updateControlForTarget(@Nullable InsetsControlTarget target, boolean force, @Nullable ImeTracker.Token statsToken) { @Nullable ImeTracker.Token statsToken) { if (mSeamlessRotating) { // We are un-rotating the window against the display rotation. We don't want the target // to control the window for now. return; } mPendingControlTarget = target; mPendingControlTarget = target; if (mWin != null && mWin.getSurfaceControl() == null) { if (mWin != null && mWin.getSurfaceControl() == null) { Loading Loading @@ -567,19 +558,6 @@ class InsetsSourceProvider { mStateController.notifySurfaceTransactionReady(this, 0, false); mStateController.notifySurfaceTransactionReady(this, 0, false); } } void startSeamlessRotation() { if (!mSeamlessRotating) { mSeamlessRotating = true; if (mWin != null) { mWin.cancelAnimation(); } } } void finishSeamlessRotation() { mSeamlessRotating = false; } boolean updateClientVisibility(@NonNull InsetsTarget caller, boolean updateClientVisibility(@NonNull InsetsTarget caller, @Nullable ImeTracker.Token statsToken) { @Nullable ImeTracker.Token statsToken) { final boolean requestedVisible = caller.isRequestedVisible(mSource.getType()); final boolean requestedVisible = caller.isRequestedVisible(mSource.getType()); Loading Loading @@ -772,7 +750,6 @@ class InsetsSourceProvider { proto.write(IS_LEASH_READY_FOR_DISPATCHING, isLeashReadyForDispatching()); proto.write(IS_LEASH_READY_FOR_DISPATCHING, isLeashReadyForDispatching()); proto.write(CLIENT_VISIBLE, mClientVisible); proto.write(CLIENT_VISIBLE, mClientVisible); proto.write(SERVER_VISIBLE, mServerVisible); proto.write(SERVER_VISIBLE, mServerVisible); proto.write(SEAMLESS_ROTATING, mSeamlessRotating); proto.write(CONTROLLABLE, mControllable); proto.write(CONTROLLABLE, mControllable); if (mWin != null) { if (mWin != null) { mWin.writeIdentifierToProto(proto, SOURCE_WINDOW_STATE_IDENTIFIER); mWin.writeIdentifierToProto(proto, SOURCE_WINDOW_STATE_IDENTIFIER); Loading
services/tests/wmtests/src/com/android/server/wm/InsetsSourceProviderTest.java +0 −15 Original line number Original line Diff line number Diff line Loading @@ -132,21 +132,6 @@ public class InsetsSourceProviderTest extends WindowTestsBase { assertNotNull(mProvider.getControl(target)); assertNotNull(mProvider.getControl(target)); assertNotNull(mProvider.getControlTarget()); assertNotNull(mProvider.getControlTarget()); // We must not have control or control target while we are performing seamless rotation. // And the control and the control target must not be updated during that. mProvider.startSeamlessRotation(); assertNull(mProvider.getControl(target)); assertNull(mProvider.getControlTarget()); mProvider.updateControlForTarget(target, true /* force */, null /* statsToken */); assertNull(mProvider.getControl(target)); assertNull(mProvider.getControlTarget()); // We can have the control and the control target after seamless rotation. mProvider.finishSeamlessRotation(); mProvider.updateControlForTarget(target, false /* force */, null /* statsToken */); assertNotNull(mProvider.getControl(target)); assertNotNull(mProvider.getControlTarget()); // We can clear the control and the control target. // We can clear the control and the control target. mProvider.updateControlForTarget(null, false /* force */, null /* statsToken */); mProvider.updateControlForTarget(null, false /* force */, null /* statsToken */); assertNull(mProvider.getControl(target)); assertNull(mProvider.getControl(target)); Loading