Support rotation on secondary displays (1/N)
- Allow to apply rotation animation on non-default display.
- Separate by display:
Rotation related timeout.
Pause/resume rotation.
- Able to get/watch non-default display orientation/rotation.
Bug: 111361251
Test: atest FrameworksServicesTests:DisplayContentTests
Test: go/wm-smoke
Change-Id: I9533f1b90b9969d455b6dc235c5318e39f63ab12
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index 0a77269..75b3556 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -2165,6 +2165,24 @@
}
@Override
+ public boolean screenshot(int displayId, Surface outSurface) {
+ synchronized (mSyncRoot) {
+ final LogicalDisplay display = mLogicalDisplays.get(displayId);
+ if (display != null) {
+ final DisplayDevice device = display.getPrimaryDisplayDeviceLocked();
+ if (device != null) {
+ final IBinder token = device.getDisplayTokenLocked();
+ if (token != null) {
+ SurfaceControl.screenshot(token, outSurface);
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
public DisplayInfo getDisplayInfo(int displayId) {
return getDisplayInfoInternal(displayId, Process.myUid());
}