diff options
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java | 4 |
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()); } } |