Decrease TAPL All Apps scrolling flakiness

scrolling in all apps did not factor in additional top padding in the all apps list recycler. This made it so that apps could occasionally scroll and be obcured by that top padding, making them un-tappable. Added this padding to the scrolling logic to make scrolling less flaky.

Test: TaplTestsTaskbar, TaplTestsLauncher3 and presubmit
Fixes: 248064856
Change-Id: Id76b92b4bc354917f3688ac53673d0ed7a905f02
This commit is contained in:
Schneider Victor-tulias
2022-09-20 13:54:29 -07:00
parent 821ef94974
commit ee0bc03d58
8 changed files with 86 additions and 11 deletions

View File

@@ -16,6 +16,7 @@
package com.android.launcher3.taskbar.allapps;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.android.launcher3.R;
import com.android.launcher3.appprediction.PredictionRowView;
@@ -123,4 +124,11 @@ public final class TaskbarAllAppsController {
.findFixedRowByType(PredictionRowView.class)
.setPredictedApps(mPredictedApps);
}
@VisibleForTesting
public int getTaskbarAllAppsTopPadding() {
// Allow null-pointer since this should only be null if the apps view is not showing.
return mAppsView.getActiveRecyclerView().getClipBounds().top;
}
}