mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 10:18:20 +00:00
Log undo button click
Also fix a bug where we logged workspace swipe upon clicking undo, since rebinding the pages causes us to reset mCurrentPage = 0 followed by setCurrentPage(pageBoundFirst). Since the page isn't actually visibly changing, we shouldn't log in that case. Bug: 118758133 Change-Id: Ie87164a8c7c278680f67dee75657210bd33408a4
This commit is contained in:
@@ -300,10 +300,14 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setCurrentPage(int currentPage) {
|
||||
setCurrentPage(currentPage, INVALID_PAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current page.
|
||||
*/
|
||||
public void setCurrentPage(int currentPage) {
|
||||
public void setCurrentPage(int currentPage, int overridePrevPage) {
|
||||
if (!mScroller.isFinished()) {
|
||||
abortScrollerAnimation(true);
|
||||
}
|
||||
@@ -312,7 +316,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
if (getChildCount() == 0) {
|
||||
return;
|
||||
}
|
||||
int prevPage = mCurrentPage;
|
||||
int prevPage = overridePrevPage != INVALID_PAGE ? overridePrevPage : mCurrentPage;
|
||||
mCurrentPage = validateNewPage(currentPage);
|
||||
updateCurrentPageScroll();
|
||||
notifyPageSwitchListener(prevPage);
|
||||
|
||||
Reference in New Issue
Block a user