Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(988)

Unified Diff: content/public/android/java/src/org/chromium/content/common/DeviceTelephonyInfo.java

Issue 238793007: Added GetNetworkOperatorID util func in net/base/net_util and a non-trivial implementation for Andr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/android/device_telephony_info.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/common/DeviceTelephonyInfo.java
diff --git a/content/public/android/java/src/org/chromium/content/common/DeviceTelephonyInfo.java b/content/public/android/java/src/org/chromium/content/common/DeviceTelephonyInfo.java
index 64a8fb448d556c8ab535605d748758203cc7927d..ce55400a183972f522c76e5f53503cc29a5311c3 100644
--- a/content/public/android/java/src/org/chromium/content/common/DeviceTelephonyInfo.java
+++ b/content/public/android/java/src/org/chromium/content/common/DeviceTelephonyInfo.java
@@ -27,7 +27,22 @@ public class DeviceTelephonyInfo {
*/
@CalledByNative
public String getNetworkCountryIso() {
- return mTelManager.getNetworkCountryIso();
+ if (mTelManager != null) {
+ return mTelManager.getNetworkCountryIso();
+ }
+ return "";
+ }
+
+ /**
+ * @return MCC+MNC (mobile country code + mobile network code) as
+ * the numeric name of the current registered operator.
+ */
+ @CalledByNative
+ public String getNetworkOperator() {
+ if (mTelManager != null) {
+ return mTelManager.getNetworkOperator();
+ }
+ return "";
}
/**
« no previous file with comments | « content/common/android/device_telephony_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698