OSDN Git Service

Fix boundary condition of showing quickscrub tip after dismissal.
authorTracy Zhou <tracyzhou@google.com>
Thu, 24 May 2018 21:41:34 +0000 (14:41 -0700)
committerTracy Zhou <tracyzhou@google.com>
Thu, 24 May 2018 21:47:20 +0000 (21:47 +0000)
It's possible that user opens overview 11 times after first dismissal of
Quickscrub tip before going to an app and our current condition check would fail. Change
the condition of showing swipe-up tip for consistency.

Change-Id: If58f9b6f2edfbdccf68a2c44e0b3b4b489862734
Fixes: 80256933
Test: Manual test

packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java

index fec76f2..086c87b 100644 (file)
@@ -173,7 +173,7 @@ public class RecentsOnboarding {
                                             : SWIPE_UP_SHOW_ON_APP_LAUNCH_AFTER_DISMISS_BACK_OFF;
                             mNumAppsLaunchedSinceSwipeUpTipDismiss++;
                             if (mNumAppsLaunchedSinceSwipeUpTipDismiss
-                                    == swipeUpShowOnAppLauncherAfterDismiss) {
+                                    >= swipeUpShowOnAppLauncherAfterDismiss) {
                                 mNumAppsLaunchedSinceSwipeUpTipDismiss = 0;
                                 shouldLog = show(R.string.recents_swipe_up_onboarding);
                             }
@@ -188,7 +188,7 @@ public class RecentsOnboarding {
                     if (getOpenedOverviewCount() >= QUICK_SCRUB_SHOW_ON_OVERVIEW_OPENED_COUNT) {
                         if (mHasDismissedQuickScrubTip) {
                             if (mOverviewOpenedCountSinceQuickScrubTipDismiss
-                                    == QUICK_SCRUB_SHOW_ON_OVERVIEW_OPENED_COUNT) {
+                                    >= QUICK_SCRUB_SHOW_ON_OVERVIEW_OPENED_COUNT) {
                                 mOverviewOpenedCountSinceQuickScrubTipDismiss = 0;
                                 shouldLog = show(R.string.recents_quick_scrub_onboarding);
                             }