summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2016-03-10 19:42:44 -0800
committerBrandon Maxwell <maxwelb@google.com>2016-03-11 13:34:35 -0800
commit17df9323e45ae5984b6df25b788a9cbffb51e8ab (patch)
treee8a24e607b77c1c21283da024859f84d94bd7123 /src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
parentebfbfa10d95ef21373cf7c112eac52413b11c525 (diff)
Removing hardcoded database column name
+ We were previously hardcoding the post_dial_digits column name. This code was written before we had src-N and src-pre-N folders. + This CL converts the hard coded column name to follow the pattern we have for new stuff in the SDK. + Additionally, this CL removes an unneeded method which checks the SDK version, instead using the CompatUtils class. Bug: 25021389 Change-Id: I017d47f7efd323254e616a64d7ac824c5cfb8902
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java')
-rw-r--r--src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java b/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
index 13de0775d..7cb35f514 100644
--- a/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
+++ b/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
@@ -16,6 +16,8 @@
package com.android.dialer.calllog;
+import com.google.common.annotations.VisibleForTesting;
+
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
@@ -30,18 +32,16 @@ import android.text.TextUtils;
import android.util.Log;
import com.android.contacts.common.GeoUtil;
+import com.android.contacts.common.compat.CompatUtils;
import com.android.contacts.common.util.PermissionsUtil;
-import com.android.dialer.DialtactsActivity;
import com.android.dialer.PhoneCallDetails;
+import com.android.dialer.compat.CallsSdkCompat;
import com.android.dialer.database.VoicemailArchiveContract;
-import com.android.dialer.util.AppCompatConstants;
import com.android.dialer.util.AsyncTaskExecutor;
import com.android.dialer.util.AsyncTaskExecutors;
import com.android.dialer.util.PhoneNumberUtil;
import com.android.dialer.util.TelecomUtil;
-import com.google.common.annotations.VisibleForTesting;
-
import java.util.ArrayList;
import java.util.Arrays;
@@ -94,8 +94,8 @@ public class CallLogAsyncTaskUtil {
static {
ArrayList<String> projectionList = new ArrayList<>();
projectionList.addAll(Arrays.asList(CALL_LOG_PROJECTION_INTERNAL));
- if (PhoneNumberDisplayUtil.canShowPostDial()) {
- projectionList.add(AppCompatConstants.POST_DIAL_DIGITS);
+ if (CompatUtils.isNCompatible()) {
+ projectionList.add(CallsSdkCompat.POST_DIAL_DIGITS);
}
projectionList.trimToSize();
CALL_LOG_PROJECTION = projectionList.toArray(new String[projectionList.size()]);
@@ -113,13 +113,13 @@ public class CallLogAsyncTaskUtil {
}
public interface CallLogAsyncTaskListener {
- public void onDeleteCall();
- public void onDeleteVoicemail();
- public void onGetCallDetails(PhoneCallDetails[] details);
+ void onDeleteCall();
+ void onDeleteVoicemail();
+ void onGetCallDetails(PhoneCallDetails[] details);
}
public interface OnCallLogQueryFinishedListener {
- public void onQueryFinished(boolean hasEntry);
+ void onQueryFinished(boolean hasEntry);
}
// Try to identify if a call log entry corresponds to a number which was blocked. We match by
@@ -185,7 +185,7 @@ public class CallLogAsyncTaskUtil {
// Read call log.
final String countryIso = cursor.getString(CallDetailQuery.COUNTRY_ISO_COLUMN_INDEX);
final String number = cursor.getString(CallDetailQuery.NUMBER_COLUMN_INDEX);
- final String postDialDigits = PhoneNumberDisplayUtil.canShowPostDial()
+ final String postDialDigits = CompatUtils.isNCompatible()
? cursor.getString(CallDetailQuery.POST_DIAL_DIGITS) : "";
final int numberPresentation =
cursor.getInt(CallDetailQuery.NUMBER_PRESENTATION_COLUMN_INDEX);