DO NOT MERGE Correct physical orientation
setProjection already includes the physical orientation when updating
the DisplayDevice orientation. Therefore applying the physical
orientation when capturing a screenshot applies the rotation twice
which is incorrect.
Bug: 170512822
Test: run cts-on-gsi -m CtsInputMethodServiceHostTestCases -t android.inputmethodservice.cts.hostside.InputMethodServiceLifecycleTest#testImeVisibilityAfterImeSwitchingFull
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.FocusHandlingTest#testNonFocusablePopupWindowDoesNotAffectImeVisibility
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.ImeInsetsVisibilityTest#testEditTextPositionAndPersistWhenAboveImeWindowShown
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.ImeInsetsVisibilityTest#testImeVisibilityWhenImeFocusableChildPopup" />
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.InputMethodServiceTest#testRequestHideSelf
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.InputMethodServiceTest#testRequestShowSelf
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.KeyboardVisibilityControlTest#testBasicShowHideSoftInput
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.KeyboardVisibilityControlTest#testFloatingImeHideKeyboardAfterBackPressed
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.KeyboardVisibilityControlTest#testImeVisibilityWhenDismisingDialogWithImeFocused
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.KeyboardVisibilityControlTest#testShowHideKeyboardOnWebView
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.KeyboardVisibilityControlTest#testToggleSoftInput
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.SearchViewTest#testShowImeWhenSearchViewFocusInListView
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.SearchViewTest#testShowImeWithSearchViewFocus
run cts-on-gsi -m CtsInputMethodTestCases -t android.view.inputmethod.cts.SearchViewTest#testTapThenSetQuery
run cts-on-gsi -m CtsWindowManagerDeviceTestCases -t android.server.wm.WindowInsetsAnimationSynchronicityTests#testControl_rendersSynchronouslyBetweenImeWindowAndAppContent
run cts-on-gsi -m CtsWindowManagerDeviceTestCases -t android.server.wm.WindowInsetsAnimationSynchronicityTests#testShowAndHide_renderSynchronouslyBetweenImeWindowAndAppContent
Change-Id: I72aba3cdbae1075dcf9d99661bfd13fe5fd74c72
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index cb467ea..ca7119e 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -313,7 +313,7 @@
logicalOrientation = ui::Rotation::Rotation90;
}
- const ui::Rotation orientation = device->getPhysicalOrientation() + logicalOrientation;
+ const ui::Rotation orientation = logicalOrientation;
switch (orientation) {
case ui::ROTATION_0: