[DS] Correct the access method for telephony system property

Bug: 18675498
Change-Id: I8da86cfc62b55727229aaade776289fa7e8d099f
diff --git a/src/com/android/mms/util/DownloadManager.java b/src/com/android/mms/util/DownloadManager.java
index b6d9f49..713dff8 100644
--- a/src/com/android/mms/util/DownloadManager.java
+++ b/src/com/android/mms/util/DownloadManager.java
@@ -35,6 +35,8 @@
 import android.util.Log;
 import android.widget.Toast;
 
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
 import com.android.internal.telephony.TelephonyIntents;
 import com.android.internal.telephony.TelephonyProperties;
 import com.android.mms.LogTag;
@@ -178,13 +180,15 @@
     }
 
     static boolean isRoaming() {
-        // TODO: fix and put in Telephony layer
-        String roaming = SystemProperties.get(
-                TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, null);
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "roaming ------> " + roaming);
+        return isRoaming(SubscriptionManager.getDefaultSmsSubId());
+    }
+
+    static boolean isRoaming(int subId) {
+        TelephonyManager teleMgr = TelephonyManager.getDefault();
+        if (teleMgr == null) {
+            return false;
         }
-        return "true".equals(roaming);
+        return teleMgr.isNetworkRoaming(subId);
     }
 
     public void markState(final Uri uri, int state) {