summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2015-12-02 23:10:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-12-02 23:10:29 +0000
commitda8da31ec024b7e9b7fb264bc776112513a9edbe (patch)
treef00b3f4781343daf2d23f8aa879526a363f4dbac
parent6a3bf1900c04de69590197f684622af25dd7d335 (diff)
parent4ee5f6b68924ee1783e09e2cd7d2f65eff8800ec (diff)
Merge "Guarding use of Voicemails.DELETE to versions >= M" into ub-contactsdialer-b-dev
-rw-r--r--src/com/android/dialer/calllog/CallLogQueryHandler.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/dialer/calllog/CallLogQueryHandler.java b/src/com/android/dialer/calllog/CallLogQueryHandler.java
index 3efdce7df..d99284698 100644
--- a/src/com/android/dialer/calllog/CallLogQueryHandler.java
+++ b/src/com/android/dialer/calllog/CallLogQueryHandler.java
@@ -26,6 +26,7 @@ import android.database.sqlite.SQLiteDiskIOException;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteFullException;
import android.net.Uri;
+import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -34,6 +35,7 @@ import android.provider.VoicemailContract.Status;
import android.provider.VoicemailContract.Voicemails;
import android.util.Log;
+import com.android.contacts.common.compat.SdkVersionOverride;
import com.android.contacts.common.database.NoNullCursorAsyncQueryHandler;
import com.android.contacts.common.util.PermissionsUtil;
import com.android.dialer.filterednumber.FilteredNumbersUtil;
@@ -167,8 +169,10 @@ public class CallLogQueryHandler extends NoNullCursorAsyncQueryHandler {
List<String> selectionArgs = Lists.newArrayList();
// Ignore voicemails marked as deleted
- where.append(Voicemails.DELETED);
- where.append(" = 0");
+ if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M)
+ >= Build.VERSION_CODES.M) {
+ where.append(Voicemails.DELETED).append(" = 0");
+ }
if (newOnly) {
where.append(" AND ");