Loading quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3; import static android.provider.Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING; import static android.window.StartingWindowInfo.STARTING_WINDOW_TYPE_NONE; import static android.window.StartingWindowInfo.STARTING_WINDOW_TYPE_SPLASH_SCREEN; Loading Loading @@ -75,6 +76,7 @@ import android.os.IBinder; import android.os.Looper; import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings; import android.util.Pair; import android.util.Size; import android.view.SurfaceControl; Loading Loading @@ -682,6 +684,18 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener appAnimator.setInterpolator(LINEAR); appAnimator.addListener(floatingView); appAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { LauncherTaskbarUIController taskbarController = mLauncher.getTaskbarUIController(); if (taskbarController != null && taskbarController.shouldShowEdu()) { // LAUNCHER_TASKBAR_EDUCATION_SHOWING is set to true here, when the education // flow is about to start, to avoid a race condition with other components // that would show something else to the user as soon as the app is opened. Settings.Secure.putInt(mLauncher.getContentResolver(), LAUNCHER_TASKBAR_EDUCATION_SHOWING, 1); } } @Override public void onAnimationEnd(Animator animation) { if (v instanceof BubbleTextView) { Loading quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +10 −3 Original line number Diff line number Diff line Loading @@ -216,9 +216,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController { * Starts the taskbar education flow, if the user hasn't seen it yet. */ public void showEdu() { if (!FeatureFlags.ENABLE_TASKBAR_EDU.get() || Utilities.IS_RUNNING_IN_TEST_HARNESS || mLauncher.getOnboardingPrefs().getBoolean(OnboardingPrefs.TASKBAR_EDU_SEEN)) { if (!shouldShowEdu()) { return; } mLauncher.getOnboardingPrefs().markChecked(OnboardingPrefs.TASKBAR_EDU_SEEN); Loading @@ -226,6 +224,15 @@ public class LauncherTaskbarUIController extends TaskbarUIController { mControllers.taskbarEduController.showEdu(); } /** * Whether the taskbar education should be shown. */ public boolean shouldShowEdu() { return FeatureFlags.ENABLE_TASKBAR_EDU.get() && !Utilities.IS_RUNNING_IN_TEST_HARNESS && !mLauncher.getOnboardingPrefs().getBoolean(OnboardingPrefs.TASKBAR_EDU_SEEN); } /** * Manually ends the taskbar education flow. */ Loading quickstep/src/com/android/launcher3/taskbar/TaskbarEduView.java +9 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE; import android.animation.PropertyValuesHolder; import android.content.Context; import android.graphics.Rect; import android.provider.Settings; import android.util.AttributeSet; import android.util.Pair; import android.view.View; Loading Loading @@ -92,6 +93,14 @@ public class TaskbarEduView extends AbstractSlideInView<TaskbarActivityContext> getPopupContainer().addView(this, 1); } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING, 0); } /** Show the Education flow. */ public void show() { attachToContainer(); Loading Loading
quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3; import static android.provider.Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING; import static android.window.StartingWindowInfo.STARTING_WINDOW_TYPE_NONE; import static android.window.StartingWindowInfo.STARTING_WINDOW_TYPE_SPLASH_SCREEN; Loading Loading @@ -75,6 +76,7 @@ import android.os.IBinder; import android.os.Looper; import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings; import android.util.Pair; import android.util.Size; import android.view.SurfaceControl; Loading Loading @@ -682,6 +684,18 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener appAnimator.setInterpolator(LINEAR); appAnimator.addListener(floatingView); appAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { LauncherTaskbarUIController taskbarController = mLauncher.getTaskbarUIController(); if (taskbarController != null && taskbarController.shouldShowEdu()) { // LAUNCHER_TASKBAR_EDUCATION_SHOWING is set to true here, when the education // flow is about to start, to avoid a race condition with other components // that would show something else to the user as soon as the app is opened. Settings.Secure.putInt(mLauncher.getContentResolver(), LAUNCHER_TASKBAR_EDUCATION_SHOWING, 1); } } @Override public void onAnimationEnd(Animator animation) { if (v instanceof BubbleTextView) { Loading
quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +10 −3 Original line number Diff line number Diff line Loading @@ -216,9 +216,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController { * Starts the taskbar education flow, if the user hasn't seen it yet. */ public void showEdu() { if (!FeatureFlags.ENABLE_TASKBAR_EDU.get() || Utilities.IS_RUNNING_IN_TEST_HARNESS || mLauncher.getOnboardingPrefs().getBoolean(OnboardingPrefs.TASKBAR_EDU_SEEN)) { if (!shouldShowEdu()) { return; } mLauncher.getOnboardingPrefs().markChecked(OnboardingPrefs.TASKBAR_EDU_SEEN); Loading @@ -226,6 +224,15 @@ public class LauncherTaskbarUIController extends TaskbarUIController { mControllers.taskbarEduController.showEdu(); } /** * Whether the taskbar education should be shown. */ public boolean shouldShowEdu() { return FeatureFlags.ENABLE_TASKBAR_EDU.get() && !Utilities.IS_RUNNING_IN_TEST_HARNESS && !mLauncher.getOnboardingPrefs().getBoolean(OnboardingPrefs.TASKBAR_EDU_SEEN); } /** * Manually ends the taskbar education flow. */ Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarEduView.java +9 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE; import android.animation.PropertyValuesHolder; import android.content.Context; import android.graphics.Rect; import android.provider.Settings; import android.util.AttributeSet; import android.util.Pair; import android.view.View; Loading Loading @@ -92,6 +93,14 @@ public class TaskbarEduView extends AbstractSlideInView<TaskbarActivityContext> getPopupContainer().addView(this, 1); } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING, 0); } /** Show the Education flow. */ public void show() { attachToContainer(); Loading