Add property for Bluetooth POF
Bug: 365462615
Test: make
Change-Id: Ice73a71d42189420adf905dc8f5469667e11e23e
diff --git a/private/compat/202404/202404.ignore.cil b/private/compat/202404/202404.ignore.cil
index 73058ef..67b6239 100644
--- a/private/compat/202404/202404.ignore.cil
+++ b/private/compat/202404/202404.ignore.cil
@@ -5,6 +5,7 @@
(typeattribute new_objects)
(typeattributeset new_objects
( new_objects
+ bluetooth_finder_prop
profcollectd_etr_prop
fstype_prop
binderfs_logs_transactions
diff --git a/private/gmscore_app.te b/private/gmscore_app.te
index 90194f9..fa3420a 100644
--- a/private/gmscore_app.te
+++ b/private/gmscore_app.te
@@ -156,6 +156,9 @@
get_prop(gmscore_app, quick_start_prop)
neverallow { domain -init -dumpstate -vendor_init -gmscore_app } quick_start_prop:file no_rw_file_perms;
+# Allow GmsCore to read Bluetotoh Power Off Finder property
+get_prop(gmscore_app, bluetooth_finder_prop)
+
# Do not allow getting permission-protected network information from sysfs.
neverallow gmscore_app sysfs_net:file *;
diff --git a/private/hal_bluetooth.te b/private/hal_bluetooth.te
index 53bbef2..2e03ea2 100644
--- a/private/hal_bluetooth.te
+++ b/private/hal_bluetooth.te
@@ -24,6 +24,7 @@
# Allow write access to bluetooth-specific properties
set_prop(hal_bluetooth, bluetooth_a2dp_offload_prop)
set_prop(hal_bluetooth, bluetooth_audio_hal_prop)
+set_prop(hal_bluetooth, bluetooth_finder_prop)
set_prop(hal_bluetooth, bluetooth_prop)
set_prop(hal_bluetooth, exported_bluetooth_prop)
diff --git a/private/property.te b/private/property.te
index 402585e..016a79b 100644
--- a/private/property.te
+++ b/private/property.te
@@ -80,6 +80,11 @@
system_restricted_prop(persist_sysui_ranking_update_prop)
system_restricted_prop(page_size_prop)
+# Properties with no restrictions
+until_board_api(202504, `
+ system_public_prop(bluetooth_finder_prop)
+')
+
# These types will be public starting at board api 202504
until_board_api(202504, `
system_restricted_prop(enable_16k_pages_prop)
diff --git a/private/property_contexts b/private/property_contexts
index 41ae9a2..207827b 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -588,6 +588,7 @@
persist.bluetooth.btsnoopenable u:object_r:exported_bluetooth_prop:s0 exact bool
persist.bluetooth.btsnoopdefaultmode u:object_r:bluetooth_prop:s0 exact enum empty disabled filtered full
persist.bluetooth.btsnooplogmode u:object_r:bluetooth_prop:s0 exact enum empty disabled filtered full
+persist.bluetooth.finder.supported u:object_r:bluetooth_finder_prop:s0 exact bool
persist.bluetooth.snooplogfilter.headers.enabled u:object_r:bluetooth_prop:s0 exact bool
persist.bluetooth.snooplogfilter.profiles.a2dp.enabled u:object_r:bluetooth_prop:s0 exact bool
persist.bluetooth.snooplogfilter.profiles.map u:object_r:bluetooth_prop:s0 exact enum empty disabled fullfilter header magic