Loading core/api/test-current.txt +4 −0 Original line number Original line Diff line number Diff line Loading @@ -3415,6 +3415,10 @@ package android.telecom { method public void onBindClient(@Nullable android.content.Intent); method public void onBindClient(@Nullable android.content.Intent); } } public class TelecomManager { method @FlaggedApi("com.android.server.telecom.flags.voip_call_monitor_refactor") public boolean hasForegroundServiceDelegation(@Nullable android.telecom.PhoneAccountHandle); } } } package android.telephony { package android.telephony { Loading telecomm/java/android/telecom/TelecomManager.java +29 −0 Original line number Original line Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.annotation.SuppressAutoDoc; import android.annotation.SuppressLint; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.SystemService; import android.annotation.TestApi; import android.compat.annotation.ChangeId; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledSince; import android.compat.annotation.EnabledSince; import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage; Loading Loading @@ -1885,6 +1886,34 @@ public class TelecomManager { return null; return null; } } /** * This test API determines the foreground service delegation state for a VoIP app that adds * calls via {@link TelecomManager#addCall(CallAttributes, Executor, OutcomeReceiver, * CallControlCallback, CallEventCallback)}. Foreground Service Delegation allows applications * to operate in the background starting in Android 14 and is granted by Telecom via a request * to the ActivityManager. * * @param handle of the voip app that is being checked * @return true if the app has foreground service delegation. Otherwise, false. * * @hide */ @FlaggedApi(Flags.FLAG_VOIP_CALL_MONITOR_REFACTOR) @TestApi public boolean hasForegroundServiceDelegation(@Nullable PhoneAccountHandle handle) { ITelecomService service = getTelecomService(); if (service != null) { try { return service.hasForegroundServiceDelegation(handle, mContext.getOpPackageName()); } catch (RemoteException e) { Log.e(TAG, "RemoteException calling ITelecomService#hasForegroundServiceDelegation.", e); } } return false; } /** /** * Return the line 1 phone number for given phone account. * Return the line 1 phone number for given phone account. * * Loading telecomm/java/com/android/internal/telecom/ITelecomService.aidl +6 −0 Original line number Original line Diff line number Diff line Loading @@ -409,4 +409,10 @@ interface ITelecomService { */ */ void addCall(in CallAttributes callAttributes, in ICallEventCallback callback, String callId, void addCall(in CallAttributes callAttributes, in ICallEventCallback callback, String callId, String callingPackage); String callingPackage); /** * @see TelecomServiceImpl#hasForegroundServiceDelegation */ boolean hasForegroundServiceDelegation(in PhoneAccountHandle phoneAccountHandle, String callingPackage); } } Loading
core/api/test-current.txt +4 −0 Original line number Original line Diff line number Diff line Loading @@ -3415,6 +3415,10 @@ package android.telecom { method public void onBindClient(@Nullable android.content.Intent); method public void onBindClient(@Nullable android.content.Intent); } } public class TelecomManager { method @FlaggedApi("com.android.server.telecom.flags.voip_call_monitor_refactor") public boolean hasForegroundServiceDelegation(@Nullable android.telecom.PhoneAccountHandle); } } } package android.telephony { package android.telephony { Loading
telecomm/java/android/telecom/TelecomManager.java +29 −0 Original line number Original line Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.annotation.SuppressAutoDoc; import android.annotation.SuppressLint; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.SystemService; import android.annotation.TestApi; import android.compat.annotation.ChangeId; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledSince; import android.compat.annotation.EnabledSince; import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage; Loading Loading @@ -1885,6 +1886,34 @@ public class TelecomManager { return null; return null; } } /** * This test API determines the foreground service delegation state for a VoIP app that adds * calls via {@link TelecomManager#addCall(CallAttributes, Executor, OutcomeReceiver, * CallControlCallback, CallEventCallback)}. Foreground Service Delegation allows applications * to operate in the background starting in Android 14 and is granted by Telecom via a request * to the ActivityManager. * * @param handle of the voip app that is being checked * @return true if the app has foreground service delegation. Otherwise, false. * * @hide */ @FlaggedApi(Flags.FLAG_VOIP_CALL_MONITOR_REFACTOR) @TestApi public boolean hasForegroundServiceDelegation(@Nullable PhoneAccountHandle handle) { ITelecomService service = getTelecomService(); if (service != null) { try { return service.hasForegroundServiceDelegation(handle, mContext.getOpPackageName()); } catch (RemoteException e) { Log.e(TAG, "RemoteException calling ITelecomService#hasForegroundServiceDelegation.", e); } } return false; } /** /** * Return the line 1 phone number for given phone account. * Return the line 1 phone number for given phone account. * * Loading
telecomm/java/com/android/internal/telecom/ITelecomService.aidl +6 −0 Original line number Original line Diff line number Diff line Loading @@ -409,4 +409,10 @@ interface ITelecomService { */ */ void addCall(in CallAttributes callAttributes, in ICallEventCallback callback, String callId, void addCall(in CallAttributes callAttributes, in ICallEventCallback callback, String callId, String callingPackage); String callingPackage); /** * @see TelecomServiceImpl#hasForegroundServiceDelegation */ boolean hasForegroundServiceDelegation(in PhoneAccountHandle phoneAccountHandle, String callingPackage); } }