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

Commit 5a8de99c authored by Ayush Sharma's avatar Ayush Sharma Committed by Android (Google) Code Review
Browse files

Merge "Remove flag, switch to work profile for call dialog" into udc-dev

parents 315b16f5 067b53f3
Loading
Loading
Loading
Loading
+15 −23
Original line number Diff line number Diff line
@@ -80,7 +80,6 @@ import android.os.UserManager;
import android.provider.BlockedNumberContract;
import android.provider.BlockedNumberContract.SystemContract;
import android.provider.CallLog.Calls;
import android.provider.DeviceConfig;
import android.provider.Settings;
import android.sysprop.TelephonyProperties;
import android.telecom.CallAttributes;
@@ -1999,7 +1998,6 @@ public class CallsManager extends Call.ListenerBase
                                return CompletableFuture.completedFuture(null);
                            }
                            if (accountSuggestions == null || accountSuggestions.isEmpty()) {
                                if (isSwitchToManagedProfileDialogFlagEnabled()) {
                                Uri callUri = callToPlace.getHandle();
                                if (PhoneAccount.SCHEME_TEL.equals(callUri.getScheme())) {
                                    int managedProfileUserId = getManagedProfileUserId(mContext,
@@ -2018,7 +2016,6 @@ public class CallsManager extends Call.ListenerBase
                                        }
                                    }
                                }
                                }

                                Log.i(CallsManager.this, "Aborting call since there are no"
                                        + " available accounts.");
@@ -2178,11 +2175,6 @@ public class CallsManager extends Call.ListenerBase
        return UserHandle.USER_NULL;
    }

    private boolean isSwitchToManagedProfileDialogFlagEnabled() {
        return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_DEVICE_POLICY_MANAGER,
                "enable_switch_to_managed_profile_dialog", false);
    }

    private boolean showSwitchToManagedProfileDialog(Uri callUri, UserHandle initiatingUser,
            int managedProfileUserId) {
        // Note that the ACTION_CALL intent will resolve to Telecomm's UserCallActivity