use of com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN in project Neo-Launcher by NeoApplications.
the class DiscoveryBounce method showForOverviewIfNeeded.
private static void showForOverviewIfNeeded(Launcher launcher, boolean withDelay) {
if (!launcher.isInState(OVERVIEW) || !launcher.hasBeenResumed() || launcher.isForceInvisible() || launcher.getDeviceProfile().isVerticalBarLayout() || (launcher.getSharedPrefs().getBoolean(SHELF_BOUNCE_SEEN, false) && !shouldShowForWorkProfile(launcher)) || UserManagerCompat.getInstance(launcher).isDemoUser() || Utilities.IS_RUNNING_IN_TEST_HARNESS) {
return;
}
if (withDelay) {
new Handler().postDelayed(() -> showForOverviewIfNeeded(launcher, false), DELAY_MS);
return;
} else if (InternalStateHandler.hasPending() || AbstractFloatingView.getTopOpenView(launcher) != null) {
// TODO: Move these checks to the top and call this method after invalidate handler.
return;
}
incrementShelfBounceCount(launcher);
new DiscoveryBounce(launcher, (1 - OVERVIEW.getVerticalProgress(launcher))).show(PREDICTION);
}
Aggregations