Correct landscape mode color extraction rectangle

I had inverted the width and height of the screen,

Bug: 185887938
Test: Manual
Change-Id: I03889bf5e3f257414b90e992583307d61a960fe6
This commit is contained in:
Pierre Barbier de Reuille
2021-04-20 14:59:22 +01:00
parent 315bef15e1
commit ca6f2475f1
@@ -339,7 +339,7 @@ public class LauncherAppWidgetHostView extends NavigableAppWidgetHostView
// The layout depends on the orientation.
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
int parentViewWidth = parentView == null ? 0 : parentView.getWidth();
xOffset = screenHeight - mWorkspace.getPaddingRight() - parentViewWidth;
xOffset = screenWidth - mWorkspace.getPaddingRight() - parentViewWidth;
} else {
int parentViewPaddingLeft = parentView == null ? 0 : parentView.getPaddingLeft();
xOffset = mWorkspace.getPaddingLeft() + parentViewPaddingLeft;