Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -34765,6 +34765,7 @@ package android.os { method public android.os.MessageQueue getMessageQueue(); method public boolean hasMessages(android.os.Handler, Object, int); method public boolean hasMessages(android.os.Handler, Object, Runnable); method @FlaggedApi("android.os.message_queue_testability") public boolean isBlockedOnSyncBarrier(); method public android.os.Message next(); method @FlaggedApi("android.os.message_queue_testability") @Nullable public Long peekWhen(); method @FlaggedApi("android.os.message_queue_testability") @Nullable public android.os.Message pop(); core/java/android/os/TestLooperManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,18 @@ public class TestLooperManager { return mQueue.peekWhenForTest(); } /** * Checks whether the Looper is currently blocked on a sync barrier. * * A Looper is blocked on a sync barrier if there is a Message in the Looper's * queue that is ready for execution but is behind a sync barrier */ @FlaggedApi(Flags.FLAG_MESSAGE_QUEUE_TESTABILITY) public boolean isBlockedOnSyncBarrier() { checkReleased(); return mQueue.isBlockedOnSyncBarrier(); } /** * Releases the looper to continue standard looping and processing of messages, no further * interactions with TestLooperManager will be allowed after release() has been called. Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -34765,6 +34765,7 @@ package android.os { method public android.os.MessageQueue getMessageQueue(); method public boolean hasMessages(android.os.Handler, Object, int); method public boolean hasMessages(android.os.Handler, Object, Runnable); method @FlaggedApi("android.os.message_queue_testability") public boolean isBlockedOnSyncBarrier(); method public android.os.Message next(); method @FlaggedApi("android.os.message_queue_testability") @Nullable public Long peekWhen(); method @FlaggedApi("android.os.message_queue_testability") @Nullable public android.os.Message pop();
core/java/android/os/TestLooperManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,18 @@ public class TestLooperManager { return mQueue.peekWhenForTest(); } /** * Checks whether the Looper is currently blocked on a sync barrier. * * A Looper is blocked on a sync barrier if there is a Message in the Looper's * queue that is ready for execution but is behind a sync barrier */ @FlaggedApi(Flags.FLAG_MESSAGE_QUEUE_TESTABILITY) public boolean isBlockedOnSyncBarrier() { checkReleased(); return mQueue.isBlockedOnSyncBarrier(); } /** * Releases the looper to continue standard looping and processing of messages, no further * interactions with TestLooperManager will be allowed after release() has been called. Loading