// Path: app/src/main/java/nich/work/aequorea/Aequorea.java
// public class Aequorea extends Application {
//     private static Aequorea mApp;
//     private static String mCurrentTheme;
//     private static ExecutorService mExecutor;
//     
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         
//         mApp = this;
//         mCurrentTheme = ThemeHelper.getTheme();
//         mExecutor = Executors.newCachedThreadPool();
//     
//         initCache();
//         initFlurry();
//     }
// 
//     private void initFlurry() {
//         new FlurryAgent.Builder()
//                 .withDataSaleOptOut(false) //CCPA - the default value is false
//                 .withCaptureUncaughtExceptions(true)
//                 .withIncludeBackgroundSessionsInMetrics(true)
//                 .withLogLevel(Log.VERBOSE)
//                 .withPerformanceMetrics(FlurryPerformance.ALL)
//                 .build(this, "CXH6FJ9VS4P8K3K8BFN9");
//     }
//     
//     private void initCache() {
//         File cacheDir = new File(getCacheDir().getAbsolutePath() + File.separator + Constants.ARTICLE_PIC_CACHE);
//         RichText.initCacheDir(cacheDir);
//         ArticleCache.getCache();
//     }
//     
//     public static Application getApp() {
//         return mApp;
//     }
//     
//     public static String getCurrentTheme() {
//         return mCurrentTheme;
//     }
//     
//     public static boolean isLightTheme() {
//         return mCurrentTheme.equals(Constants.THEME_LIGHT);
//     }
//     
//     public static void setCurrentTheme(String theme) {
//         mCurrentTheme = theme;
//     }
//     
//     public static ExecutorService getExecutor(){
//         return mExecutor;
//     }
// }


import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import nich.work.aequorea.Aequorea;
package nich.work.aequorea.common.utils;



public class NetworkUtils {

    public static boolean isNetworkAvailable() {
        Context context = Aequorea.getApp();
        ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
    
        NetworkInfo info = null;
        if (connectivityManager != null) {
            info = connectivityManager.getActiveNetworkInfo();
        }
        return info != null && info.isAvailable();
    }
    
    public static boolean isWiFiNetwork() {
// Path: app/src/main/java/nich/work/aequorea/Aequorea.java
// public class Aequorea extends Application {
//     private static Aequorea mApp;
//     private static String mCurrentTheme;
//     private static ExecutorService mExecutor;
//     
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         
//         mApp = this;
//         mCurrentTheme = ThemeHelper.getTheme();
//         mExecutor = Executors.newCachedThreadPool();
//     
//         initCache();
//         initFlurry();
//     }
// 
//     private void initFlurry() {
//         new FlurryAgent.Builder()
//                 .withDataSaleOptOut(false) //CCPA - the default value is false
//                 .withCaptureUncaughtExceptions(true)
//                 .withIncludeBackgroundSessionsInMetrics(true)
//                 .withLogLevel(Log.VERBOSE)
//                 .withPerformanceMetrics(FlurryPerformance.ALL)
//                 .build(this, "CXH6FJ9VS4P8K3K8BFN9");
//     }
//     
//     private void initCache() {
//         File cacheDir = new File(getCacheDir().getAbsolutePath() + File.separator + Constants.ARTICLE_PIC_CACHE);
//         RichText.initCacheDir(cacheDir);
//         ArticleCache.getCache();
//     }
//     
//     public static Application getApp() {
//         return mApp;
//     }
//     
//     public static String getCurrentTheme() {
//         return mCurrentTheme;
//     }
//     
//     public static boolean isLightTheme() {
//         return mCurrentTheme.equals(Constants.THEME_LIGHT);
//     }
//     
//     public static void setCurrentTheme(String theme) {
//         mCurrentTheme = theme;
//     }
//     
//     public static ExecutorService getExecutor(){
//         return mExecutor;
//     }
// }


// Path: app/src/main/java/nich/work/aequorea/common/utils/NetworkUtils.java
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import nich.work.aequorea.Aequorea;

package nich.work.aequorea.common.utils;



public class NetworkUtils {

    public static boolean isNetworkAvailable() {
        Context context = Aequorea.getApp();
        ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
    
        NetworkInfo info = null;
        if (connectivityManager != null) {
            info = connectivityManager.getActiveNetworkInfo();
        }
        return info != null && info.isAvailable();
    }
    
    public static boolean isWiFiNetwork() {
        Context context = Aequorea.getApp();