feat(Microsoft Lens): Remove migration to OneDrive (#6551)

Co-authored-by: Jamie Stumme <3059647+StummeJ@users.noreply.github.com>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
Jamie 2026-02-12 21:48:45 +01:00 committed by GitHub
parent ad92864483
commit e389632afd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 0 deletions

View file

@ -444,6 +444,10 @@ public final class app/revanced/patches/meta/ads/HideAdsPatchKt {
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/microsoft/officelens/misc/onedrive/HideOneDriveMigrationPatchKt {
public static final fun getHideOneDriveMigrationPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/mifitness/misc/locale/ForceEnglishLocalePatchKt {
public static final fun getForceEnglishLocalePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}

View file

@ -0,0 +1,11 @@
package app.revanced.patches.microsoft.officelens.misc.onedrive
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.AccessFlags
import app.revanced.patcher.fingerprint
internal val hasMigratedToOneDriveFingerprint = fingerprint {
custom { method, classDef ->
classDef.endsWith("FREManager;") && method.name == "getMigrationStage"
}
}

View file

@ -0,0 +1,22 @@
package app.revanced.patches.microsoft.officelens.misc.onedrive
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.bytecodePatch
@Suppress("unused")
val hideOneDriveMigrationPatch = bytecodePatch(
name = "Hide OneDrive migration",
description = "Hides the OneDrive migration prompt when opening Microsoft Office Lens.",
) {
compatibleWith("com.microsoft.office.officelens")
execute {
hasMigratedToOneDriveFingerprint.method.replaceInstructions(
0,
"""
sget-object v0, Lcom/microsoft/office/officelens/scansMigration/LensMigrationStage;->PreMigration:Lcom/microsoft/office/officelens/scansMigration/LensMigrationStage;
return-object v0
""",
)
}
}