mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 70c096d9: Restart background executor.
* commit '70c096d9a1305d3002320eb0d7185b5abb81c086': Restart background executor.
This commit is contained in:
commit
a6f8f30622
@ -33,7 +33,7 @@ public class ExecutorUtils {
|
|||||||
|
|
||||||
private static final String TAG = "ExecutorUtils";
|
private static final String TAG = "ExecutorUtils";
|
||||||
|
|
||||||
private static final ScheduledExecutorService sExecutorService =
|
private static ScheduledExecutorService sExecutorService =
|
||||||
Executors.newSingleThreadScheduledExecutor(new ExecutorFactory());
|
Executors.newSingleThreadScheduledExecutor(new ExecutorFactory());
|
||||||
|
|
||||||
private static class ExecutorFactory implements ThreadFactory {
|
private static class ExecutorFactory implements ThreadFactory {
|
||||||
@ -80,6 +80,8 @@ public class ExecutorUtils {
|
|||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
Log.wtf(TAG, "Failed to shut down background task.");
|
Log.wtf(TAG, "Failed to shut down background task.");
|
||||||
throw new IllegalStateException("Failed to shut down background task.");
|
throw new IllegalStateException("Failed to shut down background task.");
|
||||||
|
} finally {
|
||||||
|
sExecutorService = Executors.newSingleThreadScheduledExecutor(new ExecutorFactory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user