Loading telephony/common/com/android/internal/telephony/util/TelephonyUtils.java +9 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ 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; Loading Loading @@ -258,6 +259,9 @@ public final class TelephonyUtils { */ public static void showErrorIfSubscriptionAssociatedWithManagedProfile(Context context, int subId) { if (!isSwitchToManagedProfileDialogFlagEnabled()) { return; } final long token = Binder.clearCallingIdentity(); try { SubscriptionManager subscriptionManager = context.getSystemService( Loading Loading @@ -286,6 +290,11 @@ public final class TelephonyUtils { } } public static boolean isSwitchToManagedProfileDialogFlagEnabled() { return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_DEVICE_POLICY_MANAGER, "enable_switch_to_managed_profile_dialog", false); } /** * Check if the process with given uid is foreground. * Loading Loading
telephony/common/com/android/internal/telephony/util/TelephonyUtils.java +9 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ 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; Loading Loading @@ -258,6 +259,9 @@ public final class TelephonyUtils { */ public static void showErrorIfSubscriptionAssociatedWithManagedProfile(Context context, int subId) { if (!isSwitchToManagedProfileDialogFlagEnabled()) { return; } final long token = Binder.clearCallingIdentity(); try { SubscriptionManager subscriptionManager = context.getSystemService( Loading Loading @@ -286,6 +290,11 @@ public final class TelephonyUtils { } } public static boolean isSwitchToManagedProfileDialogFlagEnabled() { return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_DEVICE_POLICY_MANAGER, "enable_switch_to_managed_profile_dialog", false); } /** * Check if the process with given uid is foreground. * Loading