Fix incorrect background bounds set by stackscroll view
Even if the stackscroll view is the same width as notification panel view, it doesn't guarantee the left position is 0 in window(when nav bar is on the left side). Always use location in window to set the left position instead. Test: runtest systemui Test: manual 1) change display size to largest 2) rotate to landscape 3) expand notification panel and check Fixes: 74988082 Change-Id: I06641c145365e315192e0b2b6c44d075a3016733
This commit is contained in:
@@ -2415,16 +2415,10 @@ public class NotificationStackScrollLayout extends ViewGroup
|
||||
* Update the background bounds to the new desired bounds
|
||||
*/
|
||||
private void updateBackgroundBounds() {
|
||||
if (mAmbientState.isPanelFullWidth()) {
|
||||
mBackgroundBounds.left = 0;
|
||||
mBackgroundBounds.right = getWidth();
|
||||
} else {
|
||||
getLocationInWindow(mTempInt2);
|
||||
mBackgroundBounds.left = mTempInt2[0];
|
||||
mBackgroundBounds.right = mTempInt2[0] + getWidth();
|
||||
}
|
||||
mBackgroundBounds.left += mSidePaddings;
|
||||
mBackgroundBounds.right -= mSidePaddings;
|
||||
getLocationInWindow(mTempInt2);
|
||||
mBackgroundBounds.left = mTempInt2[0] + mSidePaddings;
|
||||
mBackgroundBounds.right = mTempInt2[0] + getWidth() - mSidePaddings;
|
||||
|
||||
if (!mIsExpanded) {
|
||||
mBackgroundBounds.top = 0;
|
||||
mBackgroundBounds.bottom = 0;
|
||||
|
||||
Reference in New Issue
Block a user