Merge "Report negative proximity if we lose the prox sensor" into tm-qpr-dev am: 257efc5ad5

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

Change-Id: I56e6252f42f094fa6a2e4d75920f0e0ffe85cfe7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Piotr Wilczyński
2023-03-13 13:24:21 +00:00
committed by Automerger Merge Worker

View File

@@ -1372,8 +1372,17 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
sendOnProximityNegativeWithWakelock();
}
} else {
setProximitySensorEnabled(false);
mWaitingForNegativeProximity = false;
mIgnoreProximityUntilChanged = false;
if (mScreenOffBecauseOfProximity) {
// The screen *was* off due to prox being near, but now there's no prox sensor, so
// let's turn the screen back on.
mScreenOffBecauseOfProximity = false;
skipRampBecauseOfProximityChangeToNegative = true;
sendOnProximityNegativeWithWakelock();
}
}
if (!mIsEnabled