Merge "Return STATUS_UNSUPPORTED if WindowAreaComponent is not supported" into tm-qpr-dev am: 01d602bb62

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21426986

Change-Id: Id7e5fe9824788cfe17de752c5cd7478e872c4515
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Kenneth Ford
2023-03-14 21:24:12 +00:00
committed by Automerger Merge Worker

View File

@@ -187,6 +187,10 @@ public class WindowAreaComponentImpl implements WindowAreaComponent,
@GuardedBy("mLock") @GuardedBy("mLock")
private int getCurrentStatus() { private int getCurrentStatus() {
if (mRearDisplayState == INVALID_DEVICE_STATE) {
return WindowAreaComponent.STATUS_UNSUPPORTED;
}
if (mRearDisplaySessionStatus == WindowAreaComponent.SESSION_STATE_ACTIVE if (mRearDisplaySessionStatus == WindowAreaComponent.SESSION_STATE_ACTIVE
|| isRearDisplayActive()) { || isRearDisplayActive()) {
return WindowAreaComponent.STATUS_UNAVAILABLE; return WindowAreaComponent.STATUS_UNAVAILABLE;