mirror of
https://github.com/Genymobile/scrcpy
synced 2025-09-01 23:05:19 +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:
@@ -240,7 +240,6 @@ public class ScreenCapture extends SurfaceCapture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void registerDisplayListenerFallbacks() {
|
private void registerDisplayListenerFallbacks() {
|
||||||
if (displayId == 0) {
|
|
||||||
rotationWatcher = new IRotationWatcher.Stub() {
|
rotationWatcher = new IRotationWatcher.Stub() {
|
||||||
@Override
|
@Override
|
||||||
public void onRotationChanged(int rotation) {
|
public void onRotationChanged(int rotation) {
|
||||||
@@ -251,7 +250,6 @@ public class ScreenCapture extends SurfaceCapture {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
ServiceManager.getWindowManager().registerRotationWatcher(rotationWatcher, displayId);
|
ServiceManager.getWindowManager().registerRotationWatcher(rotationWatcher, displayId);
|
||||||
}
|
|
||||||
|
|
||||||
// Build.VERSION.SDK_INT >= AndroidVersions.API_29_ANDROID_10 (but implied by == API_34_ANDROID 14)
|
// Build.VERSION.SDK_INT >= AndroidVersions.API_29_ANDROID_10 (but implied by == API_34_ANDROID 14)
|
||||||
displayFoldListener = new IDisplayFoldListener.Stub() {
|
displayFoldListener = new IDisplayFoldListener.Stub() {
|
||||||
|
Reference in New Issue
Block a user