From 1c97ffb91bb4928022e995709d7e55b19cfd18eb Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 10 Oct 2026 15:50:39 +0200 Subject: feat(android): back up the files of folders the person chooses A Files section takes folders through the system picker (no storage permission), refuses DCIM, Pictures and Movies, skips what the photo backup sends, and runs on the photo backup's own runner into /-drive. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/tests/test_android_shell.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packages/meshbay-hub/tests/test_android_shell.py') diff --git a/packages/meshbay-hub/tests/test_android_shell.py b/packages/meshbay-hub/tests/test_android_shell.py index b5b0fa0..9275d67 100644 --- a/packages/meshbay-hub/tests/test_android_shell.py +++ b/packages/meshbay-hub/tests/test_android_shell.py @@ -136,7 +136,8 @@ def test_the_shim_offers_desktop_channels_and_native_answers_each(): native = set() for path in (SRC / "bridge" / "Channels.kt", SRC / "bridge" / "KeyChannels.kt", SRC / "cast" / "CastChannels.kt", SRC / "notify" / "PushChannels.kt", - SRC / "photos" / "PhotoChannels.kt", SRC / "phonesync" / "Destination.kt"): + SRC / "photos" / "PhotoChannels.kt", SRC / "phonesync" / "Destination.kt", + SRC / "drive" / "DriveChannels.kt"): native |= set(re.findall(r'^\s*"([\w:-]+)" ->', _read(path), flags=re.M)) # Contacts and messages share one class, its channels named by a prefix. docs = set(re.findall(r'^\s*"(\w+)" ->', _read(SRC / "phonesync" / "DocChannels.kt"), flags=re.M)) @@ -148,7 +149,7 @@ def test_the_shim_offers_desktop_channels_and_native_answers_each(): # address book to back up, and a desktop has none of them; those families are the ones the desktop lacks # rather than the ones it shares. phone_only = {c for c in shim if c.startswith(("push:", "photosync:", "phonesync:", "contactsync:", - "calendarsync:", "messagesync:"))} + "calendarsync:", "messagesync:", "drivesync:"))} assert any(c.startswith("push:") for c in phone_only), "the push channels are gone" assert any(c.startswith("photosync:") for c in phone_only), "the backup channels are gone" assert shim - phone_only <= preload, f"channels the desktop does not have: {shim - preload}" @@ -267,9 +268,10 @@ def test_only_the_personal_profile_is_backed_up(): assert "Profiles.isPersonal(this)" in activity and "const BACKUP = $backups;" in activity shim = _strip_js_comments(_read(SHIM)) gated = shim.split("...(BACKUP ? {", 1)[1].split("} : {}),", 1)[0] - for name in ("photoSync:", "phoneSync:", "contactSync:", "calendarSync:"): + for name in ("photoSync:", "phoneSync:", "contactSync:", "calendarSync:", "driveSync:"): assert name in gated, name for path in [*(SRC / "phonesync").rglob("*.kt"), *(SRC / "photos").rglob("*.kt"), + *(SRC / "drive").rglob("*.kt"), *(APP / "src" / "full").rglob("*.kt")]: assert not re.search(r"\.ENTERPRISE_\w+", _read(path)), path.name -- cgit v1.2.3