From a4e91e8a22817a482c77e5480fab0e2260bbf1b5 Mon Sep 17 00:00:00 2001 From: Kenneth Ford Date: Tue, 18 Apr 2023 23:25:49 +0000 Subject: [PATCH] Updates visibility constants Bug: 278752452 Test: Build Change-Id: If2c14321093826cfaf237e5425249ddee228732b --- .../window/extensions/area/RearDisplayPresentation.java | 4 ++-- .../window/extensions/area/WindowAreaComponentImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/RearDisplayPresentation.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/RearDisplayPresentation.java index 1ff169433b9d4..849b500f36e49 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/RearDisplayPresentation.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/RearDisplayPresentation.java @@ -42,14 +42,14 @@ class RearDisplayPresentation extends Presentation implements ExtensionWindowAre /** * {@code mStateConsumer} is notified that their content is now visible when the * {@link Presentation} object is started. There is no comparable callback for - * {@link WindowAreaComponent#SESSION_STATE_INVISIBLE} in {@link #onStop()} due to the + * {@link WindowAreaComponent#SESSION_STATE_CONTENT_INVISIBLE} in {@link #onStop()} due to the * timing of when a {@link android.hardware.devicestate.DeviceStateRequest} is cancelled * ending rear display presentation mode happening before the {@link Presentation} is stopped. */ @Override protected void onStart() { super.onStart(); - mStateConsumer.accept(WindowAreaComponent.SESSION_STATE_VISIBLE); + mStateConsumer.accept(WindowAreaComponent.SESSION_STATE_CONTENT_VISIBLE); } @NonNull diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java index cc46a4bc4ea39..c54e597e7e675 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java @@ -328,8 +328,8 @@ public class WindowAreaComponentImpl implements WindowAreaComponent, // due to not having a good mechanism to know when // the content is no longer visible before it's fully removed if (getLastReportedRearDisplayPresentationStatus() - == SESSION_STATE_VISIBLE) { - consumer.accept(SESSION_STATE_INVISIBLE); + == SESSION_STATE_CONTENT_VISIBLE) { + consumer.accept(SESSION_STATE_CONTENT_INVISIBLE); } mRearDisplayPresentationController = null; }