From 983151716d9700c353ade24ad24d0d98f99f71a7 Mon Sep 17 00:00:00 2001 From: Sudheer Reddy Yampalla Date: Sat, 9 Feb 2013 09:36:27 +0530 Subject: [PATCH] device/qcom/common: Start two rild when dsds/dsda property enabled Change-Id: I133f0465f9898243b1d5a1ea727064de3928913c --- rootdir/Android.mk | 8 ++++++++ rootdir/etc/init.qcom.rc | 5 +++++ rootdir/etc/init.qcom.ril.sh | 38 ++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100755 rootdir/etc/init.qcom.ril.sh diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 31110168..405a023c 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -106,6 +106,14 @@ LOCAL_SRC_FILES := etc/init.qcom.class_main.sh LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) +include $(CLEAR_VARS) +LOCAL_MODULE := init.qcom.ril.sh +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := etc/init.qcom.ril.sh +LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) +include $(BUILD_PREBUILT) + include $(CLEAR_VARS) LOCAL_MODULE := init.qcom.usb.rc LOCAL_MODULE_TAGS := optional eng diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 7953a32e..a55462e7 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -258,6 +258,11 @@ service qcom-c_main-sh /system/bin/sh /init.qcom.class_main.sh user root oneshot +service ril-qmi /system/bin/sh /init.qcom.ril.sh + class main + user root + oneshot + on property:vold.decrypt=trigger_restart_framework start qcom-c_main-sh start config_bluetooth diff --git a/rootdir/etc/init.qcom.ril.sh b/rootdir/etc/init.qcom.ril.sh new file mode 100755 index 00000000..87f06b3c --- /dev/null +++ b/rootdir/etc/init.qcom.ril.sh @@ -0,0 +1,38 @@ +#!/system/bin/sh +# Copyright (c) 2013, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Linux Foundation nor +# the names of its contributors may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# +# start two rild when dsds property enabled +# +multisim=`getprop persist.multisim.config` +if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then + setprop ro.multi.rild true + stop ril-daemon + start ril-daemon + start ril-daemon1 +fi