Refactoring PagedOrientationHandler to extract functions from to quickstep

This CL extracts RecentsView methods from PagedOrientationHandler to RecentsPagedOrientationHandler. It will allow to have quickstep specific components in the newer interface, like IconAppChipView.

Bug: 320633351
Flag: N/A
Test: atest NexusLauncherTests
Test: atest TaplTestsSplitscreen
Test: atest TaplTestsQuickstep
Change-Id: Ie7de23bddccbdb8eac93eff66a5d929f5bf0ee3a
This commit is contained in:
Jordan Silva
2024-01-30 18:02:27 +00:00
parent e96d30bddb
commit 715e25adf4
27 changed files with 568 additions and 474 deletions

View File

@@ -118,7 +118,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
private float mTotalMotion;
// Used in special cases where the fling checks can be relaxed for an intentional gesture
private boolean mAllowEasyFling;
protected PagedOrientationHandler mOrientationHandler = PagedOrientationHandler.PORTRAIT;
private PagedOrientationHandler mOrientationHandler =
PagedOrientationHandler.DEFAULT;
private final ArrayList<Runnable> mOnPageScrollsInitializedCallbacks = new ArrayList<>();
@@ -231,6 +232,14 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
return getChildAt(index);
}
protected PagedOrientationHandler getPagedOrientationHandler() {
return mOrientationHandler;
}
protected void setOrientationHandler(PagedOrientationHandler orientationHandler) {
this.mOrientationHandler = orientationHandler;
}
/**
* Updates the scroll of the current page immediately to its final scroll position. We use this
* in CustomizePagedView to allow tabs to share the same PagedView while resetting the scroll of