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

Commit d393a06f authored by Hall Liu's avatar Hall Liu Committed by Gerrit Code Review
Browse files

Merge "Fix the self-managed call tests"

parents 0f128dd3 1841c563
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -857,13 +857,19 @@ public class TelecomSystemTest extends TelecomTestCase {
        //Wait for/Verify call blocking happened asynchronously
        incomingCallAddedLatch.await(TEST_TIMEOUT, TimeUnit.MILLISECONDS);

        // Do the blocked number check only for non-self-managed calls
        PhoneAccount pa = mTelecomSystem.getPhoneAccountRegistrar()
                .getPhoneAccount(phoneAccountHandle, phoneAccountHandle.getUserHandle());
        if (!pa.hasCapabilities(PhoneAccount.CAPABILITY_SELF_MANAGED)) {
            IContentProvider blockedNumberProvider =
                mSpyContext.getContentResolver().acquireProvider(BlockedNumberContract.AUTHORITY);
                    mSpyContext.getContentResolver().acquireProvider(
                            BlockedNumberContract.AUTHORITY);
            verify(blockedNumberProvider, timeout(TEST_TIMEOUT)).call(
                    anyString(),
                    eq(BlockedNumberContract.SystemContract.METHOD_SHOULD_SYSTEM_BLOCK_NUMBER),
                    eq(number),
                    isNotNull(Bundle.class));
        }

        // For the case of incoming calls, Telecom connecting the InCall services and adding the
        // Call is triggered by the async completion of the CallerInfoAsyncQuery. Once the Call