mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-02 22:29:25 +00:00
Fix null return value in DisplayManager.toString()
Ensure DisplayListener.toString() returns a non-null value to prevent a NullPointerException on certain devices. Fixes #5537 <https://github.com/Genymobile/scrcpy/issues/5537>
This commit is contained in:
parent
3d1f036c04
commit
3e689020ba
1 changed files with 3 additions and 0 deletions
|
@ -192,6 +192,9 @@ public final class DisplayManager {
|
||||||
if ("onDisplayChanged".equals(method.getName())) {
|
if ("onDisplayChanged".equals(method.getName())) {
|
||||||
listener.onDisplayChanged((int) args[0]);
|
listener.onDisplayChanged((int) args[0]);
|
||||||
}
|
}
|
||||||
|
if ("toString".equals(method.getName())) {
|
||||||
|
return "DisplayListener";
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue