Merge "Remove the second network scan."
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3b15902..1a6e009 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2955,6 +2955,10 @@
<item quantity="one">Incorrect SIM PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempt before you must contact your carrier to unlock your device.</item>
<item quantity="other">Incorrect SIM PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempts.</item>
</plurals>
+
+ <!-- This is instruction text to inform the user that they have entered the wrong SIM PIN while trying to unlock the keyguard.
+ The variable will be replaced with a number. [CHAR LIMIT=NONE] -->
+ <string name="wrong_pin_code_one">Incorrect SIM PIN code, you have 1 remaining attempt before you must contact your carrier to unlock your device.</string>
<!-- Instructions telling the user that the operation to unlock the keyguard with SIM PIN failed. Displayed in one line in a large font. [CHAR LIMIT=40] -->
<string name="pin_failed">SIM PIN operation failed!</string>
diff --git a/src/com/android/settings/IccLockSettings.java b/src/com/android/settings/IccLockSettings.java
index a5ce5c9..4bd86b5 100644
--- a/src/com/android/settings/IccLockSettings.java
+++ b/src/com/android/settings/IccLockSettings.java
@@ -674,7 +674,9 @@
if (attemptsRemaining == 0) {
displayMessage = mRes.getString(R.string.wrong_pin_code_pukked);
- } else if (attemptsRemaining > 0) {
+ } else if (attemptsRemaining == 1) {
+ displayMessage = mRes.getString(R.string.wrong_pin_code_one, attemptsRemaining);
+ } else if (attemptsRemaining > 1) {
displayMessage = mRes
.getQuantityString(R.plurals.wrong_pin_code, attemptsRemaining,
attemptsRemaining);
diff --git a/src/com/android/settings/network/telephony/MobileNetworkUtils.java b/src/com/android/settings/network/telephony/MobileNetworkUtils.java
index dcd7312..118e4d5 100644
--- a/src/com/android/settings/network/telephony/MobileNetworkUtils.java
+++ b/src/com/android/settings/network/telephony/MobileNetworkUtils.java
@@ -18,6 +18,19 @@
import static android.provider.Telephony.Carriers.ENFORCE_MANAGED_URI;
+import static com.android.settings.network.telephony.TelephonyConstants.RadioAccessFamily.CDMA;
+import static com.android.settings.network.telephony.TelephonyConstants.RadioAccessFamily.EVDO;
+import static com.android.settings.network.telephony.TelephonyConstants.RadioAccessFamily.GSM;
+import static com.android.settings.network.telephony.TelephonyConstants.RadioAccessFamily.LTE;
+import static com.android.settings.network.telephony.TelephonyConstants.RadioAccessFamily.NR;
+import static com.android.settings.network.telephony.TelephonyConstants.RadioAccessFamily.RAF_TD_SCDMA;
+import static com.android.settings.network.telephony.TelephonyConstants.RadioAccessFamily.RAF_UNKNOWN;
+import static com.android.settings.network.telephony.TelephonyConstants.RadioAccessFamily.WCDMA;
+import static com.android.settings.network.telephony.TelephonyConstants.TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA;
+import static com.android.settings.network.telephony.TelephonyConstants.TelephonyManagerConstants.NETWORK_MODE_LTE_CDMA_EVDO;
+import static com.android.settings.network.telephony.TelephonyConstants.TelephonyManagerConstants.NETWORK_MODE_NR_LTE_CDMA_EVDO;
+import static com.android.settings.network.telephony.TelephonyConstants.TelephonyManagerConstants.NETWORK_MODE_NR_LTE_GSM_WCDMA;
+
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -403,8 +416,10 @@
context.getContentResolver(),
android.provider.Settings.Global.PREFERRED_NETWORK_MODE + subId,
TelephonyManager.DEFAULT_PREFERRED_NETWORK_MODE);
- if (settingsNetworkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA
- || settingsNetworkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_CDMA_EVDO) {
+ if (settingsNetworkMode == NETWORK_MODE_LTE_GSM_WCDMA
+ || settingsNetworkMode == NETWORK_MODE_LTE_CDMA_EVDO
+ || settingsNetworkMode == NETWORK_MODE_NR_LTE_GSM_WCDMA
+ || settingsNetworkMode == NETWORK_MODE_NR_LTE_CDMA_EVDO) {
return true;
}
@@ -431,8 +446,10 @@
android.provider.Settings.Global.PREFERRED_NETWORK_MODE + subId,
TelephonyManager.DEFAULT_PREFERRED_NETWORK_MODE);
if (isWorldMode(context, subId)) {
- if (networkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_CDMA_EVDO
- || networkMode == TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA) {
+ if (networkMode == NETWORK_MODE_LTE_CDMA_EVDO
+ || networkMode == NETWORK_MODE_LTE_GSM_WCDMA
+ || networkMode == NETWORK_MODE_NR_LTE_CDMA_EVDO
+ || networkMode == NETWORK_MODE_NR_LTE_GSM_WCDMA) {
return true;
} else if (shouldSpeciallyUpdateGsmCdma(context, subId)) {
return true;
diff --git a/src/com/android/settings/network/telephony/cdma/CdmaSystemSelectPreferenceController.java b/src/com/android/settings/network/telephony/cdma/CdmaSystemSelectPreferenceController.java
index e90a240..023f89e 100644
--- a/src/com/android/settings/network/telephony/cdma/CdmaSystemSelectPreferenceController.java
+++ b/src/com/android/settings/network/telephony/cdma/CdmaSystemSelectPreferenceController.java
@@ -16,6 +16,9 @@
package com.android.settings.network.telephony.cdma;
+import static com.android.settings.network.telephony.TelephonyConstants.TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA;
+import static com.android.settings.network.telephony.TelephonyConstants.TelephonyManagerConstants.NETWORK_MODE_NR_LTE_GSM_WCDMA;
+
import android.content.Context;
import android.provider.Settings;
import android.telephony.TelephonyManager;
@@ -53,8 +56,9 @@
mContext.getContentResolver(),
Settings.Global.PREFERRED_NETWORK_MODE + mSubId,
TelephonyManager.DEFAULT_PREFERRED_NETWORK_MODE);
- listPreference.setEnabled(
- settingsNetworkMode != TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA);
+ final boolean enableList = settingsNetworkMode != NETWORK_MODE_LTE_GSM_WCDMA
+ && settingsNetworkMode != NETWORK_MODE_NR_LTE_GSM_WCDMA;
+ listPreference.setEnabled(enableList);
}
@Override