Add getEsn().
Bug:27612001
Change-Id: I50d28b51a7b59ee9f0f95b015f60eea6ca7445eb
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 9a9b6a8..0b3a80b 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3084,4 +3084,27 @@
return aid;
}
+
+ /**
+ * Return the Electronic Serial Number.
+ *
+ * @param subId the subscription ID that this request applies to.
+ * @return ESN or null if error.
+ */
+ @Override
+ public String getEsn(int subId) {
+ enforceReadPrivilegedPermission();
+ Phone phone = getPhone(subId);
+ if (phone == null) {
+ return null;
+ }
+ String esn = null;
+ try {
+ esn = phone.getEsn();
+ } catch (Exception e) {
+ Log.e(LOG_TAG, "Not getting ESN. Exception ex=" + e);
+ }
+ return esn;
+ }
+
}