// Path: app/src/main/java/dynoapps/exchange_rates/util/AppUtils.java
// public class AppUtils {
// 
//     public static PackageInfo getPackageInfo(Context context) {
//         try {
//             return context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
//         } catch (PackageManager.NameNotFoundException e) {
//             // Should not happen.
//             throw new RuntimeException("Could not get package name: " + e);
//         }
//     }
// 
//     public static String getAppVersion() {
//         Context context = App.context();
//         PackageInfo pInfo;
//         pInfo = getPackageInfo(context);
//         return pInfo.versionName;
//     }
// 
//     public static String getPlainVersion() {
//         String version = getAppVersion();
//         if (TextUtils.isEmpty(version)) return "";
//         return version.split(" ")[0];
//     }
// 
//     /**
//      * Converts to http://semver.org/ standards.
//      */
//     public static String getAppVersionForSemver() {
//         String appVersion = getAppVersion();
//         return versionSemverCompat(appVersion, 3);
//     }
// 
// 
//     public static String versionSemverCompat(String version, int max_digit) {
//         if (TextUtils.isEmpty(version)) return "";
//         else {
//             String firstPart = version.split(" ")[0];
//             String[] splittedSemVer = firstPart.split("\\.");
//             ArrayList<String> parts = new ArrayList<>();
//             Collections.addAll(parts, splittedSemVer);
//             for (int i = parts.size(); i < max_digit; i++) {
//                 parts.add("0");
//             }
//             List<String> limitedParts = parts.subList(0, max_digit);
//             return TextUtils.join(".", limitedParts);
//         }
//     }
// }


import android.content.Context;
import android.content.pm.PackageInfo;
import dynoapps.exchange_rates.util.AppUtils;
        return BuildConfig.DEBUG;
    }

    public static boolean isNotReleaseType() {
        return getReleaseType() == ReleaseTypes.Alpha || getReleaseType() == ReleaseTypes.Beta || getReleaseType() == ReleaseTypes.Debug;
    }

    public static boolean isProd() {
        return getReleaseType() == ReleaseTypes.Prod;
    }

    public static boolean isAlpha() {
        return getReleaseType() == ReleaseTypes.Alpha;
    }

    public static boolean canUpdate() {
        return PublishSettings.getReleaseType() == PublishSettings.ReleaseTypes.Alpha
                || PublishSettings.getReleaseType() == PublishSettings.ReleaseTypes.Beta
                || PublishSettings.getReleaseType() == ReleaseTypes.Uat;

    }

    /**
     * Returns release rate_type by extracting build rate_type from version name. Build Type
     * extracted from application versionNameSuffix
     */
    private static ReleaseTypes getReleaseTypeByVersionName() {
        PackageInfo pInfo;
        Context context = App.context();
        if (context != null) {
// Path: app/src/main/java/dynoapps/exchange_rates/util/AppUtils.java
// public class AppUtils {
// 
//     public static PackageInfo getPackageInfo(Context context) {
//         try {
//             return context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
//         } catch (PackageManager.NameNotFoundException e) {
//             // Should not happen.
//             throw new RuntimeException("Could not get package name: " + e);
//         }
//     }
// 
//     public static String getAppVersion() {
//         Context context = App.context();
//         PackageInfo pInfo;
//         pInfo = getPackageInfo(context);
//         return pInfo.versionName;
//     }
// 
//     public static String getPlainVersion() {
//         String version = getAppVersion();
//         if (TextUtils.isEmpty(version)) return "";
//         return version.split(" ")[0];
//     }
// 
//     /**
//      * Converts to http://semver.org/ standards.
//      */
//     public static String getAppVersionForSemver() {
//         String appVersion = getAppVersion();
//         return versionSemverCompat(appVersion, 3);
//     }
// 
// 
//     public static String versionSemverCompat(String version, int max_digit) {
//         if (TextUtils.isEmpty(version)) return "";
//         else {
//             String firstPart = version.split(" ")[0];
//             String[] splittedSemVer = firstPart.split("\\.");
//             ArrayList<String> parts = new ArrayList<>();
//             Collections.addAll(parts, splittedSemVer);
//             for (int i = parts.size(); i < max_digit; i++) {
//                 parts.add("0");
//             }
//             List<String> limitedParts = parts.subList(0, max_digit);
//             return TextUtils.join(".", limitedParts);
//         }
//     }
// }


// Path: app/src/main/java/dynoapps/exchange_rates/PublishSettings.java
import android.content.Context;
import android.content.pm.PackageInfo;
import dynoapps.exchange_rates.util.AppUtils;

        return BuildConfig.DEBUG;
    }

    public static boolean isNotReleaseType() {
        return getReleaseType() == ReleaseTypes.Alpha || getReleaseType() == ReleaseTypes.Beta || getReleaseType() == ReleaseTypes.Debug;
    }

    public static boolean isProd() {
        return getReleaseType() == ReleaseTypes.Prod;
    }

    public static boolean isAlpha() {
        return getReleaseType() == ReleaseTypes.Alpha;
    }

    public static boolean canUpdate() {
        return PublishSettings.getReleaseType() == PublishSettings.ReleaseTypes.Alpha
                || PublishSettings.getReleaseType() == PublishSettings.ReleaseTypes.Beta
                || PublishSettings.getReleaseType() == ReleaseTypes.Uat;

    }

    /**
     * Returns release rate_type by extracting build rate_type from version name. Build Type
     * extracted from application versionNameSuffix
     */
    private static ReleaseTypes getReleaseTypeByVersionName() {
        PackageInfo pInfo;
        Context context = App.context();
        if (context != null) {
            pInfo = AppUtils.getPackageInfo(context);