summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabian Kozynski <kozynski@google.com> 2022-05-18 10:14:35 -0400
committer Fabian Kozynski <kozynski@google.com> 2022-05-18 11:26:13 -0400
commitdf16ddc2044a6a7f68e943abbec6317851271a20 (patch)
tree90070a1799333b2bf33f182220b0a90583558b46
parent04f59c26f679212fb7a41d37842d53a23b118eb9 (diff)
Fix media side clipping on large screen portrait
In large screen, the left bound is not 0. Instead, use the proper left bound so the media player will not be clipped on the right. This doesn't fix the bottom clipping as that's tied to the translation animation. Test: manual Bug: 220869154 Change-Id: I4b58853b6e9e4102fe6d2e5ff58b1551d8cf0bea
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSFragment.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
index f87cb29a8758..0c6104d9347b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
@@ -96,7 +96,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
private float mLastPanelFraction;
private float mSquishinessFraction = 1;
private boolean mQsDisabled;
- private int[] mTemp = new int[2];
+ private int[] mLocationTemp = new int[2];
private final RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler;
private final MediaHost mQsMediaHost;
@@ -630,9 +630,10 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
}
mQSPanelScrollView.setClipBounds(mQsBounds);
- mQSPanelScrollView.getLocationOnScreen(mTemp);
- int top = mTemp[1];
- mQsMediaHost.getCurrentClipping().set(0, top, getView().getMeasuredWidth(),
+ mQSPanelScrollView.getLocationOnScreen(mLocationTemp);
+ int left = mLocationTemp[0];
+ int top = mLocationTemp[1];
+ mQsMediaHost.getCurrentClipping().set(left, top, left + getView().getMeasuredWidth(),
top + mQSPanelScrollView.getMeasuredHeight()
- mQSPanelScrollView.getPaddingBottom());
}
@@ -777,8 +778,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
* the QS container.
*/
private int getQsMinExpansionHeightForSplitShade() {
- getView().getLocationOnScreen(mTemp);
- int top = mTemp[1];
+ getView().getLocationOnScreen(mLocationTemp);
+ int top = mLocationTemp[1];
// We want to get the original top position, so we subtract any translation currently set.
int originalTop = (int) (top - getView().getTranslationY());
// On split shade the QS view doesn't start at the top of the screen, so we need to add the
@@ -841,7 +842,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
indentingPw.println("mLastPanelFraction: " + mLastPanelFraction);
indentingPw.println("mSquishinessFraction: " + mSquishinessFraction);
indentingPw.println("mQsDisabled: " + mQsDisabled);
- indentingPw.println("mTemp: " + Arrays.toString(mTemp));
+ indentingPw.println("mTemp: " + Arrays.toString(mLocationTemp));
indentingPw.println("mShowCollapsedOnKeyguard: " + mShowCollapsedOnKeyguard);
indentingPw.println("mLastKeyguardAndExpanded: " + mLastKeyguardAndExpanded);
indentingPw.println("mState: " + StatusBarState.toString(mState));