Search in sources :

Example 1 with HOME_BOUNCE_SEEN

use of com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_SEEN in project Neo-Launcher by NeoApplications.

the class DiscoveryBounce method showForHomeIfNeeded.

private static void showForHomeIfNeeded(Launcher launcher, boolean withDelay) {
    if (!launcher.isInState(NORMAL) || (launcher.getSharedPrefs().getBoolean(HOME_BOUNCE_SEEN, false) && !shouldShowForWorkProfile(launcher)) || AbstractFloatingView.getTopOpenView(launcher) != null || UserManagerCompat.getInstance(launcher).isDemoUser() || Utilities.IS_RUNNING_IN_TEST_HARNESS) {
        return;
    }
    if (withDelay) {
        new Handler().postDelayed(() -> showForHomeIfNeeded(launcher, false), DELAY_MS);
        return;
    }
    incrementHomeBounceCount(launcher);
    new DiscoveryBounce(launcher, 0).show(HOTSEAT);
}
Also used : InternalStateHandler(com.android.launcher3.states.InternalStateHandler) Handler(android.os.Handler)

Aggregations

Handler (android.os.Handler)1 InternalStateHandler (com.android.launcher3.states.InternalStateHandler)1