Android: Actually use a thread for DirectoryInitialization
`((Runnable) () -> init(context)).run()` is just a more complicated way of writing `init(context)`, and doesn't on its own launch a thread.
This commit is contained in:
parent
9af9e791f6
commit
da12ff02fc
|
@ -55,8 +55,7 @@ public final class DirectoryInitialization
|
||||||
directoryState.setValue(DirectoryInitializationState.INITIALIZING);
|
directoryState.setValue(DirectoryInitializationState.INITIALIZING);
|
||||||
|
|
||||||
// Can take a few seconds to run, so don't block UI thread.
|
// Can take a few seconds to run, so don't block UI thread.
|
||||||
//noinspection TrivialFunctionalExpressionUsage
|
new Thread(() -> init(context)).start();
|
||||||
((Runnable) () -> init(context)).run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void init(Context context)
|
private static void init(Context context)
|
||||||
|
|
Loading…
Reference in New Issue