Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -45072,6 +45072,7 @@ package android.telecom { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handleMmi(String, android.telecom.PhoneAccountHandle); method public boolean hasManageOngoingCallsPermission(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isInCall(); method @FlaggedApi("com.android.server.telecom.flags.is_in_external_call") @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isInExternalCall(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isInManagedCall(); method public boolean isIncomingCallPermitted(android.telecom.PhoneAccountHandle); method public boolean isOutgoingCallPermitted(android.telecom.PhoneAccountHandle); telecomm/framework/java/android/telecom/TelecomManager.java +22 −0 Original line number Diff line number Diff line Loading @@ -2059,6 +2059,28 @@ public class TelecomManager { return false; } /** * Returns whether there is an ongoing phone call (can be in dialing, ringing, active or holding * states) that is an external call. * * @return {@code true} if there is an ongoing call that is external, {@code false} otherwise. */ @FlaggedApi(Flags.FLAG_IS_IN_EXTERNAL_CALL) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isInExternalCall() { ITelecomService service = getTelecomService(); if (service != null) { try { return service.isInExternalCall(mContext.getOpPackageName(), mContext.getAttributionTag()); } catch (RemoteException e) { Log.e(TAG, "RemoteException calling isInCall().", e); e.rethrowFromSystemServer(); } } return false; } /** * Returns whether the caller has {@link android.Manifest.permission#MANAGE_ONGOING_CALLS} * permission. The permission can be obtained by associating with a physical wearable device Loading telecomm/framework/java/com/android/internal/telecom/ITelecomService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,11 @@ interface ITelecomService { */ boolean isInManagedCall(String callingPackage, String callingFeatureId); /** * @see TelecomServiceImpl#isInExternalCall */ boolean isInExternalCall(String callingPackage, String callingFeatureId); /** * @see TelecomServiceImpl#isRinging */ Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -45072,6 +45072,7 @@ package android.telecom { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handleMmi(String, android.telecom.PhoneAccountHandle); method public boolean hasManageOngoingCallsPermission(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isInCall(); method @FlaggedApi("com.android.server.telecom.flags.is_in_external_call") @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isInExternalCall(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isInManagedCall(); method public boolean isIncomingCallPermitted(android.telecom.PhoneAccountHandle); method public boolean isOutgoingCallPermitted(android.telecom.PhoneAccountHandle);
telecomm/framework/java/android/telecom/TelecomManager.java +22 −0 Original line number Diff line number Diff line Loading @@ -2059,6 +2059,28 @@ public class TelecomManager { return false; } /** * Returns whether there is an ongoing phone call (can be in dialing, ringing, active or holding * states) that is an external call. * * @return {@code true} if there is an ongoing call that is external, {@code false} otherwise. */ @FlaggedApi(Flags.FLAG_IS_IN_EXTERNAL_CALL) @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isInExternalCall() { ITelecomService service = getTelecomService(); if (service != null) { try { return service.isInExternalCall(mContext.getOpPackageName(), mContext.getAttributionTag()); } catch (RemoteException e) { Log.e(TAG, "RemoteException calling isInCall().", e); e.rethrowFromSystemServer(); } } return false; } /** * Returns whether the caller has {@link android.Manifest.permission#MANAGE_ONGOING_CALLS} * permission. The permission can be obtained by associating with a physical wearable device Loading
telecomm/framework/java/com/android/internal/telecom/ITelecomService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,11 @@ interface ITelecomService { */ boolean isInManagedCall(String callingPackage, String callingFeatureId); /** * @see TelecomServiceImpl#isInExternalCall */ boolean isInExternalCall(String callingPackage, String callingFeatureId); /** * @see TelecomServiceImpl#isRinging */ Loading