Skip to content

Commit af827e2

Browse files
authored
feat(Google Photos): Add Enable DCIM folders backup control patch (#5138)
1 parent 97cd315 commit af827e2

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

patches/api/patches.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ public final class app/revanced/patches/googlenews/misc/gms/GmsCoreSupportPatchK
192192
public static final fun getGmsCoreSupportPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
193193
}
194194

195+
public final class app/revanced/patches/googlephotos/misc/backup/EnableDCIMFoldersBackupControlPatchKt {
196+
public static final fun getEnableDCIMFoldersBackupControlPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
197+
}
198+
195199
public final class app/revanced/patches/googlephotos/misc/extension/ExtensionPatchKt {
196200
public static final fun getExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
197201
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package app.revanced.patches.googlephotos.misc.backup
2+
3+
import app.revanced.patcher.patch.bytecodePatch
4+
import app.revanced.util.returnEarly
5+
6+
@Suppress("unused")
7+
val enableDCIMFoldersBackupControlPatch = bytecodePatch(
8+
name = "Enable DCIM folders backup control",
9+
description = "Disables always on backup for the Camera and other DCIM folders, allowing you to control backup " +
10+
"for each folder individually. This will make the app default to having no folders backed up.",
11+
use = false,
12+
) {
13+
compatibleWith("com.google.android.apps.photos")
14+
15+
execute {
16+
isDCIMFolderBackupControlDisabled.method.returnEarly(false)
17+
}
18+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package app.revanced.patches.googlephotos.misc.backup
2+
3+
import app.revanced.patcher.fingerprint
4+
5+
internal val isDCIMFolderBackupControlDisabled = fingerprint {
6+
returns("Z")
7+
strings("/dcim", "/mars_files/")
8+
}

0 commit comments

Comments
 (0)