Merge "Type Allocation Code & Manufacturer Code" am: c42257e20e
am: 55ca9ec050
Change-Id: I39cd73bad77147f660ffe05e20c008c499c7d9fa
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 4098aaf..b35a16c 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -226,6 +226,9 @@
private NetworkScanRequestTracker mNetworkScanRequestTracker;
+ private static final int TYPE_ALLOCATION_CODE_LENGTH = 8;
+ private static final int MANUFACTURER_CODE_LENGTH = 8;
+
/**
* A request object to use for transmitting data to an ICC.
*/
@@ -1847,6 +1850,17 @@
}
@Override
+ public String getTypeAllocationCodeForSlot(int slotIndex) {
+ Phone phone = PhoneFactory.getPhone(slotIndex);
+ String tac = null;
+ if (phone != null) {
+ String imei = phone.getImei();
+ tac = imei == null ? null : imei.substring(0, TYPE_ALLOCATION_CODE_LENGTH);
+ }
+ return tac;
+ }
+
+ @Override
public String getMeidForSlot(int slotIndex, String callingPackage) {
Phone phone = PhoneFactory.getPhone(slotIndex);
if (phone == null) {
@@ -1861,6 +1875,17 @@
}
@Override
+ public String getManufacturerCodeForSlot(int slotIndex) {
+ Phone phone = PhoneFactory.getPhone(slotIndex);
+ String manufacturerCode = null;
+ if (phone != null) {
+ String meid = phone.getMeid();
+ manufacturerCode = meid == null ? null : meid.substring(0, MANUFACTURER_CODE_LENGTH);
+ }
+ return manufacturerCode;
+ }
+
+ @Override
public String getDeviceSoftwareVersionForSlot(int slotIndex, String callingPackage) {
Phone phone = PhoneFactory.getPhone(slotIndex);
if (phone == null) {