aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java
diff options
context:
space:
mode:
authorDan Zivkovic <zivkovic@google.com>2015-03-10 17:16:56 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-10 17:16:56 +0000
commita6f8f30622275d38e5e0a83d4981713dcd4bf04e (patch)
tree840b10cb656df8b18eeaafec48480561178c2942 /java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java
parentbc6b315c2b9303cd37cf4fbc2112b08a02ba98c6 (diff)
parent70c096d9a1305d3002320eb0d7185b5abb81c086 (diff)
downloadlatinime-a6f8f30622275d38e5e0a83d4981713dcd4bf04e.tar.gz
latinime-a6f8f30622275d38e5e0a83d4981713dcd4bf04e.tar.xz
latinime-a6f8f30622275d38e5e0a83d4981713dcd4bf04e.zip
am 70c096d9: Restart background executor.
* commit '70c096d9a1305d3002320eb0d7185b5abb81c086': Restart background executor.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java')
-rw-r--r--java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java b/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java
index 3a6c60b15..91714686f 100644
--- a/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java
@@ -33,7 +33,7 @@ public class ExecutorUtils {
private static final String TAG = "ExecutorUtils";
- private static final ScheduledExecutorService sExecutorService =
+ private static ScheduledExecutorService sExecutorService =
Executors.newSingleThreadScheduledExecutor(new ExecutorFactory());
private static class ExecutorFactory implements ThreadFactory {
@@ -80,6 +80,8 @@ public class ExecutorUtils {
} catch (InterruptedException e) {
Log.wtf(TAG, "Failed to shut down background task.");
throw new IllegalStateException("Failed to shut down background task.");
+ } finally {
+ sExecutorService = Executors.newSingleThreadScheduledExecutor(new ExecutorFactory());
}
}