am 682b7ed3
: Merge "IMEI information will show without a SIM." into lmp-mr1-dev
* commit '682b7ed34c01ea65edfe034afe52180052b9e2fc': IMEI information will show without a SIM.
This commit is contained in:
@@ -63,8 +63,8 @@ public class ImeiInformation extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setPreferenceValue(int slotId) {
|
private void setPreferenceValue(int phoneId) {
|
||||||
final Phone phone = getPhoneFromSlotId(slotId);
|
final Phone phone = PhoneFactory.getPhone(phoneId);
|
||||||
|
|
||||||
if (phone != null) {
|
if (phone != null) {
|
||||||
if (phone.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {
|
if (phone.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {
|
||||||
@@ -92,7 +92,7 @@ public class ImeiInformation extends PreferenceActivity {
|
|||||||
setSummaryText(KEY_IMEI, phone.getDeviceId());
|
setSummaryText(KEY_IMEI, phone.getDeviceId());
|
||||||
setSummaryText(KEY_IMEI_SV,
|
setSummaryText(KEY_IMEI_SV,
|
||||||
((TelephonyManager) getSystemService(TELEPHONY_SERVICE))
|
((TelephonyManager) getSystemService(TELEPHONY_SERVICE))
|
||||||
.getDeviceSoftwareVersion(/*slotId*/));
|
.getDeviceSoftwareVersion(phoneId));
|
||||||
// device is not CDMA, do not display CDMA features
|
// device is not CDMA, do not display CDMA features
|
||||||
// check Null in case no specified preference in overlay xml
|
// check Null in case no specified preference in overlay xml
|
||||||
removePreferenceFromScreen(KEY_PRL_VERSION);
|
removePreferenceFromScreen(KEY_PRL_VERSION);
|
||||||
@@ -103,24 +103,6 @@ public class ImeiInformation extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Phone getPhoneFromSlotId(int slotIdx) {
|
|
||||||
final SubscriptionInfo subInfo =
|
|
||||||
mSubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(slotIdx);
|
|
||||||
|
|
||||||
if (subInfo == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
final Phone[] phones = PhoneFactory.getPhones();
|
|
||||||
for (int i = 0; i < phones.length; i++) {
|
|
||||||
if (phones[i].getSubId() == subInfo.getSubscriptionId()) {
|
|
||||||
return phones[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Modify the preference key with prefix "_", so new added information preference can be set
|
// Modify the preference key with prefix "_", so new added information preference can be set
|
||||||
// related phone information.
|
// related phone information.
|
||||||
private void setNewKey(int slotId) {
|
private void setNewKey(int slotId) {
|
||||||
|
Reference in New Issue
Block a user