From ef6f41a574d35bb23878aa2c84b442ed0c074e55 Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Wed, 20 Apr 2022 17:56:16 -0700 Subject: [PATCH 1/2] Adds Search Onboarding count and renames existing edu pref. Note: I only updated the old variable name to not affect exsiting values of the old preference. Bug: 227627262 Test: Manually checked onboarding card only showed 3 times. Change-Id: Ica6eca725be82ac7abf4681ba4ebcb33ee0178df --- .../launcher3/util/OnboardingPrefs.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/com/android/launcher3/util/OnboardingPrefs.java b/src/com/android/launcher3/util/OnboardingPrefs.java index 39d7cfe8d2..c1e4fa889c 100644 --- a/src/com/android/launcher3/util/OnboardingPrefs.java +++ b/src/com/android/launcher3/util/OnboardingPrefs.java @@ -38,8 +38,9 @@ public class OnboardingPrefs { public static final String HOME_BOUNCE_COUNT = "launcher.home_bounce_count"; public static final String HOTSEAT_DISCOVERY_TIP_COUNT = "launcher.hotseat_discovery_tip_count"; public static final String HOTSEAT_LONGPRESS_TIP_SEEN = "launcher.hotseat_longpress_tip_seen"; - public static final String SEARCH_EDU_SEEN = "launcher.search_edu_seen"; + public static final String SEARCH_KEYBOARD_EDU_SEEN = "launcher.search_edu_seen"; public static final String SEARCH_SNACKBAR_COUNT = "launcher.keyboard_snackbar_count"; + public static final String SEARCH_ONBOARDING_COUNT = "launcher.search_onboarding_count"; public static final String TASKBAR_EDU_SEEN = "launcher.taskbar_edu_seen"; public static final String ALL_APPS_VISITED_COUNT = "launcher.all_apps_visited_count"; // When adding a new key, add it here as well, to be able to reset it from Developer Options. @@ -47,7 +48,8 @@ public class OnboardingPrefs { "All Apps Bounce", new String[] { HOME_BOUNCE_SEEN, HOME_BOUNCE_COUNT }, "Hybrid Hotseat Education", new String[] { HOTSEAT_DISCOVERY_TIP_COUNT, HOTSEAT_LONGPRESS_TIP_SEEN }, - "Search Education", new String[] { SEARCH_EDU_SEEN, SEARCH_SNACKBAR_COUNT }, + "Search Education", new String[] { SEARCH_KEYBOARD_EDU_SEEN, SEARCH_SNACKBAR_COUNT, + SEARCH_ONBOARDING_COUNT}, "Taskbar Education", new String[] { TASKBAR_EDU_SEEN }, "All Apps Visited Count", new String[] {ALL_APPS_VISITED_COUNT} ); @@ -58,12 +60,11 @@ public class OnboardingPrefs { @StringDef(value = { HOME_BOUNCE_SEEN, HOTSEAT_LONGPRESS_TIP_SEEN, - SEARCH_EDU_SEEN, + SEARCH_KEYBOARD_EDU_SEEN, TASKBAR_EDU_SEEN }) @Retention(RetentionPolicy.SOURCE) - public @interface EventBoolKey { - } + public @interface EventBoolKey {} /** * Events that occur multiple times, which we count up to a max defined in {@link #MAX_COUNTS}. @@ -72,19 +73,21 @@ public class OnboardingPrefs { HOME_BOUNCE_COUNT, HOTSEAT_DISCOVERY_TIP_COUNT, SEARCH_SNACKBAR_COUNT, + SEARCH_ONBOARDING_COUNT, ALL_APPS_VISITED_COUNT }) @Retention(RetentionPolicy.SOURCE) - public @interface EventCountKey { - } + public @interface EventCountKey {} private static final Map MAX_COUNTS; static { - Map maxCounts = new ArrayMap<>(4); + Map maxCounts = new ArrayMap<>(5); maxCounts.put(HOME_BOUNCE_COUNT, 3); maxCounts.put(HOTSEAT_DISCOVERY_TIP_COUNT, 5); maxCounts.put(SEARCH_SNACKBAR_COUNT, 3); + // This is the sum of all onboarding cards. Currently there is only 1 card shown 3 times. + maxCounts.put(SEARCH_ONBOARDING_COUNT, 3); maxCounts.put(ALL_APPS_VISITED_COUNT, 20); MAX_COUNTS = Collections.unmodifiableMap(maxCounts); } From a9e9c667b4f603240c99f66b342682e6de931f0a Mon Sep 17 00:00:00 2001 From: Pablo Gamito Date: Wed, 20 Apr 2022 23:35:03 +0000 Subject: [PATCH 2/2] Use shared background color animation for settings activity Test: check that the launcher home settings activity transitions use the clear color activity animation with the correct background color Bug: 229898866 Change-Id: Ic96ceb0fdbd6c4f10b411492dc5be18e979796c8 --- .../shared_x_axis_activity_close_enter.xml | 42 +++++++++++++++++++ .../shared_x_axis_activity_close_exit.xml | 41 ++++++++++++++++++ .../shared_x_axis_activity_open_enter.xml | 42 +++++++++++++++++++ .../shared_x_axis_activity_open_exit.xml | 41 ++++++++++++++++++ res/interpolator/fast_out_extra_slow_in.xml | 19 +++++++++ res/interpolator/standard_accelerate.xml | 22 ++++++++++ res/interpolator/standard_decelerate.xml | 22 ++++++++++ res/values-v33/style.xml | 40 ++++++++++++++++++ 8 files changed, 269 insertions(+) create mode 100644 res/anim-v33/shared_x_axis_activity_close_enter.xml create mode 100644 res/anim-v33/shared_x_axis_activity_close_exit.xml create mode 100644 res/anim-v33/shared_x_axis_activity_open_enter.xml create mode 100644 res/anim-v33/shared_x_axis_activity_open_exit.xml create mode 100644 res/interpolator/fast_out_extra_slow_in.xml create mode 100644 res/interpolator/standard_accelerate.xml create mode 100644 res/interpolator/standard_decelerate.xml create mode 100644 res/values-v33/style.xml diff --git a/res/anim-v33/shared_x_axis_activity_close_enter.xml b/res/anim-v33/shared_x_axis_activity_close_enter.xml new file mode 100644 index 0000000000..94ef06c604 --- /dev/null +++ b/res/anim-v33/shared_x_axis_activity_close_enter.xml @@ -0,0 +1,42 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/anim-v33/shared_x_axis_activity_close_exit.xml b/res/anim-v33/shared_x_axis_activity_close_exit.xml new file mode 100644 index 0000000000..19eb09e4d3 --- /dev/null +++ b/res/anim-v33/shared_x_axis_activity_close_exit.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/anim-v33/shared_x_axis_activity_open_enter.xml b/res/anim-v33/shared_x_axis_activity_open_enter.xml new file mode 100644 index 0000000000..f699ceca70 --- /dev/null +++ b/res/anim-v33/shared_x_axis_activity_open_enter.xml @@ -0,0 +1,42 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/anim-v33/shared_x_axis_activity_open_exit.xml b/res/anim-v33/shared_x_axis_activity_open_exit.xml new file mode 100644 index 0000000000..85988ecfd2 --- /dev/null +++ b/res/anim-v33/shared_x_axis_activity_open_exit.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/interpolator/fast_out_extra_slow_in.xml b/res/interpolator/fast_out_extra_slow_in.xml new file mode 100644 index 0000000000..f296a8224f --- /dev/null +++ b/res/interpolator/fast_out_extra_slow_in.xml @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/res/interpolator/standard_accelerate.xml b/res/interpolator/standard_accelerate.xml new file mode 100644 index 0000000000..394393dc36 --- /dev/null +++ b/res/interpolator/standard_accelerate.xml @@ -0,0 +1,22 @@ + + + + \ No newline at end of file diff --git a/res/interpolator/standard_decelerate.xml b/res/interpolator/standard_decelerate.xml new file mode 100644 index 0000000000..579f4f5644 --- /dev/null +++ b/res/interpolator/standard_decelerate.xml @@ -0,0 +1,22 @@ + + + + \ No newline at end of file diff --git a/res/values-v33/style.xml b/res/values-v33/style.xml new file mode 100644 index 0000000000..bd484683d0 --- /dev/null +++ b/res/values-v33/style.xml @@ -0,0 +1,40 @@ + + + + + + + + \ No newline at end of file