diff options
author | Wink Saville <wink@google.com> | 2011-01-15 07:47:03 -0800 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2011-01-15 07:47:03 -0800 |
commit | ad8c32f3028d13869d4c494ae14193ceba3281af (patch) | |
tree | f13ac8ebfe9ab9c61dcd62a1aede6d511c7a3836 /telephony | |
parent | 77c3e4b9fdab1f48cfa95cddb4a110946f4a1cd8 (diff) | |
download | frameworks_base-ad8c32f3028d13869d4c494ae14193ceba3281af.zip frameworks_base-ad8c32f3028d13869d4c494ae14193ceba3281af.tar.gz frameworks_base-ad8c32f3028d13869d4c494ae14193ceba3281af.tar.bz2 |
Set mIsMinInfoReady and mCurrentOtasp before notifcations.
We were sending a notification before setting mIsMinInfoReady and
mCurrentOtasp. This causes a race and it's possible that
OtaUtils.maybeDoOtasp is called before before they are set.
In this case the activation would not occur.
Bug: 3339109
Change-Id: I3baf8992d58af63a5cc07a14cc33157fd1c5aaa3
Diffstat (limited to 'telephony')
-rwxr-xr-x | telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java index 17cf36d..2c5aa3c 100755 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java @@ -443,18 +443,21 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { mMin = cdmaSubscription[3]; mPrlVersion = cdmaSubscription[4]; Log.d(LOG_TAG,"GET_CDMA_SUBSCRIPTION MDN=" + mMdn); - //Notify apps subscription info is ready + + mIsMinInfoReady = true; + + int otaspMode = getOtasp(); + int oldOtaspMode = mCurrentOtaspMode; + mCurrentOtaspMode = otaspMode; + + // Notify apps subscription info is ready if (cdmaForSubscriptionInfoReadyRegistrants != null) { + Log.d(LOG_TAG, "call cdmaForSubscriptionInfoReady.notifyRegistrants()"); cdmaForSubscriptionInfoReadyRegistrants.notifyRegistrants(); } - if (!mIsMinInfoReady) { - mIsMinInfoReady = true; - } - int otaspMode = getOtasp(); - if (mCurrentOtaspMode != otaspMode) { + if (oldOtaspMode != mCurrentOtaspMode) { Log.d(LOG_TAG, "call phone.notifyOtaspChanged old otaspMode=" + - mCurrentOtaspMode + " new otaspMode=" + otaspMode); - mCurrentOtaspMode = otaspMode; + oldOtaspMode + " new otaspMode=" + mCurrentOtaspMode); phone.notifyOtaspChanged(mCurrentOtaspMode); } phone.getIccCard().broadcastIccStateChangedIntent(IccCard.INTENT_VALUE_ICC_IMSI, |