1
0
Fork 0

frameworks: Add support for noril and wait rild

Signed-off-by: hmz007 <hmz007@gmail.com>
master
hmz007 4 years ago
parent ec43d978b8
commit 9c5b63a5f1

@ -390,6 +390,16 @@ public class RIL extends BaseCommands implements CommandsInterface {
riljLog("handleMessage: EVENT_RADIO_PROXY_DEAD cookie = " + msg.obj +
" mRadioProxyCookie = " + mRadioProxyCookie.get());
if ((long) msg.obj == mRadioProxyCookie.get()) {
if (mIsCellularSupported) {
int wait_ms = SystemProperties.getInt("ro.radio.ril_wait", 0);
if (wait_ms > 0 && wait_ms < 10000) {
try {
Thread.sleep(wait_ms);
} catch (InterruptedException e) {
// do nothing
}
}
}
resetProxyAndRequestList();
}
break;
@ -624,6 +634,23 @@ public class RIL extends BaseCommands implements CommandsInterface {
Context.TELEPHONY_SERVICE);
mIsCellularSupported = tm.isVoiceCapable() || tm.isSmsCapable() || tm.isDataCapable();
if (SystemProperties.getBoolean("ro.radio.noril", false)) {
riljLog("RIL: cellular disabled on ro.radio.noril");
mIsCellularSupported = false;
}
if (mIsCellularSupported) {
// Workaround: wait rild (i.e. libquectel-ril)
int wait_ms = SystemProperties.getInt("ro.radio.ril_wait", 0);
if (wait_ms > 0 && wait_ms < 10000) {
try {
Thread.sleep(wait_ms);
} catch (InterruptedException e) {
// do nothing
}
}
}
mRadioResponse = new RadioResponse(this);
mRadioIndication = new RadioIndication(this);
mRilHandler = new RilHandler();

Loading…
Cancel
Save