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

This commit is contained in:
Alex Salo
2021-05-25 15:37:19 +00:00
committed by Android (Google) Code Review

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();