mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Also fix thread blocking nullness assertion when called from non-Looper
PiperOrigin-RevId: 354268013
This commit is contained in:
parent
60f3d8168c
commit
ae51e2e1d1
1 changed files with 5 additions and 0 deletions
|
|
@ -140,6 +140,11 @@ public class FakeClock implements Clock {
|
|||
|
||||
@Override
|
||||
public synchronized void onThreadBlocked() {
|
||||
@Nullable Looper currentLooper = Looper.myLooper();
|
||||
if (currentLooper == null || !waitingForMessage) {
|
||||
// This isn't a looper message created by this class, so no need to handle the blocking.
|
||||
return;
|
||||
}
|
||||
busyLoopers.add(checkNotNull(Looper.myLooper()));
|
||||
waitingForMessage = false;
|
||||
maybeTriggerMessage();
|
||||
|
|
|
|||
Loading…
Reference in a new issue