mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-06 01:55:50 +01:00
fix(YouTube - Check environment patch): Allow adb installs even if patched more than 30 minutes ago
This commit is contained in:
parent
5f6239b610
commit
5adf8bdd67
@ -188,7 +188,6 @@ public final class CheckEnvironmentPatch {
|
|||||||
*/
|
*/
|
||||||
long durationBetweenPatchingAndInstallation;
|
long durationBetweenPatchingAndInstallation;
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean check() {
|
protected Boolean check() {
|
||||||
try {
|
try {
|
||||||
@ -214,7 +213,8 @@ public final class CheckEnvironmentPatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// User installed more than 30 minutes after patching.
|
// 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
|
@Override
|
||||||
@ -273,15 +273,17 @@ public final class CheckEnvironmentPatch {
|
|||||||
|
|
||||||
CheckIsNearPatchTime nearPatchTime = new CheckIsNearPatchTime();
|
CheckIsNearPatchTime nearPatchTime = new CheckIsNearPatchTime();
|
||||||
Boolean timeCheckPassed = nearPatchTime.check();
|
Boolean timeCheckPassed = nearPatchTime.check();
|
||||||
if (timeCheckPassed && !DEBUG_ALWAYS_SHOW_CHECK_FAILED_DIALOG) {
|
if (timeCheckPassed != null) {
|
||||||
if (failedChecks.isEmpty()) {
|
if (timeCheckPassed && !DEBUG_ALWAYS_SHOW_CHECK_FAILED_DIALOG) {
|
||||||
// Recently patched and installed. No further checks are needed.
|
if (failedChecks.isEmpty()) {
|
||||||
// Stopping here also prevents showing warnings if patching and installing with Termux.
|
// Recently patched and installed. No further checks are needed.
|
||||||
Check.disableForever();
|
// Stopping here also prevents showing warnings if patching and installing with Termux.
|
||||||
return;
|
Check.disableForever();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
failedChecks.add(nearPatchTime);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
failedChecks.add(nearPatchTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckExpectedInstaller installerCheck = new CheckExpectedInstaller();
|
CheckExpectedInstaller installerCheck = new CheckExpectedInstaller();
|
||||||
|
Loading…
Reference in New Issue
Block a user