From ed20f633224adbf17e42b4c2af9b9cb1b09fde99 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 13:08:58 -0700 Subject: [PATCH] Add "all files access" permission to the Android permissions dialog --- app/phone-ui/permissions-view-model.ts | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/app/phone-ui/permissions-view-model.ts b/app/phone-ui/permissions-view-model.ts index af04e294..fbc05c1d 100644 --- a/app/phone-ui/permissions-view-model.ts +++ b/app/phone-ui/permissions-view-model.ts @@ -13,6 +13,7 @@ import { } from "../g2/android-permissions"; import { ensureCalendarPermission, hasCalendarPermission } from "../native/calendar-permissions"; import { isIgnoringBatteryOptimizations, requestIgnoreBatteryOptimizations } from "../native/battery-optimization"; +import { hasAllFilesAccess, requestAllFilesAccess } from "../native/file-access"; import { isNotificationListenerEnabled, requestNotificationListenerAccess } from "../native/notification-access"; type PermissionDefinition = { @@ -26,9 +27,10 @@ type PermissionDefinition = { }; /** - * Battery Optimization and Read Notifications are not runtime permissions: - * their request() opens a system screen, so the granted state can only be - * re-checked when the app resumes (the page refreshes on Application.resume). + * Battery Optimization, Read Notifications and All Files Access are not + * runtime permissions: their request() opens a system screen, so the granted + * state can only be re-checked when the app resumes (the page refreshes on + * Application.resume). */ const ANDROID_PERMISSIONS: PermissionDefinition[] = [ { @@ -89,6 +91,14 @@ const ANDROID_PERMISSIONS: PermissionDefinition[] = [ isGranted: hasCalendarPermission, request: ensureCalendarPermission, }, + { + id: "all-files-access", + title: "All Files Access", + description: "Needed to browse and view files in the Files app on the glasses.", + optional: true, + isGranted: hasAllFilesAccess, + request: requestAllFilesAccess, + }, ]; const PERMISSIONS: PermissionDefinition[] = global.isIOS ? [{ @@ -132,8 +142,9 @@ export class PermissionsViewModel extends Observable { } /** - * Battery Optimization and Read Notifications grant flows leave the app for - * a system screen; re-check everything whenever the app comes back. + * Battery Optimization, Read Notifications and All Files Access grant flows + * leave the app for a system screen; re-check everything whenever the app + * comes back. */ private readonly onAppResume = (): void => this.refresh();