Skip to content

Commit eb7763e

Browse files
Kazuhiro OndoJohn Huang
authored andcommitted
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
1 parent 090df1d commit eb7763e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
3939
CDMALTEPhone mCdmaLtePhone;
4040

4141
private ServiceState mLteSS; // The last LTE state from Voice Registration
42+
private boolean mNeedToRegForSimLoaded = true;
4243

4344
public CdmaLteServiceStateTracker(CDMALTEPhone phone) {
4445
super(phone);
@@ -71,7 +72,10 @@ public void handleMessage(Message msg) {
7172
isSubscriptionFromRuim = false;
7273
// Register SIM_RECORDS_LOADED dynamically.
7374
// This is to avoid confilct with RUIM_READY scenario)
74-
phone.mIccRecords.registerForRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null);
75+
if (mNeedToRegForSimLoaded) {
76+
phone.mIccRecords.registerForRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null);
77+
mNeedToRegForSimLoaded = false;
78+
}
7579
pollState();
7680
// Signal strength polling stops when radio is off.
7781
queueNextSignalStrengthPoll();

0 commit comments

Comments
 (0)