summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcalvinpan <calvinpan@google.com>2020-07-20 19:41:57 +0800
committerCalvin Pan <calvinpan@google.com>2020-07-20 12:56:29 +0000
commitec7125939e564b80801414964e03be750ee6001d (patch)
treedc5396508183ebb73bfa76c320cb6c3608747cd7
parent608143e5f38a3c288f21f9031bbe28e143914919 (diff)
downloadMms-ec7125939e564b80801414964e03be750ee6001d.tar.gz
Fix MMS send with incorrect MMSC
Context://telephony/carriers/subid/* only return the APN that queried by mcc/mnc. If there are two different carrier in the DB with same mcc/mnc, TelephonyProvider will return all of APN. Using SIM_APN_URI to query the current sim APN. Bug: 161394004 Test: Insert a fake APN that mcc/mnc same as current sim then send MMS. Change-Id: I26f1170a0727f97844678244841996e4e2ae2b19
-rw-r--r--src/com/android/mms/service/ApnSettings.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/mms/service/ApnSettings.java b/src/com/android/mms/service/ApnSettings.java
index 7e4a0fc..65d38b7 100644
--- a/src/com/android/mms/service/ApnSettings.java
+++ b/src/com/android/mms/service/ApnSettings.java
@@ -102,7 +102,7 @@ public class ApnSettings {
}
try (Cursor cursor = context.getContentResolver().query(
- Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "/subId/" + subId),
+ Uri.withAppendedPath(Telephony.Carriers.SIM_APN_URI, String.valueOf(subId)),
APN_PROJECTION,
selection,
selectionArgs,