From ba840e7417c64e9aa00c055c21edc38d5aba6727 Mon Sep 17 00:00:00 2001 From: Wayne Lin Date: Sat, 17 Feb 2024 11:03:52 +0800 Subject: [PATCH 1/2] gps: maintain one solution Move the rules from ag/27080484 Bug: 315915958 Test: build pass and GPS function works Change-Id: I730a7af2b8456ae4a350dbd0d6bdbfe7d3484b18 Merged-In: I730a7af2b8456ae4a350dbd0d6bdbfe7d3484b18 --- gps/lsi/sepolicy/device.te | 1 + gps/lsi/sepolicy/file.te | 4 ++++ gps/lsi/sepolicy/file_contexts | 4 +--- gps/lsi/sepolicy/property.te | 1 + gps/lsi/sepolicy/property_contexts | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 gps/lsi/sepolicy/device.te create mode 100644 gps/lsi/sepolicy/property.te create mode 100644 gps/lsi/sepolicy/property_contexts diff --git a/gps/lsi/sepolicy/device.te b/gps/lsi/sepolicy/device.te new file mode 100644 index 0000000..15d049f --- /dev/null +++ b/gps/lsi/sepolicy/device.te @@ -0,0 +1 @@ +type vendor_gnss_device, dev_type; diff --git a/gps/lsi/sepolicy/file.te b/gps/lsi/sepolicy/file.te index af9582b..246700a 100644 --- a/gps/lsi/sepolicy/file.te +++ b/gps/lsi/sepolicy/file.te @@ -1 +1,5 @@ type vendor_gps_file, file_type, data_file_type; +type sysfs_gps, sysfs_type, fs_type; +userdebug_or_eng(` + typeattribute vendor_gps_file mlstrustedobject; +') diff --git a/gps/lsi/sepolicy/file_contexts b/gps/lsi/sepolicy/file_contexts index 9840eab..e6af3b1 100644 --- a/gps/lsi/sepolicy/file_contexts +++ b/gps/lsi/sepolicy/file_contexts @@ -7,6 +7,4 @@ /vendor/bin/hw/swcnd u:object_r:swcnd_exec:s0 /vendor/bin/hw/spad u:object_r:spad_exec:s0 /vendor/bin/hw/android.hardware.gnss-service u:object_r:hal_gnss_default_exec:s0 -/vendor/bin/gnss_check\.sh u:object_r:gnss_check_exec:s0 -# keep only one rule and use eGNSS one -# /data/vendor/gps(/.*)? u:object_r:vendor_gps_file:s0 +/data/vendor/gps(/.*)? u:object_r:vendor_gps_file:s0 diff --git a/gps/lsi/sepolicy/property.te b/gps/lsi/sepolicy/property.te new file mode 100644 index 0000000..6b62560 --- /dev/null +++ b/gps/lsi/sepolicy/property.te @@ -0,0 +1 @@ +vendor_internal_prop(vendor_gps_prop) diff --git a/gps/lsi/sepolicy/property_contexts b/gps/lsi/sepolicy/property_contexts new file mode 100644 index 0000000..4546116 --- /dev/null +++ b/gps/lsi/sepolicy/property_contexts @@ -0,0 +1,2 @@ +vendor.gps. u:object_r:vendor_gps_prop:s0 +persist.vendor.gps. u:object_r:vendor_gps_prop:s0 From b4a21a0e1417c329ea9a80c85d80ff7da4cd9244 Mon Sep 17 00:00:00 2001 From: Ray Hsu Date: Tue, 11 Jun 2024 04:34:57 +0000 Subject: [PATCH 2/2] Revert "Add one variable to decide if need TTS voice packs" This reverts commit b52878371b4d29dbba7b0c19c4d34bf57cbd4f5f. Reason for revert: Bug: 140145973 Change-Id: Iacbe0cac6f7d68eac8b2155795e918edd1e73e25 --- device.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/device.mk b/device.mk index 45b7da8..4787315 100644 --- a/device.mk +++ b/device.mk @@ -14,9 +14,7 @@ # limitations under the License. # -ifeq (,$(filter true, $(PRODUCT_WITHOUT_TTS_VOICE_PACKS))) include device/google/gs-common/tts/voice_packs.mk -endif PRODUCT_SOONG_NAMESPACES += \ device/google/gs-common/powerstats