From b21ad2da8c81b331b146449e88864c25bfe062bb Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Wed, 21 Dec 2022 03:23:32 +0000 Subject: [PATCH] Implement initial transient Taskbar EDU tooltips. Since this tooltip looks and behaves differently than the existing EDU sheet, it has its own view and controller implementations (I also may have wanted to write some Kotlin). To keep transient taskbar open while on the second EDU step, another autohide suspend flag is defined. Additionally, special casing is added to avoid hiding transient taskbar if autohiding is currently suspended. Tooltips use the same assets as the bottom sheet for now, and are scaled down to fit the tooltip dimensions. Reset `Taskbar Education` in Developer Options to try EDU again. [Demos] - First: https://screenshot.googleplex.com/ASBeGvrb2EA5wEF.png - Second: https://screenshot.googleplex.com/7fnfcTh9bMYezDc.png Test: Manual Test: Open app, see swipe-up tooltip. Test: Swipe up to show transient taskbar, see features tooltip. Bug: 263157739 Fix: 258460203 Change-Id: I473f5fccbae279db0614763b640da0a120b6b7f7 --- .../res/drawable/bg_taskbar_edu_tooltip.xml | 22 +++ quickstep/res/layout/taskbar_edu_features.xml | 87 ++++++++ quickstep/res/layout/taskbar_edu_swipe.xml | 43 ++++ quickstep/res/layout/taskbar_edu_tooltip.xml | 41 ++++ quickstep/res/values/dimens.xml | 12 ++ quickstep/res/values/strings.xml | 6 +- quickstep/res/values/styles.xml | 12 ++ .../launcher3/QuickstepTransitionManager.java | 4 +- .../launcher3/taskbar/BaseTaskbarContext.java | 9 + .../taskbar/LauncherTaskbarUIController.java | 48 ++++- .../taskbar/TaskbarActivityContext.java | 4 +- .../TaskbarAutohideSuspendController.java | 4 + .../launcher3/taskbar/TaskbarControllers.java | 9 +- .../launcher3/taskbar/TaskbarEduTooltip.kt | 187 ++++++++++++++++++ .../taskbar/TaskbarEduTooltipController.kt | 147 ++++++++++++++ .../taskbar/TaskbarStashController.java | 5 + .../taskbar/TaskbarTranslationController.java | 8 +- .../overlay/TaskbarOverlayContext.java | 9 - .../launcher3/taskbar/TaskbarBaseTestCase.kt | 107 +++++----- .../launcher3/util/OnboardingPrefs.java | 7 +- 20 files changed, 686 insertions(+), 85 deletions(-) create mode 100644 quickstep/res/drawable/bg_taskbar_edu_tooltip.xml create mode 100644 quickstep/res/layout/taskbar_edu_features.xml create mode 100644 quickstep/res/layout/taskbar_edu_swipe.xml create mode 100644 quickstep/res/layout/taskbar_edu_tooltip.xml create mode 100644 quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltip.kt create mode 100644 quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltipController.kt diff --git a/quickstep/res/drawable/bg_taskbar_edu_tooltip.xml b/quickstep/res/drawable/bg_taskbar_edu_tooltip.xml new file mode 100644 index 0000000000..a20f7daf2c --- /dev/null +++ b/quickstep/res/drawable/bg_taskbar_edu_tooltip.xml @@ -0,0 +1,22 @@ + + + + + + + \ No newline at end of file diff --git a/quickstep/res/layout/taskbar_edu_features.xml b/quickstep/res/layout/taskbar_edu_features.xml new file mode 100644 index 0000000000..72517b1587 --- /dev/null +++ b/quickstep/res/layout/taskbar_edu_features.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + +