We need READ_CALL_LOG if targetSDK is > 15. What a drag.

This commit is contained in:
Moxie Marlinspike
2012-11-20 19:09:46 -08:00
parent c66e221598
commit 80a6c65790
2 changed files with 5 additions and 3 deletions

View File

@@ -428,10 +428,11 @@ public class MmsDatabase extends Database {
}
public Cursor getCarrierMmsInformation(String apn) {
Uri uri = Uri.withAppendedPath(Uri.parse("content://telephony/carriers"), "current");
String selection = (apn == null || apn.trim().length() == 0) ? null : String.format("apn = '%s'", apn.trim());
Uri uri = Uri.withAppendedPath(Uri.parse("content://telephony/carriers"), "current");
String selection = (apn == null || apn.trim().length() == 0) ? null : "apn = ?";
String[] selectionArgs = (apn == null || apn.trim().length() == 0) ? null : new String[] {apn.trim()};
return context.getContentResolver().query(uri, null, selection, null, null);
return context.getContentResolver().query(uri, null, selection, selectionArgs, null);
}
private PduHeaders getHeadersForId(long messageId) throws MmsException {