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

Commit 00cf9fbf authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Send featureId to Telecomm noteOps

Bug: 136595429
Test: built
Change-Id: I23a12cd4453096e39dfd22ba556e3f3bc9d19319
parent b22fc1be
Loading
Loading
Loading
Loading
+22 −14
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.Executor;

/**
@@ -882,7 +883,8 @@ public class TelecomManager {
     */
    public TelecomManager(Context context, ITelecomService telecomServiceImpl) {
        Context appContext = context.getApplicationContext();
        if (appContext != null) {
        if (appContext != null && Objects.equals(context.getFeatureId(),
                appContext.getFeatureId())) {
            mContext = appContext;
        } else {
            mContext = context;
@@ -916,7 +918,7 @@ public class TelecomManager {
        try {
            if (isServiceConnected()) {
                return getTelecomService().getDefaultOutgoingPhoneAccount(uriScheme,
                        mContext.getOpPackageName());
                        mContext.getOpPackageName(), mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelecomService#getDefaultOutgoingPhoneAccount", e);
@@ -1113,7 +1115,8 @@ public class TelecomManager {
    public List<PhoneAccountHandle> getSelfManagedPhoneAccounts() {
        try {
            if (isServiceConnected()) {
                return getTelecomService().getSelfManagedPhoneAccounts(mContext.getOpPackageName());
                return getTelecomService().getSelfManagedPhoneAccounts(mContext.getOpPackageName(),
                        mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelecomService#getSelfManagedPhoneAccounts()", e);
@@ -1138,8 +1141,8 @@ public class TelecomManager {
            boolean includeDisabledAccounts) {
        try {
            if (isServiceConnected()) {
                return getTelecomService().getCallCapablePhoneAccounts(
                        includeDisabledAccounts, mContext.getOpPackageName());
                return getTelecomService().getCallCapablePhoneAccounts(includeDisabledAccounts,
                        mContext.getOpPackageName(), mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelecomService#getCallCapablePhoneAccounts(" +
@@ -1442,7 +1445,7 @@ public class TelecomManager {
        try {
            if (isServiceConnected()) {
                return getTelecomService().isVoiceMailNumber(accountHandle, number,
                        mContext.getOpPackageName());
                        mContext.getOpPackageName(), mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException calling ITelecomService#isVoiceMailNumber.", e);
@@ -1464,7 +1467,7 @@ public class TelecomManager {
        try {
            if (isServiceConnected()) {
                return getTelecomService().getVoiceMailNumber(accountHandle,
                        mContext.getOpPackageName());
                        mContext.getOpPackageName(), mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException calling ITelecomService#hasVoiceMailNumber.", e);
@@ -1485,7 +1488,7 @@ public class TelecomManager {
        try {
            if (isServiceConnected()) {
                return getTelecomService().getLine1Number(accountHandle,
                        mContext.getOpPackageName());
                        mContext.getOpPackageName(), mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException calling ITelecomService#getLine1Number.", e);
@@ -1506,7 +1509,8 @@ public class TelecomManager {
    public boolean isInCall() {
        try {
            if (isServiceConnected()) {
                return getTelecomService().isInCall(mContext.getOpPackageName());
                return getTelecomService().isInCall(mContext.getOpPackageName(),
                        mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException calling isInCall().", e);
@@ -1531,7 +1535,8 @@ public class TelecomManager {
    public boolean isInManagedCall() {
        try {
            if (isServiceConnected()) {
                return getTelecomService().isInManagedCall(mContext.getOpPackageName());
                return getTelecomService().isInManagedCall(mContext.getOpPackageName(),
                        mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException calling isInManagedCall().", e);
@@ -1711,7 +1716,8 @@ public class TelecomManager {
    public boolean isTtySupported() {
        try {
            if (isServiceConnected()) {
                return getTelecomService().isTtySupported(mContext.getOpPackageName());
                return getTelecomService().isTtySupported(mContext.getOpPackageName(),
                        mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException attempting to get TTY supported state.", e);
@@ -1735,7 +1741,8 @@ public class TelecomManager {
    public @TtyMode int getCurrentTtyMode() {
        try {
            if (isServiceConnected()) {
                return getTelecomService().getCurrentTtyMode(mContext.getOpPackageName());
                return getTelecomService().getCurrentTtyMode(mContext.getOpPackageName(),
                        mContext.getFeatureId());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException attempting to get the current TTY mode.", e);
@@ -1925,7 +1932,8 @@ public class TelecomManager {
        ITelecomService service = getTelecomService();
        if (service != null) {
            try {
                service.showInCallScreen(showDialpad, mContext.getOpPackageName());
                service.showInCallScreen(showDialpad, mContext.getOpPackageName(),
                        mContext.getFeatureId());
            } catch (RemoteException e) {
                Log.e(TAG, "Error calling ITelecomService#showCallScreen", e);
            }
@@ -1988,7 +1996,7 @@ public class TelecomManager {
            }
            try {
                service.placeCall(address, extras == null ? new Bundle() : extras,
                        mContext.getOpPackageName());
                        mContext.getOpPackageName(), mContext.getFeatureId());
            } catch (RemoteException e) {
                Log.e(TAG, "Error calling ITelecomService#placeCall", e);
            }
+16 −12
Original line number Diff line number Diff line
@@ -35,12 +35,13 @@ interface ITelecomService {
     *
     * @param showDialpad if true, make the dialpad visible initially.
     */
    void showInCallScreen(boolean showDialpad, String callingPackage);
    void showInCallScreen(boolean showDialpad, String callingPackage, String callingFeatureId);

    /**
     * @see TelecomServiceImpl#getDefaultOutgoingPhoneAccount
     */
    PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme, String callingPackage);
    PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme, String callingPackage,
            String callingFeatureId);

    /**
     * @see TelecomServiceImpl#getUserSelectedOutgoingPhoneAccount
@@ -56,12 +57,13 @@ interface ITelecomService {
     * @see TelecomServiceImpl#getCallCapablePhoneAccounts
     */
    List<PhoneAccountHandle> getCallCapablePhoneAccounts(
            boolean includeDisabledAccounts, String callingPackage);
            boolean includeDisabledAccounts, String callingPackage, String callingFeatureId);

    /**
     * @see TelecomServiceImpl#getSelfManagedPhoneAccounts
     */
    List<PhoneAccountHandle> getSelfManagedPhoneAccounts(String callingPackage);
    List<PhoneAccountHandle> getSelfManagedPhoneAccounts(String callingPackage,
            String callingFeatureId);

    /**
     * @see TelecomManager#getPhoneAccountsSupportingScheme
@@ -123,17 +125,19 @@ interface ITelecomService {
     * @see TelecomServiceImpl#isVoiceMailNumber
     */
    boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number,
            String callingPackage);
            String callingPackage, String callingFeatureId);

    /**
     * @see TelecomServiceImpl#getVoiceMailNumber
     */
    String getVoiceMailNumber(in PhoneAccountHandle accountHandle, String callingPackage);
    String getVoiceMailNumber(in PhoneAccountHandle accountHandle, String callingPackage,
            String callingFeatureId);

    /**
     * @see TelecomServiceImpl#getLine1Number
     */
    String getLine1Number(in PhoneAccountHandle accountHandle, String callingPackage);
    String getLine1Number(in PhoneAccountHandle accountHandle, String callingPackage,
            String callingFeatureId);

    /**
     * @see TelecomServiceImpl#getDefaultPhoneApp
@@ -172,12 +176,12 @@ interface ITelecomService {
    /**
     * @see TelecomServiceImpl#isInCall
     */
    boolean isInCall(String callingPackage);
    boolean isInCall(String callingPackage, String callingFeatureId);

    /**
     * @see TelecomServiceImpl#isInManagedCall
     */
    boolean isInManagedCall(String callingPackage);
    boolean isInManagedCall(String callingPackage, String callingFeatureId);

    /**
     * @see TelecomServiceImpl#isRinging
@@ -229,12 +233,12 @@ interface ITelecomService {
    /**
     * @see TelecomServiceImpl#isTtySupported
     */
    boolean isTtySupported(String callingPackage);
    boolean isTtySupported(String callingPackage, String callingFeatureId);

    /**
     * @see TelecomServiceImpl#getCurrentTtyMode
     */
    int getCurrentTtyMode(String callingPackage);
    int getCurrentTtyMode(String callingPackage, String callingFeatureId);

    /**
     * @see TelecomServiceImpl#addNewIncomingCall
@@ -249,7 +253,7 @@ interface ITelecomService {
    /**
     * @see TelecomServiceImpl#placeCall
     */
    void placeCall(in Uri handle, in Bundle extras, String callingPackage);
    void placeCall(in Uri handle, in Bundle extras, String callingPackage, String callingFeatureId);

    /**
     * @see TelecomServiceImpl#enablePhoneAccount