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

Unified Diff: net/android/java/src/org/chromium/net/NetworkInfo.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 | « no previous file | net/android/net_jni_registrar.cc » ('j') | net/base/net_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/android/java/src/org/chromium/net/NetworkInfo.java
diff --git a/net/android/java/src/org/chromium/net/NetworkInfo.java b/net/android/java/src/org/chromium/net/NetworkInfo.java
new file mode 100644
index 0000000000000000000000000000000000000000..1bf01c35195035880cea37dbc0432c02a7374037
--- /dev/null
+++ b/net/android/java/src/org/chromium/net/NetworkInfo.java
@@ -0,0 +1,22 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser;
+
+import android.content.Context;
+import android.telephony.TelephonyManager;
+
+import org.chromium.base.CalledByNative;
+
+/**
+ * Provides access to information about the network a device is connected to.
+ */
+public class NetworkInfo {
+ @CalledByNative
+ private static String getNetworkOperator(Context context) {
+ TelephonyManager telephonyManager =
+ (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
+ return telephonyManager.getNetworkOperator();
+ }
+}
« no previous file with comments | « no previous file | net/android/net_jni_registrar.cc » ('j') | net/base/net_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698