Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipDisplayLayoutState.java +8 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.wm.shell.common.pip; import static android.view.Surface.ROTATION_0; import static com.android.wm.shell.common.pip.PipUtils.dpToPx; import static java.lang.Math.max; Loading @@ -25,6 +27,7 @@ import android.content.res.Resources; import android.graphics.Insets; import android.graphics.Point; import android.graphics.Rect; import android.util.RotationUtils; import android.util.Size; import android.view.Surface; Loading Loading @@ -141,7 +144,12 @@ public class PipDisplayLayoutState { * @param targetRotation */ public void rotateTo(@Surface.Rotation int targetRotation) { final int fromRotation = getRotation(); mDisplayLayout.rotateTo(mUiContext.getResources(), targetRotation); final int rotation = RotationUtils.deltaRotation(fromRotation, targetRotation); if (rotation != ROTATION_0) { mNavigationBarsInsets = RotationUtils.rotateInsets(mNavigationBarsInsets, rotation); } } /** Returns the current display rotation of this layout state. */ Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipDisplayLayoutState.java +8 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.wm.shell.common.pip; import static android.view.Surface.ROTATION_0; import static com.android.wm.shell.common.pip.PipUtils.dpToPx; import static java.lang.Math.max; Loading @@ -25,6 +27,7 @@ import android.content.res.Resources; import android.graphics.Insets; import android.graphics.Point; import android.graphics.Rect; import android.util.RotationUtils; import android.util.Size; import android.view.Surface; Loading Loading @@ -141,7 +144,12 @@ public class PipDisplayLayoutState { * @param targetRotation */ public void rotateTo(@Surface.Rotation int targetRotation) { final int fromRotation = getRotation(); mDisplayLayout.rotateTo(mUiContext.getResources(), targetRotation); final int rotation = RotationUtils.deltaRotation(fromRotation, targetRotation); if (rotation != ROTATION_0) { mNavigationBarsInsets = RotationUtils.rotateInsets(mNavigationBarsInsets, rotation); } } /** Returns the current display rotation of this layout state. */ Loading