Enable hardware.radio@1.4.

Test: None
Change-Id: I3fb03d30aa06460185f08020b85c7abe1e9c8bd7
diff --git a/shared/config/manifest.xml b/shared/config/manifest.xml
index b235b80..e0dbb18 100644
--- a/shared/config/manifest.xml
+++ b/shared/config/manifest.xml
@@ -178,14 +178,12 @@
             <instance>default</instance>
         </interface>
     </hal>
+    <!-- cuttlefish doesn't support SIM slot 2 -->
+    <!-- TODO need ISap 1.2 and IRadioConfig 1.2 supported-->
     <hal format="hidl">
         <name>android.hardware.radio</name>
         <transport>hwbinder</transport>
-        <version>1.1</version>
-        <interface>
-            <name>IRadio</name>
-            <instance>slot1</instance>
-        </interface>
+        <fqname>@1.4::IRadio/slot1</fqname>
     </hal>
     <hal format="hidl">
         <name>android.hardware.sensors</name>
diff --git a/shared/phone/device.mk b/shared/phone/device.mk
index a4c4813..1ff85c4 100644
--- a/shared/phone/device.mk
+++ b/shared/phone/device.mk
@@ -42,7 +42,14 @@
     Telecom \
     TeleService \
     libvsoc-ril \
-    rild \
+
+ifeq ($(PLATFORM_VERSION), $(word 1, $(sort Q $(PLATFORM_VERSION))))
+    PRODUCT_PACKAGES += \
+        libvsoc-rild
+else
+    PRODUCT_PACKAGES += \
+        rild
+endif
 
 PRODUCT_COPY_FILES += \
     frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml
diff --git a/shared/sepolicy/file_contexts b/shared/sepolicy/file_contexts
index d6a14a9..1497415 100644
--- a/shared/sepolicy/file_contexts
+++ b/shared/sepolicy/file_contexts
@@ -28,6 +28,7 @@
 /vendor/bin/vsoc_guest_region_e2e_test  u:object_r:vsoc_guest_region_e2e_test_exec:s0
 /vendor/bin/vport_trigger  u:object_r:vport_trigger_exec:s0
 /vendor/bin/rename_netiface  u:object_r:rename_netiface_exec:s0
+/vendor/bin/hw/libvsoc-rild  u:object_r:rild_exec:s0
 /vendor/bin/hw/android\.hardware\.power\.stats@1\.0-service\.mock  u:object_r:hal_power_stats_default_exec:s0
 /vendor/bin/hw/android\.hardware\.bluetooth@1\.0-service\.sim  u:object_r:hal_bluetooth_sim_exec:s0
 /vendor/bin/hw/android\.hardware\.dumpstate@1\.0-service\.cuttlefish  u:object_r:hal_dumpstate_impl_exec:s0