summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/shortcuts
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2017-10-24 17:10:06 -0700
committerEric Erfanian <erfanian@google.com>2017-10-25 16:59:31 +0000
commit6a4cebdb4ccc974d04f125847c03fddec18b2b9f (patch)
treea1baaedfe7538758e2622ee2746a6487428db1e1 /java/com/android/dialer/shortcuts
parent35ec9146f0f44898f2249be3e505ff7bef171e11 (diff)
Improved dagger support for executor services.
By always creating executor services via dagger, we can now bind special versions during espresso tests that can implement idling resources. We should be using idling resources during espresso tests for threads that we create ourselves, because espresso does not know about them. Hopefully this reduces some of the flakiness of espresso tests that we have today. This required converting all existing calls to DialerExecutors to pass a context used to fetch the component, and also required creating new application classes for espresso tests. Test: temporarily added a task which just slept to DialtactsActivity and verified that its integration test failed due to idling resource timeout PiperOrigin-RevId: 173334773 Change-Id: I876a93022d235d62cfc377bf5b06687e21a34758
Diffstat (limited to 'java/com/android/dialer/shortcuts')
-rw-r--r--java/com/android/dialer/shortcuts/ShortcutRefresher.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/android/dialer/shortcuts/ShortcutRefresher.java b/java/com/android/dialer/shortcuts/ShortcutRefresher.java
index 496f3f02a..7fd02a96f 100644
--- a/java/com/android/dialer/shortcuts/ShortcutRefresher.java
+++ b/java/com/android/dialer/shortcuts/ShortcutRefresher.java
@@ -45,7 +45,7 @@ public final class ShortcutRefresher {
return;
}
- DialerExecutors.createNonUiTaskBuilder(new RefreshWorker(context))
+ DialerExecutors.createNonUiTaskBuilder(context, new RefreshWorker(context))
.build()
.executeSerial(new ArrayList<>(contacts));
}