aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Zivkovic <zivkovic@google.com>2015-03-10 10:01:15 -0700
committerDan Zivkovic <zivkovic@google.com>2015-03-10 10:03:17 -0700
commit70c096d9a1305d3002320eb0d7185b5abb81c086 (patch)
tree2d9aa853d51e329cfb924a22dd033830c9826d5a
parent21a28abc6ac3a2404e7b90327122b1364a283ec9 (diff)
downloadlatinime-70c096d9a1305d3002320eb0d7185b5abb81c086.tar.gz
latinime-70c096d9a1305d3002320eb0d7185b5abb81c086.tar.xz
latinime-70c096d9a1305d3002320eb0d7185b5abb81c086.zip
Restart background executor.
Bug 19671650. Change-Id: I1a28a53e94bdb79aeb173f6905c1035022495acc
-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());
}
}