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

Commit 3f3d09a0 authored by Pierre-Hugues Husson's avatar Pierre-Hugues Husson Committed by Jackeagle
Browse files

telephony: forward-port support for forceCognitive

* This is needed on some MTK devices. Android 10 refactored some code,
  so now the "non-persistent/cognitive" filter is relocated to RIL and
  also in DcTracker.setupData().

Change-Id: I5e93cbef317b7973e0dc1125cfc3cc576a1cf9fa
parent 2bbeeb38
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ import android.os.HwBinder;
import android.os.Message;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.SystemProperties;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
@@ -4839,7 +4840,8 @@ public class RIL extends BaseCommands implements CommandsInterface {
                    for (DataProfile dp : dps) {
                        // For v1.0 to v1.2, we only send data profiles that has the persistent
                        // (a.k.a modem cognitive) bit set to true.
                        if (dp.isPersistent()) {
                        boolean forceCognitive = SystemProperties.getBoolean("persist.sys.phh.radio.force_cognitive", false);
                        if (dp.isPersistent() || forceCognitive) {
                            dpis.add(convertToHalDataProfile10(dp));
                        }
                    }
+2 −1
Original line number Diff line number Diff line
@@ -2170,8 +2170,9 @@ public class DcTracker extends Handler {
        }

        // profile id is only meaningful when the profile is persistent on the modem.
        boolean forceCognitive = SystemProperties.getBoolean("persist.sys.phh.radio.force_cognitive", false);
        int profileId = DATA_PROFILE_INVALID;
        if (apnSetting.isPersistent()) {
        if (apnSetting.isPersistent() || forceCognitive) {
            profileId = apnSetting.getProfileId();
            if (profileId == DATA_PROFILE_DEFAULT) {
                profileId = getApnProfileID(apnContext.getApnType());