Chromium Code Reviews| Index: net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java |
| diff --git a/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java b/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java |
| index 472c0f771852ebdbddf1b789d480958dfe03bda2..7aa29a897bf4bb26d858937301177d182c9af4be 100644 |
| --- a/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java |
| +++ b/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java |
| @@ -245,12 +245,12 @@ class AndroidNetworkLibrary { |
| */ |
| @CalledByNative |
| private static String getNetworkCountryIso(Context context) { |
| - TelephonyManager telephonyManager = |
| - (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); |
| - if (telephonyManager != null) { |
| - return telephonyManager.getNetworkCountryIso(); |
| - } |
| - return ""; |
| + TelephonyManager telephonyManager = |
| + (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); |
| + if (telephonyManager != null) { |
|
whywhat
2014/10/15 23:12:38
nit:
if (telephonyManager == null) return "";
ret
aurimas (slooooooooow)
2014/10/15 23:29:48
Done.
|
| + return telephonyManager.getNetworkCountryIso(); |
| + } |
| + return ""; |
| } |
| /** |
| @@ -259,12 +259,12 @@ class AndroidNetworkLibrary { |
| */ |
| @CalledByNative |
| private static String getNetworkOperator(Context context) { |
| - TelephonyManager telephonyManager = |
| - (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); |
| - if (telephonyManager != null) { |
| - return telephonyManager.getNetworkOperator(); |
| - } |
| - return ""; |
| + TelephonyManager telephonyManager = |
| + (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); |
| + if (telephonyManager != null) { |
|
whywhat
2014/10/15 23:12:38
nit: ditto
aurimas (slooooooooow)
2014/10/15 23:29:48
Done.
|
| + return telephonyManager.getNetworkOperator(); |
| + } |
| + return ""; |
| } |
| } |