diff options
author | roldenburg <roldenburg@google.com> | 2017-07-06 13:24:25 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-07-10 10:47:10 -0700 |
commit | 8cf48a5fd9728ba3f3be15a52e2056a6bbcf549b (patch) | |
tree | 08f1e707b91e751656f406b998a58c138fcd1fd3 | |
parent | 061b6eb8dac57aa9d28dfdd1f8853879a2274b17 (diff) |
Improve GoogleCallLogAdapterTest to better emulate reality
The tests now call through the click listener to expand instead of just calling
the expanding method directly. This was done after we had a bug come up inside
the click listener that these tests did not catch.
The bug: Lightbringer.getPackageName can return null, so when using a stub there was an NPE inside the ExpandCollapseListener.
Test: only tests
PiperOrigin-RevId: 161121777
Change-Id: Ie58a4c14a32984c183b6159db2076a96cf46b37e
-rw-r--r-- | java/com/android/dialer/callintent/CallIntentBuilder.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/java/com/android/dialer/callintent/CallIntentBuilder.java b/java/com/android/dialer/callintent/CallIntentBuilder.java index e5449c804..36ea907ff 100644 --- a/java/com/android/dialer/callintent/CallIntentBuilder.java +++ b/java/com/android/dialer/callintent/CallIntentBuilder.java @@ -160,4 +160,11 @@ public class CallIntentBuilder { public static int getLightbringerButtonAppearInSearchCount() { return lightbringerButtonAppearInSearchCount; } + + @VisibleForTesting(otherwise = VisibleForTesting.NONE) + public static void clearLightbringerCounts() { + lightbringerButtonAppearInCollapsedCallLogItemCount = 0; + lightbringerButtonAppearInExpandedCallLogItemCount = 0; + lightbringerButtonAppearInSearchCount = 0; + } } |