summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawn Liu <xiaoyingliu@motorola.com>2014-09-17 20:24:01 -0500
committerAmit Mahajan <amitmahajan@google.com>2014-09-18 12:37:42 -0700
commitedce33c18ace16dd69d3e570869cf7672243f041 (patch)
treebecaa5ea847518ac0092b203f763007fe87f2075
parentdab7ca16d7f8c31588dbb20b45deb3e53872ba6e (diff)
downloadOMA-DM-edce33c18ace16dd69d3e570869cf7672243f041.tar.gz
Return Android version for VZW ./DevDetail/SwV node .
Bug: 17571303 Change-Id: Ic1ab356817bb74607733d45d471d14971c9a380e
-rw-r--r--plugins/devplugin/com/android/omadm/plugin/dev/DevPlugin.java31
1 files changed, 24 insertions, 7 deletions
diff --git a/plugins/devplugin/com/android/omadm/plugin/dev/DevPlugin.java b/plugins/devplugin/com/android/omadm/plugin/dev/DevPlugin.java
index 933e7b5..79d9767 100644
--- a/plugins/devplugin/com/android/omadm/plugin/dev/DevPlugin.java
+++ b/plugins/devplugin/com/android/omadm/plugin/dev/DevPlugin.java
@@ -92,17 +92,20 @@ public class DevPlugin extends DmtBasePlugin {
if (path.equals("./DevDetail/SwV") || path.equals("./DevDetail/FwV")) {
String SwV;
try {
- SwV = SystemProperties.get("ro.build.version.full");
- if (null == SwV || SwV.equals("")) {
- SwV = SystemProperties.get("ro.build.id", null) + "~"
- + SystemProperties.get("ro.build.config.version", null) + "~"
- + SystemProperties.get("gsm.version.baseband", null) + "~"
- + SystemProperties.get("ro.gsm.flexversion", null);
+ if (!isSprint() && path.equals("./DevDetail/SwV")) {
+ SwV = "Android " + SystemProperties.get("ro.build.version.release");
+ } else {
+ SwV = SystemProperties.get("ro.build.version.full");
+ if (null == SwV || SwV.equals("")) {
+ SwV = SystemProperties.get("ro.build.id", null) + "~"
+ + SystemProperties.get("ro.build.config.version", null) + "~"
+ + SystemProperties.get("gsm.version.baseband", null) + "~"
+ + SystemProperties.get("ro.gsm.flexversion", null);
+ }
}
} catch (RuntimeException e) {
SwV = "Unknown";
}
-
data = new DmtData(SwV);
} else if ("./DevDetail/HwV".equals(path)) {
String HwV;
@@ -452,4 +455,18 @@ public class DevPlugin extends DmtBasePlugin {
private static void loge(String s, Throwable tr) {
Log.e(TAG, s, tr);
}
+
+ private boolean isSprint() {
+ TelephonyManager tm = (TelephonyManager) mContext
+ .getSystemService(Context.TELEPHONY_SERVICE);
+ String simOperator = tm.getSimOperator();
+ String imsi = tm.getSubscriberId();
+ logd("simOperator: " + simOperator + " IMSI: " + imsi);
+ /* Use MEID for sprint */
+ if ("310120".equals(simOperator) || (imsi != null && imsi.startsWith("310120"))) {
+ return true;
+ } else {
+ return false;
+ }
+ }
}