Add LAUNCHER_ALL_APPS_SEARCH_BACK jank instrumentation

Bug: 330405993
Test: prefetto trace TBD
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I1fb2876fb29bc360cbb8dc8c1605215f28383c3c
This commit is contained in:
Fengjiang Li
2024-03-28 16:24:39 -07:00
parent 6c585ca7d7
commit 01cc273537
4 changed files with 46 additions and 9 deletions

View File

@@ -85,6 +85,7 @@ import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.pm.UserCache;
import com.android.launcher3.recyclerview.AllAppsRecyclerViewPool;
import com.android.launcher3.util.ItemInfoMatcher;
import com.android.launcher3.util.Preconditions;
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.BaseDragLayer;
@@ -1366,6 +1367,18 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
invalidateHeader();
}
/**
* Set {@link Animator.AnimatorListener} on {@link mAllAppsTransitionController} to observe
* animation of backing out of all apps search view to all apps view.
*/
public void setAllAppsSearchBackAnimatorListener(Animator.AnimatorListener listener) {
Preconditions.assertNotNull(mAllAppsTransitionController);
if (mAllAppsTransitionController == null) {
return;
}
mAllAppsTransitionController.setAllAppsSearchBackAnimationListener(listener);
}
public void setScrimView(ScrimView scrimView) {
mScrimView = scrimView;
}