Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81a76e41 authored by Jordan Liu's avatar Jordan Liu
Browse files

Use waitForHandlerAction for less busy waits

We can't completely replace waitUntilPhoneState with this because
handler actions sometimes occur besides transitioning into the expected
state, but we can replace waitForMs with this so that we don't wake
every 10 ms.

Bug: 78297012
Test: ran the test
Change-Id: I8d43b51a59f0c3fe9d47fe61e63742f3173925ff
parent 5bb5c008
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ public class GsmCdmaCallTrackerTest extends TelephonyTest {

    private void waitUntilPhoneState(PhoneConstants.State expected) {
        while (expected != mCTUT.getState()) {
            waitForMs(10);
            waitForHandlerAction(mCTUT, 100);
        }
    }