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

Commit ee1131a0 authored by Ayush Sharma's avatar Ayush Sharma Committed by Automerger Merge Worker
Browse files

Merge changes from topics "WPT_279560135", "WPT_DPM_ROLE_HOLDER" into udc-dev am: a1f45f65

parents 1b804771 a1f45f65
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.DeviceConfig;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyFrameworkInitializer;
import android.telephony.TelephonyManager;
@@ -262,9 +261,6 @@ public final class TelephonyUtils {
     */
    public static void showSwitchToManagedProfileDialogIfAppropriate(Context context,
            int subId, int callingUid, String callingPackage) {
        if (!isSwitchToManagedProfileDialogFlagEnabled()) {
            return;
        }
        final long token = Binder.clearCallingIdentity();
        try {
            UserHandle callingUserHandle = UserHandle.getUserHandleForUid(callingUid);
@@ -302,11 +298,6 @@ public final class TelephonyUtils {
        }
    }

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

    private static boolean isUidForeground(Context context, int uid) {
        ActivityManager am = context.getSystemService(ActivityManager.class);
        boolean result = am != null && am.getUidImportance(uid)