Merge "Fix stuck screen from display change timeout" am: 2421332152
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2388832 Change-Id: Ifc7d98f41948ca3bf6572f523f7b69ca5aa103b9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -114,10 +114,16 @@ public class RemoteDisplayChangeController {
|
|||||||
// timed-out, so run all continue callbacks and clear the list
|
// timed-out, so run all continue callbacks and clear the list
|
||||||
synchronized (mService.mGlobalLock) {
|
synchronized (mService.mGlobalLock) {
|
||||||
for (int i = 0; i < mCallbacks.size(); ++i) {
|
for (int i = 0; i < mCallbacks.size(); ++i) {
|
||||||
mCallbacks.get(i).onContinueRemoteDisplayChange(null /* transaction */);
|
final ContinueRemoteDisplayChangeCallback callback = mCallbacks.get(i);
|
||||||
}
|
if (i == mCallbacks.size() - 1) {
|
||||||
|
// Clear all callbacks before calling the last one, so that if the callback
|
||||||
|
// itself calls {@link #isWaitingForRemoteDisplayChange()}, it will get
|
||||||
|
// {@code false}. After all, there is nothing pending after this one.
|
||||||
mCallbacks.clear();
|
mCallbacks.clear();
|
||||||
}
|
}
|
||||||
|
callback.onContinueRemoteDisplayChange(null /* transaction */);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void continueDisplayChange(@NonNull ContinueRemoteDisplayChangeCallback callback,
|
private void continueDisplayChange(@NonNull ContinueRemoteDisplayChangeCallback callback,
|
||||||
|
|||||||
Reference in New Issue
Block a user