mirror of
https://github.com/Genymobile/scrcpy
synced 2025-01-02 20:52:06 +00:00
Register rotation watcher for non-main displays
While moving code, commit874eaec487
added a condition `if (displayId == 0)` to register a rotation watcher, without good reasons. This condition was kept when the rotation watcher was moved to a fallback ine26bdb07a2
. Note: use `git show -b` to show this commit ignoring whitespace changes. Refs #5428 <https://github.com/Genymobile/scrcpy/issues/5428>
This commit is contained in:
parent
c7378f4dc8
commit
3ac4b64461
@ -240,18 +240,16 @@ public class ScreenCapture extends SurfaceCapture {
|
||||
}
|
||||
|
||||
private void registerDisplayListenerFallbacks() {
|
||||
if (displayId == 0) {
|
||||
rotationWatcher = new IRotationWatcher.Stub() {
|
||||
@Override
|
||||
public void onRotationChanged(int rotation) {
|
||||
if (Ln.isEnabled(Ln.Level.VERBOSE)) {
|
||||
Ln.v("ScreenCapture: onRotationChanged(" + rotation + ")");
|
||||
}
|
||||
requestReset();
|
||||
rotationWatcher = new IRotationWatcher.Stub() {
|
||||
@Override
|
||||
public void onRotationChanged(int rotation) {
|
||||
if (Ln.isEnabled(Ln.Level.VERBOSE)) {
|
||||
Ln.v("ScreenCapture: onRotationChanged(" + rotation + ")");
|
||||
}
|
||||
};
|
||||
ServiceManager.getWindowManager().registerRotationWatcher(rotationWatcher, displayId);
|
||||
}
|
||||
requestReset();
|
||||
}
|
||||
};
|
||||
ServiceManager.getWindowManager().registerRotationWatcher(rotationWatcher, displayId);
|
||||
|
||||
// Build.VERSION.SDK_INT >= AndroidVersions.API_29_ANDROID_10 (but implied by == API_34_ANDROID 14)
|
||||
displayFoldListener = new IDisplayFoldListener.Stub() {
|
||||
|
Loading…
Reference in New Issue
Block a user