Deprecated getDeviceId and added getMeid and getImei
Added two new public APIs getMeid and getImei. Deprecated the exisintg
getDeviceId API because it can't return a constant id when phone type
changes.
Test: CTS and manual
bug: 34233620, 10831289
Change-Id: If3d9fc71751fe14cf92afb685146faea983ffde3
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index fc7faab..7e211b6 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1716,6 +1716,15 @@
}
@Override
+ public String getMeidForSlot(int slotIndex, String callingPackage) {
+ if (!canReadPhoneState(callingPackage, "getMeidForSlot")) {
+ return null;
+ }
+ Phone phone = PhoneFactory.getPhone(slotIndex);
+ return phone == null ? null : phone.getMeid();
+ }
+
+ @Override
public String getDeviceSoftwareVersionForSlot(int slotIndex, String callingPackage) {
if (!canReadPhoneState(callingPackage, "getDeviceSoftwareVersionForSlot")) {
return null;