Fix the query of apn based upon id
Telephony provider missed to implement the query based upon id.
Allow the query based upon apn id.
Bug: 232548626
Test: system test to confirm the query returns correct apn
Change-Id: If12f40ea759179c67fe7f4292a4e821ff70d9d07
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
index 45a2f0f..e09fa72 100644
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -3935,6 +3935,14 @@
break;
}
+ case URL_DPC_ID: {
+ constraints.add("_id = " + url.getLastPathSegment());
+ ensureCallingFromSystemOrPhoneUid("URL_DPC called from non SYSTEM_UID.");
+ // DPC query only returns DPC records.
+ constraints.add(IS_OWNED_BY_DPC);
+ break;
+ }
+
case URL_FILTERED_ID:
case URL_FILTERED_USING_SUBID: {
String idString = url.getLastPathSegment();