Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 917d21ac authored by Anvesh Renikindi's avatar Anvesh Renikindi Committed by Android (Google) Code Review
Browse files

Merge "Updates visibility constants" into udc-dev

parents 645d0899 a4e91e8a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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;
                            }