mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Restart background executor.
Bug 19671650. Change-Id: I1a28a53e94bdb79aeb173f6905c1035022495acc
This commit is contained in:
parent
21a28abc6a
commit
70c096d9a1
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user