Register rotation watcher for non-main displays
While moving code, commit 874eaec487369f7fcaa9ed8c5f85569659565d4f 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 in e26bdb07a21493d096ea5c8cfd870fc5a3f015dc. 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() {
|
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) {
|
if (Ln.isEnabled(Ln.Level.VERBOSE)) {
|
||||||
if (Ln.isEnabled(Ln.Level.VERBOSE)) {
|
Ln.v("ScreenCapture: onRotationChanged(" + rotation + ")");
|
||||||
Ln.v("ScreenCapture: onRotationChanged(" + rotation + ")");
|
|
||||||
}
|
|
||||||
requestReset();
|
|
||||||
}
|
}
|
||||||
};
|
requestReset();
|
||||||
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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user