Bug 1265971 - Style fix to make checkstyle happy r=grisha
authorGrigory Kruglov <gkruglov@mozilla.com>
Tue, 19 Apr 2016 23:12:27 -0700
changeset 331679 973dfa15822126c39ea2d98d34ac16643b040243
parent 331678 d42b25947fc26a0f9eab98d631465b72769553bd
child 331858 f05a1242fb29023bd7ebc492897ed3d6907733c7
child 331927 f9fc0c367d89188d01677da6cf85bb2097e85605
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgrisha
bugs1265971
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1265971 - Style fix to make checkstyle happy r=grisha MozReview-Commit-ID: FjqK8T5IcEt
mobile/android/base/java/org/mozilla/gecko/GeckoNetworkManager.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoNetworkManager.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoNetworkManager.java
@@ -330,22 +330,21 @@ public class GeckoNetworkManager extends
         }
 
         ConnectivityManager cm = (ConnectivityManager) appContext.getSystemService(Context.CONNECTIVITY_SERVICE);
         if (cm == null) {
           Log.e(LOGTAG, "Connectivity service does not exist");
           return null;
         }
 
-        NetworkInfo ni = null;
         try {
-            ni = cm.getActiveNetworkInfo();
-        } catch (SecurityException se) {} // if we don't have the permission, fall through to null check
-
-        return ni;
+            return cm.getActiveNetworkInfo();
+        } catch (SecurityException se) {
+            return null;
+        }
     }
 
     private ConnectionType getConnectionType() {
         NetworkInfo ni = getConnectivityManager();
 
         if (ni == null) {
             return ConnectionType.NONE;
         }