Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge "Problems sending/receiving MMS, tears down MMS APN"

  • Loading branch information...
commit a85ca6589ce69cf8ecd21735195fad0f5b2881b4 2 parents a75cbe9 + 0a3da64
Jean-Baptiste Queru authored android code review committed
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/com/android/mms/transaction/TransactionSettings.java
View
12 src/com/android/mms/transaction/TransactionSettings.java
@@ -61,12 +61,16 @@
* @param context The context of the MMS Client
*/
public TransactionSettings(Context context, String apnName) {
- String selection = TextUtils.isEmpty(apnName) ? null :
- Telephony.Carriers.APN + "='" + apnName.trim() + "'";
+ String selection = Telephony.Carriers.CURRENT + " IS NOT NULL";
+ String[] selectionArgs = null;
+ if (apnName != null) {
+ selection += " AND " + Telephony.Carriers.APN + "=?";
+ selectionArgs = new String[]{ apnName.trim() };
+ }
Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(),
- Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current"),
- APN_PROJECTION, selection, null, null);
+ Telephony.Carriers.CONTENT_URI,
+ APN_PROJECTION, selection, selectionArgs, null);
if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
Log.v(TAG, "TransactionSettings looking for apn: " + selection + " returned: " +
Please sign in to comment.
Something went wrong with that request. Please try again.