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

Commit 5ebb4380 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [4948448, 4948511, 4948299, 4947854, 4947306, 4946150,...

Merge cherrypicks of [4948448, 4948511, 4948299, 4947854, 4947306, 4946150, 4948531, 4946116, 4948532] into pi-qpr1-release

Change-Id: I0b8f2268cf9796147f18e41506e938d5bbef09c3
parents 644edf83 81fb20a3
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -882,6 +882,33 @@ public class PhoneAccountRegistrarTest extends TelecomTestCase {
                PhoneAccount.CAPABILITY_RTT);
    }

    /**
     * Tests {@link PhoneAccount#equals(Object)} operator.
     * @throws Exception
     */
    @MediumTest
    @Test
    public void testPhoneAccountEquality() throws Exception {
        PhoneAccountHandle handle = new PhoneAccountHandle(new ComponentName("foo", "bar"), "id");
        PhoneAccount.Builder builder = new PhoneAccount.Builder(handle, "label");
        builder.addSupportedUriScheme("tel");
        builder.setAddress(Uri.fromParts("tel", "6505551212", null));
        builder.setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER);
        Bundle extras = new Bundle();
        extras.putInt("INT", 1);
        extras.putString("STR", "str");
        builder.setExtras(extras);
        builder.setGroupId("group");
        builder.setHighlightColor(1);
        builder.setShortDescription("short");
        builder.setSubscriptionAddress(Uri.fromParts("tel", "6505551213", null));
        builder.setSupportedAudioRoutes(2);

        PhoneAccount account1 = builder.build();
        PhoneAccount account2 = builder.build();
        assertEquals(account1, account2);
    }

    private static ComponentName makeQuickConnectionServiceComponentName() {
        return new ComponentName(
                "com.android.server.telecom.tests",