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

Commit d90b41e0 authored by Nancy Chen's avatar Nancy Chen Committed by Natiq Ahmed
Browse files

Adn queries for multi-SIM. (2/3)

Define a method in Telecom to take in a subscription account and return
the URI for an ADN query for that account

Bug: 17917937
Conflicts:
	api/current.txt

Change-Id: Ic50a4add7fe44a5164271dc9c9e5a58e45e72336
parent 6c973406
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28186,6 +28186,7 @@ package android.telecom {
  public class TelecomManager {
    method public void cancelMissedCallsNotification();
    method public android.net.Uri getAdnUriForPhoneAccount(android.telecom.PhoneAccountHandle);
    method public boolean handleMmi(java.lang.String);
    method public boolean handleMmi(android.telecom.PhoneAccountHandle, java.lang.String);
    method public boolean isInCall();
+21 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package android.telecom;
import android.annotation.SystemApi;
import android.content.ComponentName;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -997,6 +998,26 @@ public class TelecomManager {
        return false;
    }

    /**
     * @param accountHandle The handle for the account to derive an adn query URI for or
     * {@code null} to return a URI which will use the default account.
     * @return The URI (with the content:// scheme) specific to the specified {@link PhoneAccount}
     * for the the content retrieve.
     * @hide
     */
    @SystemApi
    public Uri getAdnUriForPhoneAccount(PhoneAccountHandle accountHandle) {
        ITelecomService service = getTelecomService();
        if (service != null && accountHandle != null) {
            try {
                return service.getAdnUriForPhoneAccount(accountHandle);
            } catch (RemoteException e) {
                Log.e(TAG, "Error calling ITelecomService#getAdnUriForPhoneAccount", e);
            }
        }
        return Uri.parse("content://icc/adn");
    }

    /**
     * Removes the missed-call notification if one is present.
     * <p>
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.internal.telecom;

import android.content.ComponentName;
import android.telecom.PhoneAccountHandle;
import android.net.Uri;
import android.os.Bundle;
import android.telecom.PhoneAccount;

@@ -173,6 +174,11 @@ interface ITelecomService {
     */
    boolean handlePinMmiForPhoneAccount(in PhoneAccountHandle accountHandle, String dialString);

    /**
     * @see TelecomServiceImpl#getAdnUriForPhoneAccount
     */
    Uri getAdnUriForPhoneAccount(in PhoneAccountHandle accountHandle);

    /**
     * @see TelecomServiceImpl#isTtySupported
     */