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

Commit d90ff986 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

telephony: Don't disable an APN type that is not enabled.



Fixes a bad interaction between MMS and SUPL that occurs when they are using
the same APN.

Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent e2393c57
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -369,13 +369,15 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
     * The APN of the specified type is no longer needed. Ensure that if
     * The APN of the specified type is no longer needed. Ensure that if
     * use of the default APN has not been explicitly disabled, we are connected
     * use of the default APN has not been explicitly disabled, we are connected
     * to the default APN.
     * to the default APN.
     * @param type the APN type. The only valid value currently is {@link Phone#APN_TYPE_MMS}.
     * @param type the APN type. The only valid values are currently 
     * {@link Phone#APN_TYPE_MMS} and {@link Phone#APN_TYPE_SUPL}.
     * @return
     * @return
     */
     */
    protected int disableApnType(String type) {
    protected int disableApnType(String type) {
        Log.d(LOG_TAG, "disableApnType("+type+")");
        Log.d(LOG_TAG, "disableApnType("+type+")");
        if (TextUtils.equals(type, Phone.APN_TYPE_MMS) ||
        if ((TextUtils.equals(type, Phone.APN_TYPE_MMS) ||
                TextUtils.equals(type, Phone.APN_TYPE_SUPL)) {
                TextUtils.equals(type, Phone.APN_TYPE_SUPL))
                && isEnabled(type)) {
            removeMessages(EVENT_RESTORE_DEFAULT_APN);
            removeMessages(EVENT_RESTORE_DEFAULT_APN);
            setEnabled(type, false);
            setEnabled(type, false);
            if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {
            if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {