Fix media clipping bounds

Set the proper top/bottom bounds for the QS scroller so the clipping is
done properly

Test: manual in many devices and configurations
Fixes: 226318066
Change-Id: I50cb231207991fa6514b10a3a1ca110ff5effc5e
This commit is contained in:
Fabian Kozynski
2022-03-23 13:57:06 -04:00
parent 1283caacb6
commit f6a7dcf04f

View File

@@ -92,6 +92,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 final RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler;
private final MediaHost mQsMediaHost;
@@ -600,8 +601,11 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
}
mQSPanelScrollView.setClipBounds(mQsBounds);
mQsMediaHost.getCurrentClipping().set(0, 0, getView().getMeasuredWidth(),
mQSPanelScrollView.getMeasuredHeight() - mQSPanelScrollView.getPaddingBottom());
mQSPanelScrollView.getLocationOnScreen(mTemp);
int top = mTemp[1];
mQsMediaHost.getCurrentClipping().set(0, top, getView().getMeasuredWidth(),
top + mQSPanelScrollView.getMeasuredHeight()
- mQSPanelScrollView.getPaddingBottom());
}
private void updateMediaPositions() {