Loading telecomm/java/android/telecom/TelecomManager.java +22 −14 Original line number Diff line number Diff line Loading @@ -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; /** Loading Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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); Loading @@ -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(" + Loading Loading @@ -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); Loading @@ -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); Loading @@ -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); Loading @@ -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); Loading @@ -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); Loading Loading @@ -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); Loading @@ -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); Loading Loading @@ -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); } Loading Loading @@ -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); } Loading telecomm/java/com/android/internal/telecom/ITelecomService.aidl +16 −12 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 Loading Loading @@ -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 Loading Loading @@ -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 Loading Loading @@ -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 Loading @@ -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 Loading Loading
telecomm/java/android/telecom/TelecomManager.java +22 −14 Original line number Diff line number Diff line Loading @@ -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; /** Loading Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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); Loading @@ -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(" + Loading Loading @@ -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); Loading @@ -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); Loading @@ -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); Loading @@ -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); Loading @@ -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); Loading Loading @@ -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); Loading @@ -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); Loading Loading @@ -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); } Loading Loading @@ -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); } Loading
telecomm/java/com/android/internal/telecom/ITelecomService.aidl +16 −12 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 Loading Loading @@ -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 Loading Loading @@ -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 Loading Loading @@ -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 Loading @@ -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 Loading