mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-05 07:39:23 +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 283326b2f6
Fixes #6165 <https://github.com/Genymobile/scrcpy/issues/6165>
This commit is contained in:
parent
d74cfd5711
commit
98d30288f7
1 changed files with 2 additions and 1 deletions
|
@ -97,7 +97,6 @@ public final class Server {
|
||||||
boolean audio = options.getAudio();
|
boolean audio = options.getAudio();
|
||||||
boolean sendDummyByte = options.getSendDummyByte();
|
boolean sendDummyByte = options.getSendDummyByte();
|
||||||
|
|
||||||
prepareMainLooper();
|
|
||||||
Workarounds.apply();
|
Workarounds.apply();
|
||||||
|
|
||||||
List<AsyncProcessor> asyncProcessors = new ArrayList<>();
|
List<AsyncProcessor> asyncProcessors = new ArrayList<>();
|
||||||
|
@ -230,6 +229,8 @@ public final class Server {
|
||||||
Ln.e("Exception on thread " + t, e);
|
Ln.e("Exception on thread " + t, e);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
prepareMainLooper();
|
||||||
|
|
||||||
Options options = Options.parse(args);
|
Options options = Options.parse(args);
|
||||||
|
|
||||||
Ln.disableSystemStreams();
|
Ln.disableSystemStreams();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue