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

Commit 8bd64034 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Don't skip HAL proxy initialization on pre-AIDL devices

Bug: 335408177
Test: Make a VoWifi Call on pre-AIDL device
Test: Confirm receiving a call on Raven
Change-Id: Ic0e9a17c8951de89ada3bb5ff797227548e6567b
parent 9e02bd79
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -206,6 +206,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    boolean mIsRadioProxyInitialized = false;

    Boolean mIsRadioVersion20Cached = null;

    // When we are testing emergency calls using ril.test.emergencynumber, this will trigger test
    // ECbM when the call is ended.
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@@ -1124,7 +1126,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
        // Set radio callback; needed to set RadioIndication callback (should be done after
        // wakelock stuff is initialized above as callbacks are received on separate binder threads)
        for (int service = MIN_SERVICE_IDX; service <= MAX_SERVICE_IDX; service++) {
            if (!isRadioServiceSupported(service)) {
            if (isRadioVersion2_0() && !isRadioServiceSupported(service)) {
                riljLog("Not initializing " + serviceToString(service) + " (not supported)");
                continue;
            }
@@ -1146,12 +1148,13 @@ public class RIL extends BaseCommands implements CommandsInterface {
    }

    private boolean isRadioVersion2_0() {
        if (mIsRadioVersion20Cached != null) return mIsRadioVersion20Cached;
        for (int service = HAL_SERVICE_DATA; service <= MAX_SERVICE_IDX; service++) {
            if (isRadioServiceSupported(service)) {
                return true;
                return mIsRadioVersion20Cached = true;
            }
        }
        return false;
        return mIsRadioVersion20Cached = false;
    }

    private boolean isRadioServiceSupported(int service) {