diff options
author | Brandon Maxwell <maxwelb@google.com> | 2015-12-01 17:29:33 -0800 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2015-12-01 18:20:49 -0800 |
commit | 4ee5f6b68924ee1783e09e2cd7d2f65eff8800ec (patch) | |
tree | e25c95a378066a6a691aeaba5fdbc41d72f41200 | |
parent | b2e474522fb943a1703875ca45e9cb2b0a303f63 (diff) |
Guarding use of Voicemails.DELETE to versions >= M
Bug: 25776171
Change-Id: Ib123da80c6f902c81ad09d9b9ca7fb93df057d1a
-rw-r--r-- | src/com/android/dialer/calllog/CallLogQueryHandler.java | 8 |
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 "); |