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

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

Issue 254823005: Move android Telephony APIs to from content/ to net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NET_EXPORT the moved APIs. 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/content_jni.gypi ('k') | content/renderer/render_view_impl.cc » ('j') | 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
deleted file mode 100644
index ce55400a183972f522c76e5f53503cc29a5311c3..0000000000000000000000000000000000000000
--- a/content/public/android/java/src/org/chromium/content/common/DeviceTelephonyInfo.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2012 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.content.common;
-
-import android.content.Context;
-import android.telephony.TelephonyManager;
-
-import org.chromium.base.CalledByNative;
-
-/**
- * This class facilitates access to the current telephony region,
- * typically only available using the Java SDK.
- */
-public class DeviceTelephonyInfo {
-
- private TelephonyManager mTelManager;
-
- private DeviceTelephonyInfo(Context context) {
- Context appContext = context.getApplicationContext();
- mTelManager = (TelephonyManager) appContext.getSystemService(Context.TELEPHONY_SERVICE);
- }
-
- /**
- * @return The ISO country code equivalent of the current MCC.
- */
- @CalledByNative
- public String 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 "";
- }
-
- /**
- * Creates DeviceTelephonyInfo for a given Context.
- *
- * @param context A context to use.
- * @return DeviceTelephonyInfo associated with a given Context.
- */
- @CalledByNative
- public static DeviceTelephonyInfo create(Context context) {
- return new DeviceTelephonyInfo(context);
- }
-}
« no previous file with comments | « content/content_jni.gypi ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698