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

Commit cd05e885 authored by Wink Saville's avatar Wink Saville
Browse files

Allow SIM PIN on CDMA LTE devices

Bug: 5161360
Change-Id: I6f98da08e6be08403d9b3b08b02b02b9a63b14fe
parent d664985e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.security.KeyStore;
import android.telephony.TelephonyManager;
import android.util.Log;

import com.android.internal.telephony.Phone;
import com.android.internal.widget.LockPatternUtils;

import java.util.ArrayList;
@@ -162,8 +163,9 @@ public class SecuritySettings extends SettingsPreferenceFragment
        addPreferencesFromResource(R.xml.security_settings_misc);

        // Do not display SIM lock for CDMA phone
        if (TelephonyManager.PHONE_TYPE_CDMA ==
                TelephonyManager.getDefault().getCurrentPhoneType()) {
        TelephonyManager tm = TelephonyManager.getDefault();
        if ((TelephonyManager.PHONE_TYPE_CDMA == tm.getCurrentPhoneType()) &&
                (tm.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE)) {
            root.removePreference(root.findPreference(KEY_SIM_LOCK));
        }