// Path: app/src/main/java/com/creativetrends/app/simplicity/SimplicityApplication.java
// public class SimplicityApplication extends Application {
// 
//     @SuppressLint("StaticFieldLeak")
//     public static Context mContext;
// 
//     public static Context getContextOfApplication() {
//         return mContext;
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         mContext = getApplicationContext();
//         PreferenceManager.setDefaultValues(mContext, R.xml.settings, true);
//         PreferenceManager.setDefaultValues(mContext, R.xml.flags_settings, true);
//         PreferenceManager.setDefaultValues(mContext, R.xml.plugin_settings, true);
//         createNotificationChannel();
//        
// 
//     }
// 
//     //notification channel for Simplicity's downloader
//     private void createNotificationChannel() {
//        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
//                 CharSequence widget_name = getString(R.string.notifications_widget);
//                 String widget_description = getString(R.string.notifications_widget_description);
//                 int wimp = NotificationManager.IMPORTANCE_LOW;
// 
//                 NotificationChannel channel5 = new NotificationChannel(getString(R.string.notification_widget_channel), widget_name, wimp);
//                 channel5.setDescription(widget_description);
//                 channel5.setShowBadge(true);
//                 channel5.enableVibration(false);
//                 channel5.enableLights(true);
// 
//                 NotificationManager notificationManager = getSystemService(NotificationManager.class);
//                 assert notificationManager != null;
//                 if (notificationManager.getNotificationChannel(getString(R.string.notification_widget_channel)) == null) {
//                     notificationManager.createNotificationChannel(channel5);
// 
//                 }
// 
//             }
//     }
// 
// }
// 
// Path: app/src/main/java/com/creativetrends/app/simplicity/ui/Cardbar.java
// public class Cardbar {
// 
//     public static @CheckResult
//         Toast snackBar(Context context, CharSequence message_to_show, boolean duration) {
//         @SuppressLint("InflateParams")
//         View view = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.custom_snackbar, null);
//         AppCompatTextView message = view.findViewById(R.id.message);
//         message.setText(message_to_show);
//         Toast toast = new Toast(context);
//         toast.setView(view);
//         toast.setGravity(Gravity.FILL_HORIZONTAL | Gravity.BOTTOM, 0, 0);
//         if (duration) {
//             toast.setDuration(Toast.LENGTH_LONG);
//         } else {
//             toast.setDuration(Toast.LENGTH_SHORT);
//         }
//         return toast;
//     }
// 
// }


import android.app.Activity;
import android.app.DownloadManager;
import android.content.ActivityNotFoundException;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.net.ConnectivityManager;
import android.os.Build;
import android.os.Environment;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.WorkerThread;
import androidx.palette.graphics.Palette;
import com.creativetrends.app.simplicity.SimplicityApplication;
import com.creativetrends.app.simplicity.ui.Cardbar;
import com.creativetrends.simplicity.app.R;
import com.google.common.net.InternetDomainName;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.text.DecimalFormat;
import java.util.Random;
import java.util.UUID;
            return true;
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }

        return false;
    }



    public static void setLightStatusBar(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            int flags = activity.getWindow().getDecorView().getSystemUiVisibility(); // get current flag
            flags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;   // add LIGHT_STATUS_BAR to flag
            activity.getWindow().getDecorView().setSystemUiVisibility(flags);
        }
    }

    public static void clearLightStatusBar(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            int flags = activity.getWindow().getDecorView().getSystemUiVisibility(); // get current flag
            flags &= ~ View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; // use XOR here for remove LIGHT_STATUS_BAR from flags_settings
            activity.getWindow().getDecorView().setSystemUiVisibility(flags);
        }
    }

    public static void setLightNavigationBar(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            int flags = activity.getWindow().getDecorView().getSystemUiVisibility(); // get current flag
            flags |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;   // add LIGHT_STATUS_BAR to flag
// Path: app/src/main/java/com/creativetrends/app/simplicity/SimplicityApplication.java
// public class SimplicityApplication extends Application {
// 
//     @SuppressLint("StaticFieldLeak")
//     public static Context mContext;
// 
//     public static Context getContextOfApplication() {
//         return mContext;
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         mContext = getApplicationContext();
//         PreferenceManager.setDefaultValues(mContext, R.xml.settings, true);
//         PreferenceManager.setDefaultValues(mContext, R.xml.flags_settings, true);
//         PreferenceManager.setDefaultValues(mContext, R.xml.plugin_settings, true);
//         createNotificationChannel();
//        
// 
//     }
// 
//     //notification channel for Simplicity's downloader
//     private void createNotificationChannel() {
//        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
//                 CharSequence widget_name = getString(R.string.notifications_widget);
//                 String widget_description = getString(R.string.notifications_widget_description);
//                 int wimp = NotificationManager.IMPORTANCE_LOW;
// 
//                 NotificationChannel channel5 = new NotificationChannel(getString(R.string.notification_widget_channel), widget_name, wimp);
//                 channel5.setDescription(widget_description);
//                 channel5.setShowBadge(true);
//                 channel5.enableVibration(false);
//                 channel5.enableLights(true);
// 
//                 NotificationManager notificationManager = getSystemService(NotificationManager.class);
//                 assert notificationManager != null;
//                 if (notificationManager.getNotificationChannel(getString(R.string.notification_widget_channel)) == null) {
//                     notificationManager.createNotificationChannel(channel5);
// 
//                 }
// 
//             }
//     }
// 
// }
// 
// Path: app/src/main/java/com/creativetrends/app/simplicity/ui/Cardbar.java
// public class Cardbar {
// 
//     public static @CheckResult
//         Toast snackBar(Context context, CharSequence message_to_show, boolean duration) {
//         @SuppressLint("InflateParams")
//         View view = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.custom_snackbar, null);
//         AppCompatTextView message = view.findViewById(R.id.message);
//         message.setText(message_to_show);
//         Toast toast = new Toast(context);
//         toast.setView(view);
//         toast.setGravity(Gravity.FILL_HORIZONTAL | Gravity.BOTTOM, 0, 0);
//         if (duration) {
//             toast.setDuration(Toast.LENGTH_LONG);
//         } else {
//             toast.setDuration(Toast.LENGTH_SHORT);
//         }
//         return toast;
//     }
// 
// }


// Path: app/src/main/java/com/creativetrends/app/simplicity/utils/StaticUtils.java
import android.app.Activity;
import android.app.DownloadManager;
import android.content.ActivityNotFoundException;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.net.ConnectivityManager;
import android.os.Build;
import android.os.Environment;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.WorkerThread;
import androidx.palette.graphics.Palette;
import com.creativetrends.app.simplicity.SimplicityApplication;
import com.creativetrends.app.simplicity.ui.Cardbar;
import com.creativetrends.simplicity.app.R;
import com.google.common.net.InternetDomainName;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.text.DecimalFormat;
import java.util.Random;
import java.util.UUID;

            return true;
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }

        return false;
    }



    public static void setLightStatusBar(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            int flags = activity.getWindow().getDecorView().getSystemUiVisibility(); // get current flag
            flags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;   // add LIGHT_STATUS_BAR to flag
            activity.getWindow().getDecorView().setSystemUiVisibility(flags);
        }
    }

    public static void clearLightStatusBar(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            int flags = activity.getWindow().getDecorView().getSystemUiVisibility(); // get current flag
            flags &= ~ View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; // use XOR here for remove LIGHT_STATUS_BAR from flags_settings
            activity.getWindow().getDecorView().setSystemUiVisibility(flags);
        }
    }

    public static void setLightNavigationBar(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            int flags = activity.getWindow().getDecorView().getSystemUiVisibility(); // get current flag
            flags |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;   // add LIGHT_STATUS_BAR to flag
            activity.getWindow().getDecorView().setSystemUiVisibility(flags);