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

Commit 067b53f3 authored by Ayush Sharma's avatar Ayush Sharma
Browse files

Remove flag, switch to work profile for call dialog

Bug: 279558295
Test: NA
Change-Id: Ibbfda9c8acfcf06cf74bebfd0c9722da2f4c8539
parent 390a9d13
Loading
Loading
Loading
Loading
+15 −23
Original line number Diff line number Diff line
@@ -77,7 +77,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;
@@ -1974,7 +1973,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,
@@ -1993,7 +1991,6 @@ public class CallsManager extends Call.ListenerBase
                                        }
                                    }
                                }
                                }

                                Log.i(CallsManager.this, "Aborting call since there are no"
                                        + " available accounts.");
@@ -2153,11 +2150,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) {
        try {