From 474c616e981c60bcfc05114b4823b9176178240d Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Mon, 3 May 2021 18:26:44 -0700 Subject: [PATCH] Adds AllSetActivity in Launcher. Mostly copied from its location in Tips. Some exceptions: - Accent color (used for the icon at the top and link text) is derived from intent extras to match the rest of SUW. If needed, we could also pass other colors this way; currently they just use default light/dark mode colors. - Currently there is no animation in the middle. Not sure if one is expected, but we can add it later if so. Bug: 184722307 Test: Manually passing arbitrary colors via adb: adb shell am start -a com.android.quickstep.action.GESTURE_ONBOARDING_ALL_SET --ei accent_color_dark_mode -2134901760 --ei accent_color_light_mode 2147418112 Change-Id: I1fb8b20b88b7485d28f06afd2b421999ad847266 --- quickstep/AndroidManifest.xml | 32 +++- quickstep/res/drawable/ic_all_set.xml | 24 +++ quickstep/res/layout/activity_allset.xml | 80 ++++++++++ quickstep/res/values/attrs.xml | 22 +++ quickstep/res/values/dimens.xml | 7 + quickstep/res/values/strings.xml | 9 ++ quickstep/res/values/styles.xml | 7 +- .../quickstep/interaction/AllSetActivity.java | 133 ++++++++++++++++ .../quickstep/interaction/AnnotationSpan.java | 143 ++++++++++++++++++ 9 files changed, 452 insertions(+), 5 deletions(-) create mode 100644 quickstep/res/drawable/ic_all_set.xml create mode 100644 quickstep/res/layout/activity_allset.xml create mode 100644 quickstep/res/values/attrs.xml create mode 100644 quickstep/src/com/android/quickstep/interaction/AllSetActivity.java create mode 100644 quickstep/src/com/android/quickstep/interaction/AnnotationSpan.java diff --git a/quickstep/AndroidManifest.xml b/quickstep/AndroidManifest.xml index 842abc399f..7ab09c5ce9 100644 --- a/quickstep/AndroidManifest.xml +++ b/quickstep/AndroidManifest.xml @@ -103,16 +103,40 @@ android:clearTaskOnLaunch="true" android:exported="false"/> + + android:autoRemoveFromRecents="true" + android:excludeFromRecents="true" + android:screenOrientation="portrait" + android:permission="android.permission.REBOOT" + android:exported="true"> + + + + + + + + + + + + diff --git a/quickstep/res/layout/activity_allset.xml b/quickstep/res/layout/activity_allset.xml new file mode 100644 index 0000000000..a6a17e5ebc --- /dev/null +++ b/quickstep/res/layout/activity_allset.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + diff --git a/quickstep/res/values/attrs.xml b/quickstep/res/values/attrs.xml new file mode 100644 index 0000000000..336fb572d5 --- /dev/null +++ b/quickstep/res/values/attrs.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml index 9c0a083084..4f9b3ebe59 100644 --- a/quickstep/res/values/dimens.xml +++ b/quickstep/res/values/dimens.xml @@ -99,6 +99,13 @@ 24dp 18dp + + 40dp + 28dp + 80dp + 52dp + 24dp + 8dp 64dp diff --git a/quickstep/res/values/strings.xml b/quickstep/res/values/strings.xml index a0f1638c8a..7ada496c40 100644 --- a/quickstep/res/values/strings.xml +++ b/quickstep/res/values/strings.xml @@ -177,6 +177,15 @@ Tutorial %1$d/%2$d + + All set! + + Swipe up to go home + + You\u2019re ready to start using your phone + + Navigation settings for accessibility + Share diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml index 7c7d20a20a..0a8ecb8bde 100644 --- a/quickstep/res/values/styles.xml +++ b/quickstep/res/values/styles.xml @@ -59,7 +59,7 @@ parent="TextAppearance.GestureTutorial"> start ?android:attr/textColorPrimary - google-sans + google-sans-text 0.03 18sp 24sp @@ -99,6 +99,11 @@ @color/gesture_tutorial_primary_color + +