Ignore fold change events for other display ids
Scrcpy mirrors a specific display id, it must ignore events for other display ids. Fixes #4120 <https://github.com/Genymobile/scrcpy/issues/4120>
This commit is contained in:
parent
0049b3ce07
commit
808bd14e30
1 changed files with 5 additions and 0 deletions
|
@ -103,6 +103,11 @@ public final class Device {
|
|||
ServiceManager.getWindowManager().registerDisplayFoldListener(new IDisplayFoldListener.Stub() {
|
||||
@Override
|
||||
public void onDisplayFoldChanged(int displayId, boolean folded) {
|
||||
if (Device.this.displayId != displayId) {
|
||||
// Ignore events related to other display ids
|
||||
return;
|
||||
}
|
||||
|
||||
synchronized (Device.this) {
|
||||
DisplayInfo displayInfo = ServiceManager.getDisplayManager().getDisplayInfo(displayId);
|
||||
if (displayInfo == null) {
|
||||
|
|
Loading…
Reference in a new issue