diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java index f60e207f9a8c0..d16e1b1429b43 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java @@ -69,7 +69,8 @@ public class RecentsOnboarding { private static final boolean RESET_PREFS_FOR_DEBUG = false; private static final boolean ONBOARDING_ENABLED = true; private static final long SHOW_DELAY_MS = 500; - private static final long SHOW_HIDE_DURATION_MS = 300; + private static final long SHOW_DURATION_MS = 300; + private static final long HIDE_DURATION_MS = 100; // Show swipe-up tips after opening overview from home this number of times. private static final int SWIPE_UP_SHOW_ON_OVERVIEW_OPENED_FROM_HOME_COUNT = 3; // Show quick scrub tips after opening overview this number of times. @@ -171,6 +172,11 @@ public class RecentsOnboarding { } } + @Override + public void onQuickStepStarted() { + hide(true); + } + @Override public void onQuickScrubStarted() { boolean alreadySeenQuickScrubsOnboarding = hasSeenQuickScrubOnboarding(); @@ -292,7 +298,7 @@ public class RecentsOnboarding { mHasDismissedQuickScrubTip = false; mNumAppsLaunchedSinceSwipeUpTipDismiss = 0; mOverviewOpenedCountSinceQuickScrubTipDismiss = 0; - hide(false); + hide(true); } public void onConfigurationChanged(Configuration newConfiguration) { @@ -305,15 +311,12 @@ public class RecentsOnboarding { if (!shouldShow()) { return; } - if (mLayoutAttachedToWindow) { - hide(false); - } mDismissView.setTag(stringRes); mLayout.setTag(stringRes); mTextView.setText(stringRes); // Only show in portrait. int orientation = mContext.getResources().getConfiguration().orientation; - if (orientation == Configuration.ORIENTATION_PORTRAIT) { + if (!mLayoutAttachedToWindow && orientation == Configuration.ORIENTATION_PORTRAIT) { mLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE); mWindowManager.addView(mLayout, getWindowLayoutParams()); @@ -322,7 +325,7 @@ public class RecentsOnboarding { .alpha(1f) .withLayer() .setStartDelay(SHOW_DELAY_MS) - .setDuration(SHOW_HIDE_DURATION_MS) + .setDuration(SHOW_DURATION_MS) .setInterpolator(new DecelerateInterpolator()) .start(); } @@ -344,7 +347,8 @@ public class RecentsOnboarding { mLayout.animate() .alpha(0f) .withLayer() - .setDuration(SHOW_HIDE_DURATION_MS) + .setStartDelay(0) + .setDuration(HIDE_DURATION_MS) .setInterpolator(new AccelerateInterpolator()) .withEndAction(() -> mWindowManager.removeViewImmediate(mLayout)) .start();