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

Commit 70be89e9 authored by Sungmin Choi's avatar Sungmin Choi Committed by android-build-merger
Browse files

Fix to return mno dun apn when mvno is not matched

am: 2df8a14c

* commit '2df8a14c':
  Fix to return mno dun apn when mvno is not matched
parents 438e1504 2df8a14c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1212,7 +1212,14 @@ public final class DcTracker extends DcTrackerBase {
            } while (cursor.moveToNext());
        }

        ArrayList<ApnSetting> result = mvnoApns.isEmpty() ? mnoApns : mvnoApns;
        ArrayList<ApnSetting> result;
        if (mvnoApns.isEmpty()) {
            result = mnoApns;
            // mMvnoMatched = false; - not needed as cleared in createAllApnList
        } else {
            result = mvnoApns;
            mMvnoMatched = true;
        }
        if (DBG) log("createApnList: X result=" + result);
        return result;
    }
@@ -2257,6 +2264,7 @@ public final class DcTracker extends DcTrackerBase {
     * Data Connections and setup the preferredApn.
     */
    private void createAllApnList() {
        mMvnoMatched = false;
        mAllApnSettings = new ArrayList<ApnSetting>();
        IccRecords r = mIccRecords.get();
        String operator = (r != null) ? r.getOperatorNumeric() : "";
+5 −2
Original line number Diff line number Diff line
@@ -240,6 +240,9 @@ public abstract class DcTrackerBase extends Handler {
    //        really a lower power mode")
    protected boolean mIsScreenOn = true;

    // Indicates if we found mvno-specific APNs in the full APN list.
    protected boolean mMvnoMatched = false;

    /** Allows the generation of unique Id's for DataConnection objects */
    protected AtomicInteger mUniqueIdGenerator = new AtomicInteger(0);

@@ -710,7 +713,7 @@ public abstract class DcTrackerBase extends Handler {
                        }
                        return dunSetting;
                    }
                } else {
                } else if (mMvnoMatched == false) {
                    if (VDBG) log("fetchDunApn: global TETHER_DUN_APN dunSetting=" + dunSetting);
                    return dunSetting;
                }
@@ -731,7 +734,7 @@ public abstract class DcTrackerBase extends Handler {
                        }
                        return dunSetting;
                    }
                } else {
                } else if (mMvnoMatched == false) {
                    retDunSetting = dunSetting;
                }
            }