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

Commit 461a89f2 authored by Pranav Madapurmath's avatar Pranav Madapurmath Committed by Android (Google) Code Review
Browse files

Merge "Resolve API feedback TelecomManager#isInSelfManagedCall" into main

parents bca53562 63490381
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13893,7 +13893,7 @@ package android.telecom {
    method @Deprecated public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage();
    method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(String);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isInEmergencyCall();
    method @FlaggedApi("com.android.server.telecom.flags.telecom_resolve_hidden_dependencies") @RequiresPermission(allOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.INTERACT_ACROSS_USERS}) public boolean isInSelfManagedCall(@NonNull String, @NonNull android.os.UserHandle, boolean);
    method @FlaggedApi("com.android.server.telecom.flags.telecom_resolve_hidden_dependencies") @RequiresPermission(allOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean isInSelfManagedCall(@NonNull String, @NonNull android.os.UserHandle, boolean);
    method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging();
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUserSelectedOutgoingPhoneAccount(@Nullable android.telecom.PhoneAccountHandle);
    field public static final String ACTION_CURRENT_TTY_MODE_CHANGED = "android.telecom.action.CURRENT_TTY_MODE_CHANGED";
+9 −7
Original line number Diff line number Diff line
@@ -2753,23 +2753,25 @@ public class TelecomManager {
     *
     * @param packageName the package name of the app to check calls for.
     * @param userHandle the user handle on which to check for calls.
     * @param hasCrossUserAccess indicates if calls should be detected across all users.
     * @param detectForAllUsers indicates if calls should be detected across all users. If it is
     *                          set to {@code true}, and the caller has the ability to interact
     *                          across users, the userHandle parameter is disregarded.
     * @return {@code true} if there are ongoing calls, {@code false} otherwise.
     * @throws SecurityException if detectForAllUsers is true or userHandle is not the calling user
     * and the caller does not grant the ability to interact across users.
     * @hide
     */
    @SystemApi
    @FlaggedApi(Flags.FLAG_TELECOM_RESOLVE_HIDDEN_DEPENDENCIES)
    @RequiresPermission(allOf = {
            android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
            Manifest.permission.INTERACT_ACROSS_USERS
    })
    @RequiresPermission(allOf = {Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
            Manifest.permission.INTERACT_ACROSS_USERS}, conditional = true)
    public boolean isInSelfManagedCall(@NonNull String packageName,
            @NonNull UserHandle userHandle, boolean hasCrossUserAccess) {
            @NonNull UserHandle userHandle, boolean detectForAllUsers) {
        ITelecomService service = getTelecomService();
        if (service != null) {
            try {
                return service.isInSelfManagedCall(packageName, userHandle,
                        mContext.getOpPackageName(), hasCrossUserAccess);
                        mContext.getOpPackageName(), detectForAllUsers);
            } catch (RemoteException e) {
                Log.e(TAG, "RemoteException isInSelfManagedCall: " + e);
                e.rethrowFromSystemServer();
+1 −1
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ interface ITelecomService {
     * @see TelecomServiceImpl#isInSelfManagedCall
     */
    boolean isInSelfManagedCall(String packageName, in UserHandle userHandle,
        String callingPackage, boolean hasCrossUserAccess);
        String callingPackage, boolean detectForAllUsers);

    /**
     * @see TelecomServiceImpl#addCall