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

Unverified Commit 2ec4c0ec authored by David Luhmer's avatar David Luhmer Committed by GitHub
Browse files

Merge pull request #295 from nextcloud/fix-breaking-change

Restore breaking change of 0.5.5
parents c358c436 6ed3bc6c
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;