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

Commit 030fdfb7 authored by yuemingw's avatar yuemingw Committed by Yueming Wang
Browse files

Change DcTracker to use URL_FILTERED.

Fix: 68208263
Test: runtest -x frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/DcTrackerTest.java

Design doc: https://docs.google.com/document/d/1UEYjhRGSEwwccPLs_FzFD-IeOsVq63gxmAHNtDfnzAY/edit?ts=5a0526aa&pli=1#

Change-Id: I116c2285c05b55ace52b7b5212dbc59d5b002a63
parent eb1d279c
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -3313,7 +3313,8 @@ public class DcTracker extends Handler {


            // ORDER BY Telephony.Carriers._ID ("_id")
            // ORDER BY Telephony.Carriers._ID ("_id")
            Cursor cursor = mPhone.getContext().getContentResolver().query(
            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 != null) {
                if (cursor.getCount() > 0) {
                if (cursor.getCount() > 0) {
@@ -4276,7 +4277,8 @@ public class DcTracker extends Handler {
        // DB will contain only one entry for Emergency APN
        // DB will contain only one entry for Emergency APN
        String selection = "type=\"emergency\"";
        String selection = "type=\"emergency\"";
        Cursor cursor = mPhone.getContext().getContentResolver().query(
        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 != null) {
            if (cursor.getCount() > 0) {
            if (cursor.getCount() > 0) {
+3 −1
Original line number Original line Diff line number Diff line
@@ -166,7 +166,9 @@ public class DcTrackerTest extends TelephonyTest {
            logd("   selectionArgs = " + Arrays.toString(selectionArgs));
            logd("   selectionArgs = " + Arrays.toString(selectionArgs));
            logd("   sortOrder = " + sortOrder);
            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) {
                if (projection == null && selectionArgs == null && selection != null) {


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