use of com.android.launcher3.allapps.DiscoveryBounce in project android_packages_apps_Launcher3 by crdroidandroid.
the class DiscoveryBounce method showForHomeIfNeeded.
private static void showForHomeIfNeeded(Launcher launcher, boolean withDelay) {
OnboardingPrefs onboardingPrefs = launcher.getOnboardingPrefs();
if (!launcher.isInState(NORMAL) || onboardingPrefs.getBoolean(OnboardingPrefs.HOME_BOUNCE_SEEN) || AbstractFloatingView.getTopOpenView(launcher) != null || launcher.getSystemService(UserManager.class).isDemoUser() || Utilities.IS_RUNNING_IN_TEST_HARNESS) {
return;
}
if (withDelay) {
new Handler().postDelayed(() -> showForHomeIfNeeded(launcher, false), DELAY_MS);
return;
}
onboardingPrefs.incrementEventCount(OnboardingPrefs.HOME_BOUNCE_COUNT);
new DiscoveryBounce(launcher).show();
}
use of com.android.launcher3.allapps.DiscoveryBounce in project android_packages_apps_Trebuchet by LineageOS.
the class DiscoveryBounce method showForHomeIfNeeded.
private static void showForHomeIfNeeded(Launcher launcher, boolean withDelay) {
OnboardingPrefs onboardingPrefs = launcher.getOnboardingPrefs();
if (!launcher.isInState(NORMAL) || onboardingPrefs.getBoolean(OnboardingPrefs.HOME_BOUNCE_SEEN) || AbstractFloatingView.getTopOpenView(launcher) != null || launcher.getSystemService(UserManager.class).isDemoUser() || Utilities.IS_RUNNING_IN_TEST_HARNESS) {
return;
}
if (withDelay) {
new Handler().postDelayed(() -> showForHomeIfNeeded(launcher, false), DELAY_MS);
return;
}
onboardingPrefs.incrementEventCount(OnboardingPrefs.HOME_BOUNCE_COUNT);
new DiscoveryBounce(launcher, 0).show(HOTSEAT);
}
use of com.android.launcher3.allapps.DiscoveryBounce 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);
}
use of com.android.launcher3.allapps.DiscoveryBounce in project android_packages_apps_Launcher3 by ArrowOS.
the class DiscoveryBounce method showForHomeIfNeeded.
private static void showForHomeIfNeeded(Launcher launcher, boolean withDelay) {
OnboardingPrefs onboardingPrefs = launcher.getOnboardingPrefs();
if (!launcher.isInState(NORMAL) || onboardingPrefs.getBoolean(OnboardingPrefs.HOME_BOUNCE_SEEN) || AbstractFloatingView.getTopOpenView(launcher) != null || launcher.getSystemService(UserManager.class).isDemoUser() || Utilities.IS_RUNNING_IN_TEST_HARNESS) {
return;
}
if (withDelay) {
new Handler().postDelayed(() -> showForHomeIfNeeded(launcher, false), DELAY_MS);
return;
}
onboardingPrefs.incrementEventCount(OnboardingPrefs.HOME_BOUNCE_COUNT);
new DiscoveryBounce(launcher).show();
}
use of com.android.launcher3.allapps.DiscoveryBounce in project android_packages_apps_Launcher3 by ProtonAOSP.
the class DiscoveryBounce method showForHomeIfNeeded.
private static void showForHomeIfNeeded(Launcher launcher, boolean withDelay) {
OnboardingPrefs onboardingPrefs = launcher.getOnboardingPrefs();
if (!launcher.isInState(NORMAL) || onboardingPrefs.getBoolean(OnboardingPrefs.HOME_BOUNCE_SEEN) || AbstractFloatingView.getTopOpenView(launcher) != null || launcher.getSystemService(UserManager.class).isDemoUser() || Utilities.IS_RUNNING_IN_TEST_HARNESS) {
return;
}
if (withDelay) {
new Handler().postDelayed(() -> showForHomeIfNeeded(launcher, false), DELAY_MS);
return;
}
onboardingPrefs.incrementEventCount(OnboardingPrefs.HOME_BOUNCE_COUNT);
new DiscoveryBounce(launcher).show();
}
Aggregations