summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/common
diff options
context:
space:
mode:
authormaxwelb <maxwelb@google.com>2017-10-06 14:51:18 -0700
committerEric Erfanian <erfanian@google.com>2017-10-06 14:58:50 -0700
commit2ee642d42907e76de3ffb7b13f12961b82892a9a (patch)
tree97dfa798809e8d909538eeaac34b4dba8725059d /java/com/android/dialer/common
parent265089a047d575666a7c9fe325bf46d28b0342d1 (diff)
Adding Future method for DialerPhoneNumberUtil
This CL adds a method to DialerPhoneNumberUtil which returns a Future holding the result of parsing a number into the DialerPhoneNumber proto. This will be used in the APDL integration as it will use Futures as well. The CL also changes DialerExecutors.lowPriorityThreadPool to be an ExecutorService instead of an Executor (the super type) so it can be used in MoreExecutors.listeningDecorator. Test: TAP PiperOrigin-RevId: 171347542 Change-Id: I620aacf3304d625f57af6d2b89a36f11b44008dd
Diffstat (limited to 'java/com/android/dialer/common')
-rw-r--r--java/com/android/dialer/common/concurrent/DialerExecutors.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/com/android/dialer/common/concurrent/DialerExecutors.java b/java/com/android/dialer/common/concurrent/DialerExecutors.java
index 81b3c5cb3..850c28cdd 100644
--- a/java/com/android/dialer/common/concurrent/DialerExecutors.java
+++ b/java/com/android/dialer/common/concurrent/DialerExecutors.java
@@ -21,7 +21,7 @@ import android.support.annotation.NonNull;
import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
import com.android.dialer.common.concurrent.DialerExecutor.Worker;
-import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
@@ -136,7 +136,7 @@ public final class DialerExecutors {
return new DefaultDialerExecutorFactory().createNonUiTaskBuilder(Assert.isNotNull(worker));
}
- private static final Executor lowPriorityThreadPool =
+ private static final ExecutorService lowPriorityThreadPool =
Executors.newFixedThreadPool(
5,
new ThreadFactory() {
@@ -155,7 +155,7 @@ public final class DialerExecutors {
* <p>This exists to prevent each individual dialer component from having to create its own
* threads/pools, which would result in the application having more threads than really necessary.
*/
- public static Executor getLowPriorityThreadPool() {
+ public static ExecutorService getLowPriorityThreadPool() {
return lowPriorityThreadPool;
}
}