summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/app/calllog/calllogcache
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-06-30 15:26:17 -0700
committerEric Erfanian <erfanian@google.com>2017-07-01 03:17:31 +0000
commitd538e0b42004524abe36ac17606d3915a14f5dae (patch)
tree04638b64ff49c88d13ca3471eea44c30681489dd /java/com/android/dialer/app/calllog/calllogcache
parent842a9777de13bebb1c82f9d57222c52f9ddec558 (diff)
Update AOSP Dialer source from internal google3 repository at
cl/160679286. Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/159771812 (6/22/2017) to 160679286 (6/30/2017). These changes track the dialer V11 release. This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Change-Id: I7e7b41ce472b85a9d5a6728d5c8b3c045c09e095 Merged-In: Ie2eb735a92c577b5ae5a5e8b7efa2d699fc964bc
Diffstat (limited to 'java/com/android/dialer/app/calllog/calllogcache')
-rw-r--r--java/com/android/dialer/app/calllog/calllogcache/CallLogCache.java17
-rw-r--r--java/com/android/dialer/app/calllog/calllogcache/CallLogCacheLollipopMr1.java8
2 files changed, 10 insertions, 15 deletions
diff --git a/java/com/android/dialer/app/calllog/calllogcache/CallLogCache.java b/java/com/android/dialer/app/calllog/calllogcache/CallLogCache.java
index 6728dfb38..2e7c9339a 100644
--- a/java/com/android/dialer/app/calllog/calllogcache/CallLogCache.java
+++ b/java/com/android/dialer/app/calllog/calllogcache/CallLogCache.java
@@ -17,6 +17,7 @@
package com.android.dialer.app.calllog.calllogcache;
import android.content.Context;
+import android.support.annotation.Nullable;
import android.telecom.PhoneAccountHandle;
import com.android.dialer.app.calllog.CallLogAdapter;
import com.android.dialer.util.CallUtil;
@@ -57,20 +58,8 @@ public abstract class CallLogCache {
* Returns true if the given number is the number of the configured voicemail. To be able to
* mock-out this, it is not a static method.
*/
- public abstract boolean isVoicemailNumber(PhoneAccountHandle accountHandle, CharSequence number);
-
- /**
- * Returns {@code true} when the current sim supports video calls, regardless of the value in a
- * contact's {@link android.provider.ContactsContract.CommonDataKinds.Phone#CARRIER_PRESENCE}
- * column.
- */
- public boolean isVideoEnabled() {
- if (!mHasCheckedForVideoAvailability) {
- mVideoAvailability = CallUtil.getVideoCallingAvailability(mContext);
- mHasCheckedForVideoAvailability = true;
- }
- return (mVideoAvailability & CallUtil.VIDEO_CALLING_ENABLED) != 0;
- }
+ public abstract boolean isVoicemailNumber(
+ PhoneAccountHandle accountHandle, @Nullable CharSequence number);
/**
* Returns {@code true} when the current sim supports checking video calling capabilities via the
diff --git a/java/com/android/dialer/app/calllog/calllogcache/CallLogCacheLollipopMr1.java b/java/com/android/dialer/app/calllog/calllogcache/CallLogCacheLollipopMr1.java
index f85680649..2424b6dbd 100644
--- a/java/com/android/dialer/app/calllog/calllogcache/CallLogCacheLollipopMr1.java
+++ b/java/com/android/dialer/app/calllog/calllogcache/CallLogCacheLollipopMr1.java
@@ -17,7 +17,9 @@
package com.android.dialer.app.calllog.calllogcache;
import android.content.Context;
+import android.support.annotation.Nullable;
import android.telecom.PhoneAccountHandle;
+import android.text.TextUtils;
import android.util.ArrayMap;
import com.android.dialer.calllogutils.PhoneAccountUtils;
import com.android.dialer.telecom.TelecomUtil;
@@ -50,7 +52,11 @@ class CallLogCacheLollipopMr1 extends CallLogCache {
}
@Override
- public boolean isVoicemailNumber(PhoneAccountHandle accountHandle, CharSequence number) {
+ public boolean isVoicemailNumber(
+ PhoneAccountHandle accountHandle, @Nullable CharSequence number) {
+ if (TextUtils.isEmpty(number)) {
+ return false;
+ }
return TelecomUtil.isVoicemailNumber(mContext, accountHandle, number.toString());
}