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

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

Merge "Fixed DC cursor not close issue"

am: 9bda8f54

Change-Id: I170f66bad93b63504a1183397a4ef7373260d989
parents cddbcb98 9bda8f54
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() {