Loading services/core/java/com/android/server/wm/DisplayArea.java +4 −5 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { @ScreenOrientation int getOrientation(int candidate) { final int orientation = super.getOrientation(candidate); if (getIgnoreOrientationRequest(orientation)) { if (shouldIgnoreOrientationRequest(orientation)) { // In all the other case, mLastOrientationSource will be reassigned to a new value mLastOrientationSource = null; return SCREEN_ORIENTATION_UNSET; Loading @@ -157,7 +157,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { @Override boolean handlesOrientationChangeFromDescendant(@ScreenOrientation int orientation) { return !getIgnoreOrientationRequest(orientation) return !shouldIgnoreOrientationRequest(orientation) && super.handlesOrientationChangeFromDescendant(orientation); } Loading @@ -168,7 +168,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { final int orientation = requestingContainer != null ? requestingContainer.getOverrideOrientation() : SCREEN_ORIENTATION_UNSET; return !getIgnoreOrientationRequest(orientation) return !shouldIgnoreOrientationRequest(orientation) && super.onDescendantOrientationChanged(requestingContainer); } Loading Loading @@ -235,8 +235,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { /** * @return {@value true} if we need to ignore the orientation in input. */ // TODO(b/262366204): Rename getIgnoreOrientationRequest to shouldIgnoreOrientationRequest boolean getIgnoreOrientationRequest(@ScreenOrientation int orientation) { boolean shouldIgnoreOrientationRequest(@ScreenOrientation int orientation) { // We always respect orientation request for ActivityInfo.SCREEN_ORIENTATION_LOCKED // ActivityInfo.SCREEN_ORIENTATION_NOSENSOR. // Main use case why this is important is Camera apps that rely on those Loading services/core/java/com/android/server/wm/DisplayContent.java +3 −3 Original line number Diff line number Diff line Loading @@ -1604,7 +1604,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @Override boolean handlesOrientationChangeFromDescendant(@ScreenOrientation int orientation) { return !getIgnoreOrientationRequest(orientation) return !shouldIgnoreOrientationRequest(orientation) && !getDisplayRotation().isFixedToUserRotation(); } Loading Loading @@ -1706,7 +1706,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp } final int activityOrientation = r.getOverrideOrientation(); if (!WindowManagerService.ENABLE_FIXED_ROTATION_TRANSFORM || getIgnoreOrientationRequest(activityOrientation)) { || shouldIgnoreOrientationRequest(activityOrientation)) { return ROTATION_UNDEFINED; } if (activityOrientation == ActivityInfo.SCREEN_ORIENTATION_BEHIND) { Loading Loading @@ -5122,7 +5122,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @ScreenOrientation int getOrientation(@ScreenOrientation int candidate) { // IME does not participate in orientation. return getIgnoreOrientationRequest(candidate) ? SCREEN_ORIENTATION_UNSET : candidate; return shouldIgnoreOrientationRequest(candidate) ? SCREEN_ORIENTATION_UNSET : candidate; } @Override Loading services/core/java/com/android/server/wm/TaskDisplayArea.java +1 −1 Original line number Diff line number Diff line Loading @@ -1877,7 +1877,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { // Only allow to specify orientation if this TDA is the last focused one on this logical // display that can request orientation request. return mDisplayContent.getOrientationRequestingTaskDisplayArea() == this && !getIgnoreOrientationRequest(orientation); && !shouldIgnoreOrientationRequest(orientation); } void clearPreferredTopFocusableRootTask() { Loading Loading
services/core/java/com/android/server/wm/DisplayArea.java +4 −5 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { @ScreenOrientation int getOrientation(int candidate) { final int orientation = super.getOrientation(candidate); if (getIgnoreOrientationRequest(orientation)) { if (shouldIgnoreOrientationRequest(orientation)) { // In all the other case, mLastOrientationSource will be reassigned to a new value mLastOrientationSource = null; return SCREEN_ORIENTATION_UNSET; Loading @@ -157,7 +157,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { @Override boolean handlesOrientationChangeFromDescendant(@ScreenOrientation int orientation) { return !getIgnoreOrientationRequest(orientation) return !shouldIgnoreOrientationRequest(orientation) && super.handlesOrientationChangeFromDescendant(orientation); } Loading @@ -168,7 +168,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { final int orientation = requestingContainer != null ? requestingContainer.getOverrideOrientation() : SCREEN_ORIENTATION_UNSET; return !getIgnoreOrientationRequest(orientation) return !shouldIgnoreOrientationRequest(orientation) && super.onDescendantOrientationChanged(requestingContainer); } Loading Loading @@ -235,8 +235,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { /** * @return {@value true} if we need to ignore the orientation in input. */ // TODO(b/262366204): Rename getIgnoreOrientationRequest to shouldIgnoreOrientationRequest boolean getIgnoreOrientationRequest(@ScreenOrientation int orientation) { boolean shouldIgnoreOrientationRequest(@ScreenOrientation int orientation) { // We always respect orientation request for ActivityInfo.SCREEN_ORIENTATION_LOCKED // ActivityInfo.SCREEN_ORIENTATION_NOSENSOR. // Main use case why this is important is Camera apps that rely on those Loading
services/core/java/com/android/server/wm/DisplayContent.java +3 −3 Original line number Diff line number Diff line Loading @@ -1604,7 +1604,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @Override boolean handlesOrientationChangeFromDescendant(@ScreenOrientation int orientation) { return !getIgnoreOrientationRequest(orientation) return !shouldIgnoreOrientationRequest(orientation) && !getDisplayRotation().isFixedToUserRotation(); } Loading Loading @@ -1706,7 +1706,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp } final int activityOrientation = r.getOverrideOrientation(); if (!WindowManagerService.ENABLE_FIXED_ROTATION_TRANSFORM || getIgnoreOrientationRequest(activityOrientation)) { || shouldIgnoreOrientationRequest(activityOrientation)) { return ROTATION_UNDEFINED; } if (activityOrientation == ActivityInfo.SCREEN_ORIENTATION_BEHIND) { Loading Loading @@ -5122,7 +5122,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @ScreenOrientation int getOrientation(@ScreenOrientation int candidate) { // IME does not participate in orientation. return getIgnoreOrientationRequest(candidate) ? SCREEN_ORIENTATION_UNSET : candidate; return shouldIgnoreOrientationRequest(candidate) ? SCREEN_ORIENTATION_UNSET : candidate; } @Override Loading
services/core/java/com/android/server/wm/TaskDisplayArea.java +1 −1 Original line number Diff line number Diff line Loading @@ -1877,7 +1877,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { // Only allow to specify orientation if this TDA is the last focused one on this logical // display that can request orientation request. return mDisplayContent.getOrientationRequestingTaskDisplayArea() == this && !getIgnoreOrientationRequest(orientation); && !shouldIgnoreOrientationRequest(orientation); } void clearPreferredTopFocusableRootTask() { Loading