aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/android/internal/telephony/GsmCdmaPhone.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/android/internal/telephony/GsmCdmaPhone.java')
-rw-r--r--src/java/com/android/internal/telephony/GsmCdmaPhone.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
index 5eae06112c..6e2601e635 100644
--- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java
+++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
@@ -249,6 +249,7 @@ public class GsmCdmaPhone extends Phone {
private String mImeiSv;
private String mVmNumber;
private int mImeiType = IMEI_TYPE_UNKNOWN;
+ private int mSimState = TelephonyManager.SIM_STATE_UNKNOWN;
@VisibleForTesting
public CellBroadcastConfigTracker mCellBroadcastConfigTracker =
@@ -426,9 +427,9 @@ public class GsmCdmaPhone extends Phone {
if (mPhoneId == intent.getIntExtra(
SubscriptionManager.EXTRA_SLOT_INDEX,
SubscriptionManager.INVALID_SIM_SLOT_INDEX)) {
- int simState = intent.getIntExtra(TelephonyManager.EXTRA_SIM_STATE,
+ mSimState = intent.getIntExtra(TelephonyManager.EXTRA_SIM_STATE,
TelephonyManager.SIM_STATE_UNKNOWN);
- if (simState == TelephonyManager.SIM_STATE_LOADED
+ if (mSimState == TelephonyManager.SIM_STATE_LOADED
&& currentSlotSubIdChanged()) {
setNetworkSelectionModeAutomatic(null);
}
@@ -680,6 +681,7 @@ public class GsmCdmaPhone extends Phone {
mTelecomVoiceServiceStateOverride = newOverride;
if (changed && mSST != null) {
mSST.onTelecomVoiceServiceStateOverrideChanged();
+ mSST.getServiceStateStats().onVoiceServiceStateOverrideChanged(hasService);
}
}
@@ -3521,13 +3523,14 @@ public class GsmCdmaPhone extends Phone {
case EVENT_SET_NULL_CIPHER_AND_INTEGRITY_DONE:
logd("EVENT_SET_NULL_CIPHER_AND_INTEGRITY_DONE");
ar = (AsyncResult) msg.obj;
+ // Only test for a success here in order to flip the support flag.
+ // Testing for the negative case, e.g. REQUEST_NOT_SUPPORTED, is insufficient
+ // because the modem or the RIL could still return exceptions for temporary
+ // failures even when the feature is unsupported.
if (ar == null || ar.exception == null) {
mIsNullCipherAndIntegritySupported = true;
return;
}
- CommandException.Error error = ((CommandException) ar.exception).getCommandError();
- mIsNullCipherAndIntegritySupported = !error.equals(
- CommandException.Error.REQUEST_NOT_SUPPORTED);
break;
case EVENT_IMS_DEREGISTRATION_TRIGGERED:
@@ -4499,6 +4502,12 @@ public class GsmCdmaPhone extends Phone {
e.printStackTrace();
}
pw.flush();
+ try {
+ mCellBroadcastConfigTracker.dump(fd, pw, args);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ pw.flush();
}
@Override
@@ -5017,6 +5026,10 @@ public class GsmCdmaPhone extends Phone {
return;
}
+ if (mSimState != TelephonyManager.SIM_STATE_LOADED) {
+ return;
+ }
+
if (config == null) {
loge("didn't get the vonr_enabled_bool from the carrier config.");
return;