use of com.android.launcher3.hybridhotseat.HotseatPredictionController in project android_packages_apps_Trebuchet by LineageOS.
the class HotseatPredictionController method encodeHotseatLayoutIntoPredictionRank.
/**
* Fill in predicted_rank field based on app prediction.
* Only applicable when {@link ItemInfo#itemType} is PREDICTED_HOTSEAT
*/
public static void encodeHotseatLayoutIntoPredictionRank(@NonNull ItemInfo itemInfo, @NonNull LauncherLogProto.Target target) {
QuickstepLauncher launcher = QuickstepLauncher.ACTIVITY_TRACKER.getCreatedActivity();
if (launcher == null || launcher.getHotseatPredictionController() == null || itemInfo.getTargetComponent() == null) {
return;
}
HotseatPredictionController controller = launcher.getHotseatPredictionController();
final ComponentKey k = new ComponentKey(itemInfo.getTargetComponent(), itemInfo.user);
final List<ComponentKeyMapper> predictedApps = controller.mComponentKeyMappers;
OptionalInt rank = IntStream.range(0, predictedApps.size()).filter((i) -> k.equals(predictedApps.get(i).getComponentKey())).findFirst();
target.predictedRank = 10000 + (controller.mPredictedSpotsCount * 100) + (rank.isPresent() ? rank.getAsInt() + 1 : 0);
}
use of com.android.launcher3.hybridhotseat.HotseatPredictionController in project android_packages_apps_Launcher3 by ArrowOS.
the class QuickstepLauncher method setupViews.
@Override
protected void setupViews() {
super.setupViews();
mHotseatPredictionController = new HotseatPredictionController(this);
}
use of com.android.launcher3.hybridhotseat.HotseatPredictionController in project android_packages_apps_Launcher3 by ProtonAOSP.
the class QuickstepLauncher method setupViews.
@Override
protected void setupViews() {
super.setupViews();
mHotseatPredictionController = new HotseatPredictionController(this);
}
use of com.android.launcher3.hybridhotseat.HotseatPredictionController in project android_packages_apps_404Launcher by P-404.
the class QuickstepLauncher method setupViews.
@Override
protected void setupViews() {
super.setupViews();
mHotseatPredictionController = new HotseatPredictionController(this);
}
use of com.android.launcher3.hybridhotseat.HotseatPredictionController in project android_packages_apps_Launcher3 by crdroidandroid.
the class QuickstepLauncher method setupViews.
@Override
protected void setupViews() {
super.setupViews();
mHotseatPredictionController = new HotseatPredictionController(this);
}
Aggregations