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

Commit be960502 authored by Yueming Wang's avatar Yueming Wang Committed by android-build-merger
Browse files

Merge "Change DcTracker to use URL_FILTERED."

am: 9f623f16

Change-Id: I4a3f89689cf2af3a10bf8c77badb3a225cb7dba7
parents 7f067cc7 9f623f16
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3324,7 +3324,8 @@ public class DcTracker extends Handler {

            // ORDER BY Telephony.Carriers._ID ("_id")
            Cursor cursor = mPhone.getContext().getContentResolver().query(
                    Telephony.Carriers.CONTENT_URI, null, selection, null, Telephony.Carriers._ID);
                    Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "filtered"),
                    null, selection, null, Telephony.Carriers._ID);

            if (cursor != null) {
                if (cursor.getCount() > 0) {
@@ -4296,7 +4297,8 @@ public class DcTracker extends Handler {
        // DB will contain only one entry for Emergency APN
        String selection = "type=\"emergency\"";
        Cursor cursor = mPhone.getContext().getContentResolver().query(
                Telephony.Carriers.CONTENT_URI, null, selection, null, null);
                Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "filtered"),
                null, selection, null, null);

        if (cursor != null) {
            if (cursor.getCount() > 0) {
+3 −1
Original line number Diff line number Diff line
@@ -171,7 +171,9 @@ public class DcTrackerTest extends TelephonyTest {
            logd("   selectionArgs = " + Arrays.toString(selectionArgs));
            logd("   sortOrder = " + sortOrder);

            if (uri.compareTo(Telephony.Carriers.CONTENT_URI) == 0) {
            if (uri.compareTo(Telephony.Carriers.CONTENT_URI) == 0
                    || uri.compareTo(Uri.withAppendedPath(
                            Telephony.Carriers.CONTENT_URI, "filtered")) == 0) {
                if (projection == null && selectionArgs == null && selection != null) {

                    Pattern pattern = Pattern.compile("^numeric = '([0-9]*)'");