From 0ede291ce70eee2462548f4d313d77f83938a8c2 Mon Sep 17 00:00:00 2001 From: Kenneth Ford Date: Wed, 3 May 2023 01:42:59 +0000 Subject: [PATCH] Removes use of SESSION_STATE_CONTENT_INVISIBLE Simplifies the session lifecycle by removing the use of content invisible. By returning the active constant after visible it can be inferred that the content is no longer visible Bug: 273348893 Test: ExtensionRearDisplayPresentationTest Change-Id: Ie1cde24841eb21703e824de297e1dcc3fce9a3a3 --- .../window/extensions/area/WindowAreaComponentImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 abf2301170323..b374ae35f57f8 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java @@ -324,12 +324,12 @@ public class WindowAreaComponentImpl implements WindowAreaComponent, synchronized (mLock) { if (stateStatus == SESSION_STATE_INACTIVE) { // If the last reported session status was VISIBLE - // then the INVISIBLE state should be dispatched before INACTIVE + // then the ACTIVE state should be dispatched before INACTIVE // 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_CONTENT_VISIBLE) { - consumer.accept(SESSION_STATE_CONTENT_INVISIBLE); + consumer.accept(SESSION_STATE_ACTIVE); } mRearDisplayPresentationController = null; }