diff --git a/app/src/main/java/app/revanced/integrations/shared/checks/CheckEnvironmentPatch.java b/app/src/main/java/app/revanced/integrations/shared/checks/CheckEnvironmentPatch.java index c75beb34f4..0aad321c20 100644 --- a/app/src/main/java/app/revanced/integrations/shared/checks/CheckEnvironmentPatch.java +++ b/app/src/main/java/app/revanced/integrations/shared/checks/CheckEnvironmentPatch.java @@ -188,7 +188,6 @@ private static class CheckIsNearPatchTime extends Check { */ long durationBetweenPatchingAndInstallation; - @NonNull @Override protected Boolean check() { try { @@ -214,7 +213,8 @@ protected Boolean check() { } // User installed more than 30 minutes after patching. - return false; + // Don't fail this, to allow adb install of older patched apps. + return null; } @Override @@ -273,15 +273,17 @@ public static void check(Activity context) { CheckIsNearPatchTime nearPatchTime = new CheckIsNearPatchTime(); Boolean timeCheckPassed = nearPatchTime.check(); - if (timeCheckPassed && !DEBUG_ALWAYS_SHOW_CHECK_FAILED_DIALOG) { - if (failedChecks.isEmpty()) { - // Recently patched and installed. No further checks are needed. - // Stopping here also prevents showing warnings if patching and installing with Termux. - Check.disableForever(); - return; + if (timeCheckPassed != null) { + if (timeCheckPassed && !DEBUG_ALWAYS_SHOW_CHECK_FAILED_DIALOG) { + if (failedChecks.isEmpty()) { + // Recently patched and installed. No further checks are needed. + // Stopping here also prevents showing warnings if patching and installing with Termux. + Check.disableForever(); + return; + } + } else { + failedChecks.add(nearPatchTime); } - } else { - failedChecks.add(nearPatchTime); } CheckExpectedInstaller installerCheck = new CheckExpectedInstaller();