Fix up telephony property denials
Remove obsolete telephony properties and annotate the ones that are
being used with specific types, so we can whitelist vendor_init setting
them.
Bug: 129435174
Change-Id: Ie85334063017faee03632bcd479a2992cb3ea28b
diff --git a/shared/auto/device.mk b/shared/auto/device.mk
index cd4c9c9..32e7f27 100644
--- a/shared/auto/device.mk
+++ b/shared/auto/device.mk
@@ -56,11 +56,6 @@
rild.libpath=libcuttlefish-ril.so \
ro.cdma.home.operator.alpha=Android \
ro.cdma.home.operator.numeric=302780 \
- ro.gsm.home.operator.alpha=Android \
- ro.gsm.home.operator.numeric=302780 \
- gsm.sim.operator.numeric=302780 \
- gsm.sim.operator.alpha=Android \
- gsm.sim.operator.iso-country=us
# vehicle HAL
PRODUCT_PACKAGES += android.hardware.automotive.vehicle@2.0-service
diff --git a/shared/gsi/device.mk b/shared/gsi/device.mk
index 06e3d61..6dfdd8e 100644
--- a/shared/gsi/device.mk
+++ b/shared/gsi/device.mk
@@ -29,14 +29,9 @@
PRODUCT_PROPERTY_OVERRIDES += \
keyguard.no_require_sim=true \
- vendor.rild.libpath=libcuttlefish-ril.so \
ro.cdma.home.operator.alpha=Android \
ro.cdma.home.operator.numeric=302780 \
- ro.gsm.home.operator.alpha=Android \
- ro.gsm.home.operator.numeric=302780 \
- gsm.sim.operator.numeric=302780 \
- gsm.sim.operator.alpha=Android \
- gsm.sim.operator.iso-country=us
+ vendor.rild.libpath=libcuttlefish-ril.so \
PRODUCT_PACKAGES += \
MmsService \
diff --git a/shared/phone/device.mk b/shared/phone/device.mk
index ccb43e5..0a45cf8 100644
--- a/shared/phone/device.mk
+++ b/shared/phone/device.mk
@@ -29,11 +29,6 @@
rild.libpath=libcuttlefish-ril.so \
ro.cdma.home.operator.alpha=Android \
ro.cdma.home.operator.numeric=302780 \
- ro.gsm.home.operator.alpha=Android \
- ro.gsm.home.operator.numeric=302780 \
- gsm.sim.operator.numeric=302780 \
- gsm.sim.operator.alpha=Android \
- gsm.sim.operator.iso-country=us
PRODUCT_PACKAGES += \
MmsService \
diff --git a/shared/sepolicy/property_contexts b/shared/sepolicy/property_contexts
index c2cc9d2..d1fe5fe 100644
--- a/shared/sepolicy/property_contexts
+++ b/shared/sepolicy/property_contexts
@@ -1,5 +1,7 @@
sys.cf.ser. u:object_r:sys_cf_ser_prop:s0
vendor.ser. u:object_r:vendor_ser_prop:s0
ro.boot.vsock_logcat_port u:object_r:vsock_logcat_port_prop:s0
+ro.cdma.home.operator.alpha u:object_r:vendor_init_radio_prop:s0
+ro.cdma.home.operator.numeric u:object_r:vendor_init_radio_prop:s0
vendor.vsock_logcat_status u:object_r:vsock_logcat_status_prop:s0
vendor.ser.cf-logcat u:object_r:cf_logcat_path_prop:s0
diff --git a/shared/sepolicy/vendor_init.te b/shared/sepolicy/vendor_init.te
index 4dbeb6e..66bab7e 100644
--- a/shared/sepolicy/vendor_init.te
+++ b/shared/sepolicy/vendor_init.te
@@ -1,6 +1,10 @@
+type vendor_init_radio_prop, property_type;
+
allow vendor_init {
audio_device
input_events_device
libcuttlefish_rild_device
region_screen_device
}:chr_file { getattr };
+
+set_prop(vendor_init, vendor_init_radio_prop)
diff --git a/shared/tablet_3g/device.mk b/shared/tablet_3g/device.mk
index fc572ad..06e3dbe 100644
--- a/shared/tablet_3g/device.mk
+++ b/shared/tablet_3g/device.mk
@@ -27,11 +27,6 @@
rild.libpath=libcuttlefish-ril.so \
ro.cdma.home.operator.alpha=Android \
ro.cdma.home.operator.numeric=302780 \
- ro.gsm.home.operator.alpha=Android \
- ro.gsm.home.operator.numeric=302780 \
- gsm.sim.operator.numeric=302780 \
- gsm.sim.operator.alpha=Android \
- gsm.sim.operator.iso-country=us \
PRODUCT_PACKAGES += \
MmsService \