Merge "Ensures RotationRequest#mLock can only accquried by main thread." into sc-dev am: dfc852cad5

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

Change-Id: I60653a34f1769454281b4b4b4f9d2847b8e3e15d
This commit is contained in:
Alex Salo
2021-05-25 15:58:46 +00:00
committed by Automerger Merge Worker

View File

@@ -126,14 +126,12 @@ class RemoteRotationResolverService extends ServiceConnector.Impl<IRotationResol
void cancelInternal() {
synchronized (mLock) {
if (mIsFulfilled) {
return;
}
mIsFulfilled = true;
}
Handler.getMain().post(() -> {
synchronized (mLock) {
if (mIsFulfilled) {
return;
}
mIsFulfilled = true;
try {
if (mCancellation != null) {
mCancellation.cancel();