diff options
author | Nancy Chen <nancychen@google.com> | 2015-11-25 11:20:17 -0800 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2015-12-03 14:35:53 -0800 |
commit | 37aa2f3d402bdb233d3c922fcde4f9aa6a262d68 (patch) | |
tree | b00d976c7217becd38cacf0c145a32787677f2ac /tests | |
parent | f6bf9e4c680355bf597447bbda043f3b611734d0 (diff) |
Adapt TelecomCallLogCache to pre-MSIM.
TelecomCallLogCache creates a mapping between PhoneAccount and per-SIM
information like voicemail number which is not relevant pre-LMr1. Create
a compatibility classes so that MSIM functionality is factored out
pre-LMr1.
Bug: 25776171
Change-Id: I67b012110829121dffa42d542aa0395d683fa78b
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/dialer/calllog/TestTelecomCallLogCache.java | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/tests/src/com/android/dialer/calllog/TestTelecomCallLogCache.java b/tests/src/com/android/dialer/calllog/TestTelecomCallLogCache.java index 5475ec337..fcf988412 100644 --- a/tests/src/com/android/dialer/calllog/TestTelecomCallLogCache.java +++ b/tests/src/com/android/dialer/calllog/TestTelecomCallLogCache.java @@ -17,13 +17,20 @@ package com.android.dialer.calllog; import android.content.Context; +import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; +import com.android.dialer.calllog.calllogcache.CallLogCache; + /** - * Modified version of {@link com.android.dialer.calllog.PhoneNumberDisplayHelper} to be used in + * Modified version of {@link com.android.dialer.calllog.calllogcache.CallLogCache} to be used in * tests that allows injecting the voicemail number. + * + * NOTE: This tests the pre-LMR1 version because currently none of the tests involve multi-SIM, + * but... + * TODO: write tests to test multi-SIM functionality in TelecomCallLogCache. */ -public final class TestTelecomCallLogCache extends TelecomCallLogCache { +public final class TestTelecomCallLogCache extends CallLogCache { private CharSequence mVoicemailNumber; public TestTelecomCallLogCache(Context context, CharSequence voicemailNumber) { @@ -35,4 +42,19 @@ public final class TestTelecomCallLogCache extends TelecomCallLogCache { public boolean isVoicemailNumber(PhoneAccountHandle accountHandle, CharSequence number) { return mVoicemailNumber.equals(number); } + + @Override + public String getAccountLabel(PhoneAccountHandle accountHandle) { + return null; + } + + @Override + public int getAccountColor(PhoneAccountHandle accountHandle) { + return PhoneAccount.NO_HIGHLIGHT_COLOR; + } + + @Override + public boolean doesAccountSupportCallSubject(PhoneAccountHandle accountHandle) { + return false; + } } |