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

Commit 1841c563 authored by Hall Liu's avatar Hall Liu
Browse files

Fix the self-managed call tests

Don't check that call blocking was invoked if the call is a self-managed
call.

Bug: 80134428
Test: unit tests
Change-Id: Ie1551f493925632e7fd0571eb4329db503307e82
parent 641a7db2
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