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

Commit 64883a94 authored by Nancy Chen's avatar Nancy Chen Committed by Android (Google) Code Review
Browse files

Merge "Adn queries for multi-SIM. (3/3)" into lmp-mr1-dev

parents 6e557e04 c28f2602
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
@@ -479,6 +480,26 @@ public class TelecomServiceImpl extends ITelecomService.Stub {
        return retval;
    }

    /**
     * @see android.telecom.TelecomManager#getAdnUriForPhoneAccount
     */
    @Override
    public Uri getAdnUriForPhoneAccount(PhoneAccountHandle accountHandle) {
        enforceModifyPermissionOrDefaultDialer();

        // Switch identity so that TelephonyManager checks Telecom's permissions instead.
        long token = Binder.clearCallingIdentity();
        String retval = "content://icc/adn/";
        try {
            long subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle);
            retval = retval + "subId/" + subId;
        } finally {
            Binder.restoreCallingIdentity(token);
        }

        return Uri.parse(retval);
    }

    /**
     * @see android.telecom.TelecomManager#isTtySupported
     */