Modern Apps git

← MAOS.git

maos: clarify SENSORS_OPTOUT comment, permission is ungrantable

Commit
edbd127070b0884b4da1864d2ef6acd0c490857a
Author
Vayun Mathur <[email protected]>
When
2026-11-08 17:40 UTC (27 days ago)
Parents
c0507ce

Diff

patches/frameworks_base.patch
diff --git a/patches/frameworks_base.patch b/patches/frameworks_base.patchindex 6d392c6..5009cbb 100644--- a/patches/frameworks_base.patch+++ b/patches/frameworks_base.patch@@ -894,9 +894,10 @@ diff --git a/services/core/java/com/android/server/pm/permission/SpecialRuntimeP           if (Manifest.permission.OTHER_SENSORS.equals(perm)) { +            // MAOS: SENSORS_OPTOUT withholds the GrapheneOS Sensors permission-+            // from the fresh-install auto-grant, so declaring apps install with-+            // Sensors denied (user-grantable per-app in Settings). The marker is-+            // protectionLevel normal, hence granted by install time.++            // from the fresh-install auto-grant as a failsafe. Declaring apps++            // never receive the implicit OTHER_SENSORS request at parse time,++            // so there is nothing for the user to grant, not even via Settings.++            // The marker is protectionLevel normal, hence granted by install time. +            if (ctx.getPackageManager().checkPermission( +                    "com.vayunmathur.permission.SENSORS_OPTOUT", packageName) +                    == PackageManager.PERMISSION_GRANTED) {