Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4d89976 authored by liyong's avatar liyong Committed by 勇 李
Browse files

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
parent 354a51c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -313,7 +313,7 @@ private:
            logicalOrientation = ui::Rotation::Rotation90;
            logicalOrientation = ui::Rotation::Rotation90;
        }
        }


        const ui::Rotation orientation = device->getPhysicalOrientation() + logicalOrientation;
        const ui::Rotation orientation = logicalOrientation;


        switch (orientation) {
        switch (orientation) {
            case ui::ROTATION_0:
            case ui::ROTATION_0: