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

Unified Diff: content/common/android/device_telephony_info.cc

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
Index: content/common/android/device_telephony_info.cc
diff --git a/content/common/android/device_telephony_info.cc b/content/common/android/device_telephony_info.cc
index 1fc10aca3296b34b718d07d495b99035927677f1..f861fe0a633b153ae8266fb6129692689dcbe806 100644
--- a/content/common/android/device_telephony_info.cc
+++ b/content/common/android/device_telephony_info.cc
@@ -31,6 +31,13 @@ std::string DeviceTelephonyInfo::GetNetworkCountryIso() {
return ConvertJavaStringToUTF8(result);
}
+std::string DeviceTelephonyInfo::GetNetworkOperator() {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jstring> result =
+ Java_DeviceTelephonyInfo_getNetworkOperator(env, j_device_info_.obj());
+ return ConvertJavaStringToUTF8(result);
+}
+
// static
bool DeviceTelephonyInfo::RegisterDeviceTelephonyInfo(JNIEnv* env) {
return RegisterNativesImpl(env);

Powered by Google App Engine
This is Rietveld 408576698