mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-22 09:57:30 +00:00
Prepare the main looper earlier
The looper must be initialized before listing apps, to avoid the following error: > Can't create handler inside thread that has not called > Looper.prepare() Refs 283326b2f6fa3fdaeecc181f69a3a4bcd429c06a Fixes #6165 <https://github.com/Genymobile/scrcpy/issues/6165>
This commit is contained in:
parent
d74cfd5711
commit
98d30288f7
@ -97,7 +97,6 @@ public final class Server {
|
||||
boolean audio = options.getAudio();
|
||||
boolean sendDummyByte = options.getSendDummyByte();
|
||||
|
||||
prepareMainLooper();
|
||||
Workarounds.apply();
|
||||
|
||||
List<AsyncProcessor> asyncProcessors = new ArrayList<>();
|
||||
@ -230,6 +229,8 @@ public final class Server {
|
||||
Ln.e("Exception on thread " + t, e);
|
||||
});
|
||||
|
||||
prepareMainLooper();
|
||||
|
||||
Options options = Options.parse(args);
|
||||
|
||||
Ln.disableSystemStreams();
|
||||
|
Loading…
x
Reference in New Issue
Block a user