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

Commit 16556311 authored by LuK1337's avatar LuK1337 Committed by Łukasz Patron
Browse files

PhoneSwitcher: Fallback to HAL_COMMAND_ALLOW_DATA when DDS switch fails

SET_PREFERRED_DATA_MODEM is not supported on some legacy devices and
returns RADIO_NOT_AVAILABLE error msg, when that happens, fallback to
ALLOW_DATA.

Test: Use DDS switch on Sony nile phone using qcrild
Change-Id: I73bff53d420275fd329efff9685d11ce8cbe83b2
parent 8867373f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1894,6 +1894,11 @@ public class PhoneSwitcher extends Handler {
                    hold the retry until sim gets ready */
                    logl("onDdsSwitchResponse: Wait for SIM to get READY");
                    return;
                } else if (error == CommandException.Error.RADIO_NOT_AVAILABLE) {
                    logl("onDdsSwitchResponse: Falling back to HAL_COMMAND_ALLOW_DATA");
                    mHalCommandToUse = HAL_COMMAND_ALLOW_DATA;
                    sendRilCommands(phoneId);
                    return;
                }
            }
            logl("onDdsSwitchResponse: Scheduling DDS switch retry");