Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 447f1b35 authored by fionaxu's avatar fionaxu
Browse files

fix CTS failure for getNeighboringCellInfo

Some telephony APIs will hungs without sending result back
to the callers on Wifi-only devices. fix is returning the
asyncresult back to callers.

Test: run cts -c android.telephony.cts.CtsTelephonyTestCases
Bug:36369978
Change-Id: I729ad3c2e5a03c627d1261f4963887babca31fd7
parent f0dfcc5f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -494,6 +494,11 @@ public final class RIL extends BaseCommands implements CommandsInterface {
    private IRadio getRadioProxy(Message result) {
        if (!mIsMobileNetworkSupported) {
            if (RILJ_LOGV) riljLog("getRadioProxy: Not calling getService(): wifi-only");
            if (result != null) {
                AsyncResult.forMessage(result, null,
                        CommandException.fromRilErrno(RADIO_NOT_AVAILABLE));
                result.sendToTarget();
            }
            return null;
        }

@@ -535,6 +540,11 @@ public final class RIL extends BaseCommands implements CommandsInterface {
    private IOemHook getOemHookProxy(Message result) {
        if (!mIsMobileNetworkSupported) {
            if (RILJ_LOGV) riljLog("getOemHookProxy: Not calling getService(): wifi-only");
            if (result != null) {
                AsyncResult.forMessage(result, null,
                        CommandException.fromRilErrno(RADIO_NOT_AVAILABLE));
                result.sendToTarget();
            }
            return null;
        }