mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
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:
parent
802b2a8df4
commit
482b06ccf0
1 changed files with 1 additions and 1 deletions
|
|
@ -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 &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue