diff options
author | Kazuhiro Ondo <kazuhiro.ondo@motorola.com> | 2011-08-26 17:13:03 -0500 |
---|---|---|
committer | John Huang <jsh@google.com> | 2011-09-09 13:02:09 -0700 |
commit | eb7763efa52bad67ff828ad895ff172190e86035 (patch) | |
tree | 3e6232f021cef6d5c381b44713226485a2886185 /telephony | |
parent | 090df1dc4188e5b9ef10a0aca5081a196085ff56 (diff) | |
download | frameworks_base-eb7763efa52bad67ff828ad895ff172190e86035.zip frameworks_base-eb7763efa52bad67ff828ad895ff172190e86035.tar.gz frameworks_base-eb7763efa52bad67ff828ad895ff172190e86035.tar.bz2 |
DO NOT MERGE: Fix leak in SIM ready registrants
SIM Ready registrants was keep growing after air plane mode
toggle or RIL recovery.
Bug: 5222722
Change-Id: Iac9fcb86f96f9e42440e641cd94736fed6f45813
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java index 018b72c..654fe8d 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java @@ -39,6 +39,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { CDMALTEPhone mCdmaLtePhone; private ServiceState mLteSS; // The last LTE state from Voice Registration + private boolean mNeedToRegForSimLoaded = true; public CdmaLteServiceStateTracker(CDMALTEPhone phone) { super(phone); @@ -71,7 +72,10 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { isSubscriptionFromRuim = false; // Register SIM_RECORDS_LOADED dynamically. // This is to avoid confilct with RUIM_READY scenario) - phone.mIccRecords.registerForRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null); + if (mNeedToRegForSimLoaded) { + phone.mIccRecords.registerForRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null); + mNeedToRegForSimLoaded = false; + } pollState(); // Signal strength polling stops when radio is off. queueNextSignalStrengthPoll(); |