Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ed3bc6c authored by Stefan Niedermann's avatar Stefan Niedermann
Browse files

Restore breaking change of 0.5.5

parent c358c436
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -49,6 +49,14 @@ public final class VersionCheckHelper {
        return false;
    }

    /**
     * @deprecated use {@link #getNextcloudFilesVersionCode(Context, boolean)}
     */
    @Deprecated
    public static int getNextcloudFilesVersionCode(Context context) throws PackageManager.NameNotFoundException {
        return getNextcloudFilesVersionCode(context, true);
    }

    public static int getNextcloudFilesVersionCode(Context context, boolean prod) throws PackageManager.NameNotFoundException {
        PackageInfo pInfo = context.getPackageManager().getPackageInfo(prod ? Constants.PACKAGE_NAME_PROD : Constants.PACKAGE_NAME_DEV, 0);
        int verCode = pInfo.versionCode;