Merge "Allow Bluetooth to use privapp_allowlist" into udc-mainline-prod
diff --git a/java/app.go b/java/app.go
index 0eb37c8..8d96557 100755
--- a/java/app.go
+++ b/java/app.go
@@ -288,7 +288,13 @@
}
if a.appProperties.Privapp_allowlist != nil && !Bool(a.appProperties.Privileged) {
- ctx.PropertyErrorf("privapp_allowlist", "privileged must be set in order to use privapp_allowlist")
+ // There are a few uids that are explicitly considered privileged regardless of their
+ // app's location. Bluetooth is one such app. It should arguably be moved to priv-app,
+ // but for now, allow it not to be in priv-app.
+ privilegedBecauseOfUid := ctx.ModuleName() == "Bluetooth"
+ if !privilegedBecauseOfUid {
+ ctx.PropertyErrorf("privapp_allowlist", "privileged must be set in order to use privapp_allowlist (with a few exceptions)")
+ }
}
for _, cert := range a.appProperties.Additional_certificates {