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: Iea908bc56c9b3d4655af5300dd7f2e2aa715b826
This commit is contained in:
@@ -126,14 +126,12 @@ class RemoteRotationResolverService extends ServiceConnector.Impl<IRotationResol
|
|||||||
|
|
||||||
|
|
||||||
void cancelInternal() {
|
void cancelInternal() {
|
||||||
synchronized (mLock) {
|
|
||||||
if (mIsFulfilled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mIsFulfilled = true;
|
|
||||||
}
|
|
||||||
Handler.getMain().post(() -> {
|
Handler.getMain().post(() -> {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
|
if (mIsFulfilled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mIsFulfilled = true;
|
||||||
try {
|
try {
|
||||||
if (mCancellation != null) {
|
if (mCancellation != null) {
|
||||||
mCancellation.cancel();
|
mCancellation.cancel();
|
||||||
|
|||||||
Reference in New Issue
Block a user