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
@ -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…
x
Reference in New Issue
Block a user