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

Commit d75c9660 authored by jiayanhong's avatar jiayanhong Committed by android-build-merger
Browse files

Merge "Fixed DC cursor not close issue" am: 9bda8f54

am: 610d7b28

Change-Id: Iab2c0ea683ec632be4caf786fd916624cef32560
parents 8122c6ac 610d7b28
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -1780,13 +1780,24 @@ public class DcTracker extends Handler {
                .query(Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI,
                    "preferapnset/subId/" + mPhone.getSubId()),
                        new String[] {Telephony.Carriers.APN_SET_ID}, null, null, null);
        if (c == null) {
            loge("getPreferredApnSetId: cursor is null");
            return Telephony.Carriers.NO_SET_SET;
        }

        int setId;
        if (c.getCount() < 1) {
            loge("getPreferredApnSetId: no APNs found");
            return Telephony.Carriers.NO_SET_SET;
            setId = Telephony.Carriers.NO_SET_SET;
        } else {
            c.moveToFirst();
            return c.getInt(0 /* index of Telephony.Carriers.APN_SET_ID */);
            setId = c.getInt(0 /* index of Telephony.Carriers.APN_SET_ID */);
        }

        if (!c.isClosed()) {
            c.close();
        }
        return setId;
    }

    public boolean hasMatchedTetherApnSetting() {