From 41903b21e16d4092d6923c6de378926a7b18d950 Mon Sep 17 00:00:00 2001 From: vm03 Date: Mon, 10 Aug 2015 22:22:42 +0600 Subject: [PATCH] Fix manual network search --- BoardConfig.mk | 3 ++ device_w7.mk | 3 +- .../java/com/android/internal/LgeRIL.java | 50 +++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 ril/telephony/java/com/android/internal/LgeRIL.java diff --git a/BoardConfig.mk b/BoardConfig.mk index f608ca2..c14e1d7 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -87,6 +87,9 @@ USE_OPENGL_RENDERER := true # Hardware tunables framework BOARD_HARDWARE_CLASS := device/lge/w7/cmhw/ +# RIL +BOARD_RIL_CLASS := ../../../device/lge/w7/ril/ + # Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/w7/bluetooth BOARD_HAVE_BLUETOOTH := true diff --git a/device_w7.mk b/device_w7.mk index 2834561..46b391e 100644 --- a/device_w7.mk +++ b/device_w7.mk @@ -335,7 +335,8 @@ PRODUCT_PROPERTY_OVERRIDES += \ persist.radio.call_type=1 \ ro.config.vc_call_vol_steps=7 \ ro.modem.no_wdog_chk=1 \ - persist.call_recording.enabled=1 + persist.call_recording.enabled=1 \ + ro.telephony.ril_class=LgeRIL PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mtp,adb diff --git a/ril/telephony/java/com/android/internal/LgeRIL.java b/ril/telephony/java/com/android/internal/LgeRIL.java new file mode 100644 index 0000000..b79dcd3 --- /dev/null +++ b/ril/telephony/java/com/android/internal/LgeRIL.java @@ -0,0 +1,50 @@ +/* +* Copyright (C) 2012 The CyanogenMod Project +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package com.android.internal.telephony; + +import static com.android.internal.telephony.RILConstants.*; + +import android.content.Context; +import android.os.AsyncResult; +import android.os.Message; + + +public class LgeRIL extends RIL implements CommandsInterface { + public LgeRIL(Context context, int networkMode, int cdmaSubscription, Integer instanceId) { + super(context, networkMode, cdmaSubscription, instanceId); + + mQANElements = 5; + } + + @Override + public void + setNetworkSelectionModeManual(String operatorNumeric, Message response) { + RILRequest rr + = RILRequest.obtain(RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, + response); + + if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + + " " + operatorNumeric); + + rr.mParcel.writeInt(2); + rr.mParcel.writeString(operatorNumeric); + rr.mParcel.writeString("NOCHANGE"); + + send(rr); + } + +}