diff options
author | Gabriele M <moto.falcon.git@gmail.com> | 2016-11-07 19:34:05 +0100 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2017-01-07 01:41:44 +0200 |
commit | bd2e2e9dd2945acd3977fcad6466ef24d80cb642 (patch) | |
tree | 523462b979394d915edceb14d764fc1dfd507328 | |
parent | 271870328197caf853318ef9efda8fc90c7b01df (diff) | |
download | android_frameworks_opt_telephony-bd2e2e9dd2945acd3977fcad6466ef24d80cb642.tar.gz android_frameworks_opt_telephony-bd2e2e9dd2945acd3977fcad6466ef24d80cb642.tar.bz2 android_frameworks_opt_telephony-bd2e2e9dd2945acd3977fcad6466ef24d80cb642.zip |
Send EVENT_NV_READY to GsmCdmaPhone
This will be needed in a follow-up change.
This partially reverts commit 867e0150ea9181755c681013f18877e8eab8ffff
("Do not send unnecessary EVENT_NV_READY to GsmCdmaPhone.").
Change-Id: Id4a1ab58a2137573b6f36ef5ae01047f98d38bac
-rw-r--r-- | src/java/com/android/internal/telephony/GsmCdmaPhone.java | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java index b81b4ff38..e5ee146c8 100644 --- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java +++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java @@ -290,7 +290,7 @@ public class GsmCdmaPhone extends Phone { tm.setPhoneType(getPhoneId(), PhoneConstants.PHONE_TYPE_GSM); mIccCardProxy.setVoiceRadioTech(ServiceState.RIL_RADIO_TECHNOLOGY_UMTS); } else { - mCdmaSubscriptionSource = mCdmaSSM.getCdmaSubscriptionSource(); + handleCdmaSubscriptionSource(mCdmaSSM.getCdmaSubscriptionSource()); // This is needed to handle phone process crashes String inEcm = SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false"); mIsPhoneInEcmState = inEcm.equals("true"); @@ -2021,7 +2021,7 @@ public class GsmCdmaPhone extends Phone { mCi.getVoiceRadioTechnology(obtainMessage(EVENT_REQUEST_VOICE_RADIO_TECH_DONE)); if (!isPhoneTypeGsm()) { - mCdmaSubscriptionSource = mCdmaSSM.getCdmaSubscriptionSource(); + handleCdmaSubscriptionSource(mCdmaSSM.getCdmaSubscriptionSource()); } // If this is on APM off, SIM may already be loaded. Send setPreferredNetworkType @@ -2211,7 +2211,7 @@ public class GsmCdmaPhone extends Phone { case EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED: logd("EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED"); - mCdmaSubscriptionSource = mCdmaSSM.getCdmaSubscriptionSource(); + handleCdmaSubscriptionSource(mCdmaSSM.getCdmaSubscriptionSource()); break; case EVENT_REGISTERED_TO_NETWORK: @@ -2314,6 +2314,10 @@ public class GsmCdmaPhone extends Phone { } break; + case EVENT_NV_READY: + Rlog.d(LOG_TAG, "Event EVENT_NV_READY Received"); + break; + case EVENT_SET_VM_NUMBER_DONE: ar = (AsyncResult)msg.obj; if ((isPhoneTypeGsm() && IccVmNotSupportedException.class.isInstance(ar.exception)) || @@ -2520,6 +2524,22 @@ public class GsmCdmaPhone extends Phone { //CDMA /** + * Handles the call to get the subscription source + * + * @param newSubscriptionSource holds the new CDMA subscription source value + */ + private void handleCdmaSubscriptionSource(int newSubscriptionSource) { + if (newSubscriptionSource != mCdmaSubscriptionSource) { + mCdmaSubscriptionSource = newSubscriptionSource; + if (newSubscriptionSource == CDMA_SUBSCRIPTION_NV) { + // NV is ready when subscription source is NV + sendMessage(obtainMessage(EVENT_NV_READY)); + } + } + } + + //CDMA + /** * Sets the "current" field in the telephony provider according to the * build-time operator numeric property * |