Correct the page scrolls of the AddDesktopButton
Do not apply the button's grid translation to its page scrolls if it is not showing as a grid,otherwise the `mCurrentPage` may not be set correctly while checking `ensureWithinScrollBounds`. Bug: 396146789 Flag: com.android.window.flags.enable_multiple_desktops_frontend Flag: com.android.window.flags.enable_multiple_desktops_backend Test: m Change-Id: Ia1378a997e681abda60fa1cb3c125660916df4c5
This commit is contained in:
@@ -6243,8 +6243,8 @@ public abstract class RecentsView<
|
||||
int addDesktopButtonIndex = indexOfChild(mAddDesktopButton);
|
||||
if (addDesktopButtonIndex != -1 && addDesktopButtonIndex < outPageScrolls.length) {
|
||||
outPageScrolls[addDesktopButtonIndex] =
|
||||
newPageScrolls[addDesktopButtonIndex] + Math.round(
|
||||
mAddDesktopButton.getGridTranslationX());
|
||||
newPageScrolls[addDesktopButtonIndex] + mAddDesktopButton.getScrollAdjustment(
|
||||
showAsGrid);
|
||||
}
|
||||
|
||||
int lastTaskScroll = getLastTaskScroll(clearAllScroll, clearAllWidth);
|
||||
|
||||
Reference in New Issue
Block a user