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

Commit 6f4678ec authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "Fix the self-managed call tests"

am: d393a06f

Change-Id: I5230a2b8612e88ed58875dec3ba46e7b2a0d5d79
parents b0246ed6 d393a06f
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