Loading services/java/com/android/server/wm/ScreenRotationAnimation.java +9 −3 Original line number Diff line number Diff line Loading @@ -199,7 +199,8 @@ class ScreenRotationAnimation { } public ScreenRotationAnimation(Context context, DisplayContent displayContent, SurfaceSession session, boolean inTransaction, boolean forceDefaultOrientation) { SurfaceSession session, boolean inTransaction, boolean forceDefaultOrientation, boolean isSecure) { mContext = context; mDisplayContent = displayContent; displayContent.getLogicalDisplayRect(mOriginalDisplayRect); Loading Loading @@ -241,16 +242,21 @@ class ScreenRotationAnimation { try { try { int flags = SurfaceControl.HIDDEN; if (isSecure) { flags |= SurfaceControl.SECURE; } if (WindowManagerService.DEBUG_SURFACE_TRACE) { mSurfaceControl = new SurfaceTrace(session, "ScreenshotSurface", mWidth, mHeight, PixelFormat.OPAQUE, SurfaceControl.HIDDEN); PixelFormat.OPAQUE, flags); Slog.w(TAG, "ScreenRotationAnimation ctor: displayOffset=" + mOriginalDisplayRect.toShortString()); } else { mSurfaceControl = new SurfaceControl(session, "ScreenshotSurface", mWidth, mHeight, PixelFormat.OPAQUE, SurfaceControl.HIDDEN); PixelFormat.OPAQUE, flags); } // capture a screenshot into the surface we just created Surface sur = new Surface(); Loading services/java/com/android/server/wm/WindowManagerService.java +13 −1 Original line number Diff line number Diff line Loading @@ -9921,9 +9921,21 @@ public class WindowManagerService extends IWindowManager.Stub screenRotationAnimation.kill(); } // Check whether the current screen contains any secure content. boolean isSecure = false; final WindowList windows = getDefaultWindowListLocked(); final int N = windows.size(); for (int i = 0; i < N; i++) { WindowState ws = windows.get(i); if (ws.isOnScreen() && (ws.mAttrs.flags & FLAG_SECURE) != 0) { isSecure = true; break; } } // TODO(multidisplay): rotation on main screen only. screenRotationAnimation = new ScreenRotationAnimation(mContext, displayContent, mFxSession, inTransaction, mPolicy.isDefaultOrientationForced()); mFxSession, inTransaction, mPolicy.isDefaultOrientationForced(), isSecure); mAnimator.setScreenRotationAnimationLocked(displayId, screenRotationAnimation); } } Loading Loading
services/java/com/android/server/wm/ScreenRotationAnimation.java +9 −3 Original line number Diff line number Diff line Loading @@ -199,7 +199,8 @@ class ScreenRotationAnimation { } public ScreenRotationAnimation(Context context, DisplayContent displayContent, SurfaceSession session, boolean inTransaction, boolean forceDefaultOrientation) { SurfaceSession session, boolean inTransaction, boolean forceDefaultOrientation, boolean isSecure) { mContext = context; mDisplayContent = displayContent; displayContent.getLogicalDisplayRect(mOriginalDisplayRect); Loading Loading @@ -241,16 +242,21 @@ class ScreenRotationAnimation { try { try { int flags = SurfaceControl.HIDDEN; if (isSecure) { flags |= SurfaceControl.SECURE; } if (WindowManagerService.DEBUG_SURFACE_TRACE) { mSurfaceControl = new SurfaceTrace(session, "ScreenshotSurface", mWidth, mHeight, PixelFormat.OPAQUE, SurfaceControl.HIDDEN); PixelFormat.OPAQUE, flags); Slog.w(TAG, "ScreenRotationAnimation ctor: displayOffset=" + mOriginalDisplayRect.toShortString()); } else { mSurfaceControl = new SurfaceControl(session, "ScreenshotSurface", mWidth, mHeight, PixelFormat.OPAQUE, SurfaceControl.HIDDEN); PixelFormat.OPAQUE, flags); } // capture a screenshot into the surface we just created Surface sur = new Surface(); Loading
services/java/com/android/server/wm/WindowManagerService.java +13 −1 Original line number Diff line number Diff line Loading @@ -9921,9 +9921,21 @@ public class WindowManagerService extends IWindowManager.Stub screenRotationAnimation.kill(); } // Check whether the current screen contains any secure content. boolean isSecure = false; final WindowList windows = getDefaultWindowListLocked(); final int N = windows.size(); for (int i = 0; i < N; i++) { WindowState ws = windows.get(i); if (ws.isOnScreen() && (ws.mAttrs.flags & FLAG_SECURE) != 0) { isSecure = true; break; } } // TODO(multidisplay): rotation on main screen only. screenRotationAnimation = new ScreenRotationAnimation(mContext, displayContent, mFxSession, inTransaction, mPolicy.isDefaultOrientationForced()); mFxSession, inTransaction, mPolicy.isDefaultOrientationForced(), isSecure); mAnimator.setScreenRotationAnimationLocked(displayId, screenRotationAnimation); } } Loading