Sync up to v302

This commit is contained in:
Andy CrossGate Yan
2021-03-14 05:52:23 +00:00
parent 73446c001b
commit cacd8b0430
27 changed files with 2349 additions and 28 deletions

View File

@@ -0,0 +1,50 @@
From 603b18beca562d922a546cb25d69778cf2af7c1d Mon Sep 17 00:00:00 2001
From: liyong <liyong@allwinnertech.com>
Date: Sat, 10 Oct 2020 17:08:47 +0800
Subject: [PATCH 12/13] 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
(cherry picked from commit d4d89976ea3f98248064fd755505ee5dc9b35c2f)
---
services/surfaceflinger/DisplayDevice.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index cb467ea29..ca7119e2c 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -313,7 +313,7 @@ private:
logicalOrientation = ui::Rotation::Rotation90;
}
- const ui::Rotation orientation = device->getPhysicalOrientation() + logicalOrientation;
+ const ui::Rotation orientation = logicalOrientation;
switch (orientation) {
case ui::ROTATION_0:
--
2.25.1

View File

@@ -0,0 +1,68 @@
From 54a80ed3e7039548d565c4e40e2fa7a45c89bce8 Mon Sep 17 00:00:00 2001
From: SeYeong Byeon <sy.byeon@samsung.com>
Date: Tue, 15 Sep 2020 15:02:40 +0900
Subject: [PATCH 13/13] gralloc4: fix PlaneLayout encode typecasting
Fixes a bug where planeLayout members were being downcasted
to int32_t during the encoding step.
Bug: 168564125
Signed-off-by: SeYeong Byeon <sy.byeon@samsung.com>
Change-Id: I8d5139dbd253278193775380ca387d45bfe2589d
(cherry picked from commit 389ee53332904b49c8f9fb35ef4e9e624e1ee3d2)
---
libs/gralloc/types/Gralloc4.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libs/gralloc/types/Gralloc4.cpp b/libs/gralloc/types/Gralloc4.cpp
index 53c68b723..e2f072a7a 100644
--- a/libs/gralloc/types/Gralloc4.cpp
+++ b/libs/gralloc/types/Gralloc4.cpp
@@ -706,35 +706,35 @@ status_t encodePlaneLayout(const PlaneLayout& input, OutputHidlVec* output) {
return err;
}
- err = encodeInteger<int64_t>(static_cast<int32_t>(input.offsetInBytes), output);
+ err = encodeInteger<int64_t>(static_cast<int64_t>(input.offsetInBytes), output);
if (err) {
return err;
}
- err = encodeInteger<int64_t>(static_cast<int32_t>(input.sampleIncrementInBits), output);
+ err = encodeInteger<int64_t>(static_cast<int64_t>(input.sampleIncrementInBits), output);
if (err) {
return err;
}
- err = encodeInteger<int64_t>(static_cast<int32_t>(input.strideInBytes), output);
+ err = encodeInteger<int64_t>(static_cast<int64_t>(input.strideInBytes), output);
if (err) {
return err;
}
- err = encodeInteger<int64_t>(static_cast<int32_t>(input.widthInSamples), output);
+ err = encodeInteger<int64_t>(static_cast<int64_t>(input.widthInSamples), output);
if (err) {
return err;
}
- err = encodeInteger<int64_t>(static_cast<int32_t>(input.heightInSamples), output);
+ err = encodeInteger<int64_t>(static_cast<int64_t>(input.heightInSamples), output);
if (err) {
return err;
}
- err = encodeInteger<int64_t>(static_cast<int32_t>(input.totalSizeInBytes), output);
+ err = encodeInteger<int64_t>(static_cast<int64_t>(input.totalSizeInBytes), output);
if (err) {
return err;
}
- err = encodeInteger<int64_t>(static_cast<int32_t>(input.horizontalSubsampling), output);
+ err = encodeInteger<int64_t>(static_cast<int64_t>(input.horizontalSubsampling), output);
if (err) {
return err;
}
- return encodeInteger<int64_t>(static_cast<int32_t>(input.verticalSubsampling), output);
+ return encodeInteger<int64_t>(static_cast<int64_t>(input.verticalSubsampling), output);
}
status_t decodePlaneLayout(InputHidlVec* input, PlaneLayout* output) {
--
2.25.1