Rename a couple variables in IccRecords.
Also add getIccId for use by PhoneBase.
Change-Id: I51eaf09bfc498f1f1edc3f697838978f56b7bd4e
diff --git a/src/java/com/android/internal/telephony/PhoneBase.java b/src/java/com/android/internal/telephony/PhoneBase.java
index 0f4b53c..d0364da 100644
--- a/src/java/com/android/internal/telephony/PhoneBase.java
+++ b/src/java/com/android/internal/telephony/PhoneBase.java
@@ -774,7 +774,7 @@
@Override
public String getIccSerialNumber() {
IccRecords r = mIccRecords.get();
- return (r != null) ? r.iccId : "";
+ return (r != null) ? r.getIccId() : "";
}
@Override
diff --git a/src/java/com/android/internal/telephony/uicc/IccRecords.java b/src/java/com/android/internal/telephony/uicc/IccRecords.java
index 504fb7f..dc24d89 100644
--- a/src/java/com/android/internal/telephony/uicc/IccRecords.java
+++ b/src/java/com/android/internal/telephony/uicc/IccRecords.java
@@ -42,7 +42,7 @@
protected IccFileHandler mFh;
protected UiccCardApplication mParentApp;
- protected RegistrantList recordsLoadedRegistrants = new RegistrantList();
+ protected RegistrantList mRecordsLoadedRegistrants = new RegistrantList();
protected RegistrantList mImsiReadyRegistrants = new RegistrantList();
protected RegistrantList mRecordsEventsRegistrants = new RegistrantList();
protected RegistrantList mNewSmsRegistrants = new RegistrantList();
@@ -56,7 +56,7 @@
protected boolean mRecordsRequested = false; // true if we've made requests for the sim records
- public String iccId;
+ protected String mIccId;
protected String mMsisdn = null; // My mobile number
protected String mMsisdnTag = null;
protected String mVoiceMailNum = null;
@@ -99,7 +99,7 @@
+ " mCi=" + mCi
+ " mFh=" + mFh
+ " mParentApp=" + mParentApp
- + " recordsLoadedRegistrants=" + recordsLoadedRegistrants
+ + " recordsLoadedRegistrants=" + mRecordsLoadedRegistrants
+ " mImsiReadyRegistrants=" + mImsiReadyRegistrants
+ " mRecordsEventsRegistrants=" + mRecordsEventsRegistrants
+ " mNewSmsRegistrants=" + mNewSmsRegistrants
@@ -108,7 +108,7 @@
+ " recordsToLoad=" + mRecordsToLoad
+ " adnCache=" + mAdnCache
+ " recordsRequested=" + mRecordsRequested
- + " iccid=" + iccId
+ + " iccid=" + mIccId
+ " msisdn=" + mMsisdn
+ " msisdnTag=" + mMsisdnTag
+ " voiceMailNum=" + mVoiceMailNum
@@ -166,20 +166,24 @@
return mAdnCache;
}
+ public String getIccId() {
+ return mIccId;
+ }
+
public void registerForRecordsLoaded(Handler h, int what, Object obj) {
if (mDestroyed.get()) {
return;
}
Registrant r = new Registrant(h, what, obj);
- recordsLoadedRegistrants.add(r);
+ mRecordsLoadedRegistrants.add(r);
if (mRecordsToLoad == 0 && mRecordsRequested == true) {
r.notifyRegistrant(new AsyncResult(null, null, null));
}
}
public void unregisterForRecordsLoaded(Handler h) {
- recordsLoadedRegistrants.remove(h);
+ mRecordsLoadedRegistrants.remove(h);
}
public void registerForImsiReady(Handler h, int what, Object obj) {
@@ -493,10 +497,10 @@
pw.println(" mCi=" + mCi);
pw.println(" mFh=" + mFh);
pw.println(" mParentApp=" + mParentApp);
- pw.println(" recordsLoadedRegistrants: size=" + recordsLoadedRegistrants.size());
- for (int i = 0; i < recordsLoadedRegistrants.size(); i++) {
+ pw.println(" recordsLoadedRegistrants: size=" + mRecordsLoadedRegistrants.size());
+ for (int i = 0; i < mRecordsLoadedRegistrants.size(); i++) {
pw.println(" recordsLoadedRegistrants[" + i + "]="
- + ((Registrant)recordsLoadedRegistrants.get(i)).getHandler());
+ + ((Registrant)mRecordsLoadedRegistrants.get(i)).getHandler());
}
pw.println(" mImsiReadyRegistrants: size=" + mImsiReadyRegistrants.size());
for (int i = 0; i < mImsiReadyRegistrants.size(); i++) {
@@ -522,7 +526,7 @@
pw.println(" mRecordsRequested=" + mRecordsRequested);
pw.println(" mRecordsToLoad=" + mRecordsToLoad);
pw.println(" mRdnCache=" + mAdnCache);
- pw.println(" iccid=" + iccId);
+ pw.println(" iccid=" + mIccId);
pw.println(" mMsisdn=" + mMsisdn);
pw.println(" mMsisdnTag=" + mMsisdnTag);
pw.println(" mVoiceMailNum=" + mVoiceMailNum);
diff --git a/src/java/com/android/internal/telephony/uicc/IsimUiccRecords.java b/src/java/com/android/internal/telephony/uicc/IsimUiccRecords.java
index a7d4433..8e25132 100644
--- a/src/java/com/android/internal/telephony/uicc/IsimUiccRecords.java
+++ b/src/java/com/android/internal/telephony/uicc/IsimUiccRecords.java
@@ -205,7 +205,7 @@
@Override
protected void onAllRecordsLoaded() {
- recordsLoadedRegistrants.notifyRegistrants(
+ mRecordsLoadedRegistrants.notifyRegistrants(
new AsyncResult(null, null, null));
}
diff --git a/src/java/com/android/internal/telephony/uicc/RuimRecords.java b/src/java/com/android/internal/telephony/uicc/RuimRecords.java
index c16ef09..5b2fc59 100755
--- a/src/java/com/android/internal/telephony/uicc/RuimRecords.java
+++ b/src/java/com/android/internal/telephony/uicc/RuimRecords.java
@@ -135,7 +135,7 @@
protected void resetRecords() {
mCountVoiceMessages = 0;
mMncLength = UNINITIALIZED;
- iccId = null;
+ mIccId = null;
mAdnCache.reset();
@@ -513,9 +513,9 @@
break;
}
- iccId = IccUtils.bcdToString(data, 0, data.length);
+ mIccId = IccUtils.bcdToString(data, 0, data.length);
- log("iccid: " + iccId);
+ log("iccid: " + mIccId);
break;
@@ -641,7 +641,7 @@
}
setLocaleFromCsim();
- recordsLoadedRegistrants.notifyRegistrants(
+ mRecordsLoadedRegistrants.notifyRegistrants(
new AsyncResult(null, null, null));
}
diff --git a/src/java/com/android/internal/telephony/uicc/SIMRecords.java b/src/java/com/android/internal/telephony/uicc/SIMRecords.java
index f99ac45..8688786 100644
--- a/src/java/com/android/internal/telephony/uicc/SIMRecords.java
+++ b/src/java/com/android/internal/telephony/uicc/SIMRecords.java
@@ -221,7 +221,7 @@
mVoiceMailNum = null;
mCountVoiceMessages = 0;
mMncLength = UNINITIALIZED;
- iccId = null;
+ mIccId = null;
// -1 means no EF_SPN found; treat accordingly.
mSpnDisplayCondition = -1;
mEfMWIS = null;
@@ -806,9 +806,9 @@
break;
}
- iccId = IccUtils.bcdToString(data, 0, data.length);
+ mIccId = IccUtils.bcdToString(data, 0, data.length);
- log("iccid: " + iccId);
+ log("iccid: " + mIccId);
break;
@@ -1329,7 +1329,7 @@
setVoiceMailByCountry(operator);
setSpnFromConfig(operator);
- recordsLoadedRegistrants.notifyRegistrants(
+ mRecordsLoadedRegistrants.notifyRegistrants(
new AsyncResult(null, null, null));
}