| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import android.content.ActivityNotFoundException; | 7 import android.content.ActivityNotFoundException; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.content.Intent; | 9 import android.content.Intent; |
| 10 import android.security.KeyChain; | 10 import android.security.KeyChain; |
| 11 import android.telephony.TelephonyManager; | 11 import android.telephony.TelephonyManager; |
| 12 import android.util.Log; | 12 import android.util.Log; |
| 13 | 13 |
| 14 import org.chromium.base.CalledByNative; | 14 import org.chromium.base.CalledByNative; |
| 15 import org.chromium.base.CalledByNativeUnchecked; | 15 import org.chromium.base.annotations.CalledByNativeUnchecked; |
| 16 | 16 |
| 17 import java.net.NetworkInterface; | 17 import java.net.NetworkInterface; |
| 18 import java.net.SocketException; | 18 import java.net.SocketException; |
| 19 import java.net.URLConnection; | 19 import java.net.URLConnection; |
| 20 import java.security.KeyStoreException; | 20 import java.security.KeyStoreException; |
| 21 import java.security.NoSuchAlgorithmException; | 21 import java.security.NoSuchAlgorithmException; |
| 22 import java.security.cert.CertificateException; | 22 import java.security.cert.CertificateException; |
| 23 import java.util.Enumeration; | 23 import java.util.Enumeration; |
| 24 | 24 |
| 25 /** | 25 /** |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 */ | 195 */ |
| 196 @CalledByNative | 196 @CalledByNative |
| 197 private static String getNetworkOperator(Context context) { | 197 private static String getNetworkOperator(Context context) { |
| 198 TelephonyManager telephonyManager = | 198 TelephonyManager telephonyManager = |
| 199 (TelephonyManager) context.getSystemService(Context.TELEPHONY_SE
RVICE); | 199 (TelephonyManager) context.getSystemService(Context.TELEPHONY_SE
RVICE); |
| 200 if (telephonyManager == null) return ""; | 200 if (telephonyManager == null) return ""; |
| 201 return telephonyManager.getNetworkOperator(); | 201 return telephonyManager.getNetworkOperator(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } | 204 } |
| OLD | NEW |