Hot fix connectivity leak (#1432)

* Fixed bug #1399

* Changed visibility from visible to gone

* Changed behaviour according to review

* Changed bottom sheet visibility from visible to gone

* Fix memory leak causing usage of activity as context
This commit is contained in:
neslihanturan 2018-04-11 12:40:13 +03:00 committed by Josephine Lim
parent 802b2a8df4
commit 482b06ccf0

View file

@ -9,7 +9,7 @@ public class NetworkUtils {
public static boolean isInternetConnectionEstablished(Context context) {
ConnectivityManager cm =
(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
(ConnectivityManager)context.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
return activeNetwork != null &&