Commit Graph

3159 Commits

Author SHA1 Message Date
Andy Wickham 474c616e98 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
2021-05-04 18:44:22 -07:00
TreeHugger Robot 4ca60d50bd Merge "Make overview color tinting work properly." into sc-dev 2021-05-04 23:18:48 +00:00
TreeHugger Robot 4d5c733411 Merge "Add NEW_TASK flag to Quickstep App Widget activity start" into sc-dev 2021-05-04 22:33:44 +00:00
Sunny Goyal c52c0782a7 Merge "Adding support for determining split layout for launcher." into sc-dev 2021-05-04 22:33:38 +00:00
Steven Ng 3e6b93cedb Merge "Add a flag to enable custom local filter for recommended widgets" into sc-dev 2021-05-04 22:02:25 +00:00
TreeHugger Robot 7d54a31ba9 Merge "AssistContentRequester-weaken references to system callback" into sc-dev 2021-05-04 21:28:22 +00:00
Tracy Zhou a570b82aff Merge "Revert "Revert "Revert "Finish recents animation upon home rotation"""" into sc-dev 2021-05-04 21:17:45 +00:00
Tracy Zhou 06df8fe4d8 Revert "Revert "Revert "Finish recents animation upon home rotation"""
This reverts commit ef7b4d5dae.

Reason for revert: Possibly broke a test
Bug: 187112839

Change-Id: I16ac2a155af9a0ae2ea60f55c52e0b3bf4307089
2021-05-04 21:17:36 +00:00
zakcohen 7167c3f3c9 Make overview color tinting work properly.
Bug: 179922117
Test: Local
Change-Id: I0b6620be8184bab836ed91d087739df57817eb37
2021-05-04 13:56:34 -07:00
Evan Rosky 04fb7ee44c Fix a bug in TouchInteractionService for fixed-display input rotation
DisplayManager display size seems to be pre-rotation, so adjust
logic in TouchInteractionService to account for that.

Bug: 179274888
Test: atest Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3
Change-Id: Ie89d7b7d74c8bece8a2c109a0b350bc190356bf2
2021-05-04 11:52:26 -07:00
Cyrus Boadway 04b8ac607e Add NEW_TASK flag to Quickstep App Widget activity start
Include the NEW_TASK flag to activity starts launched from Quickstep
hosted App Widgets.

This is consistent with the default non-Quickstep generated
ActivityOptions from RemoteViews::getLaunchOptions.

Bug: 169042867
Test: manual
Change-Id: Iba370731f4126d92a11a4e348e74888b533d4d8b
2021-05-04 18:38:48 +00:00
Cyrus Boadway 3c94052bb5 Merge "Change flag type to control Quickstep widget app launch" into sc-dev 2021-05-04 17:34:01 +00:00
Samuel Fufa 30ffc3f95c Merge changes Ice83b544,If0bc2a6d into sc-dev
* changes:
  [Search][Motion] Modify interpolator for AllApps background scrim
  Cleanup/consolidate normal<->all apps interpolators
2021-05-04 15:06:51 +00:00
Cyrus Boadway 197c909483 Change flag type to control Quickstep widget app launch
Previously we'd relied on a SystemProperties to control which
InteractionHandler was used by Quickstep for widget app launches.

This switches to a more conventional FeatureFlag.

Bug: 169042867
Test: manual
Change-Id: I7abf815c6e204daf996ac0a81b1a354c4e3d5cda
2021-05-04 12:04:36 +00:00
Alex Chau 90f587f350 Maintain TaskView's scroll invariant when swiping down
Fixes: 186881810
Test: Swipe down from task other than running task, snaps in proper position in fullscreen
Change-Id: If1a667246804ebff8432b295a0bb22d17feb5c31
2021-05-04 12:51:23 +01:00
TreeHugger Robot cc65b07d44 Merge "Adding support for using themed icons on workspace" into sc-dev 2021-05-04 06:03:17 +00:00
Winson Chung 7fbc961933 Allow binder calls from creating recents orientated state for now
- Should probably remove if possible since this is on a hot path

Bug: 187074722
Test: Presubmit
Change-Id: I104e1175acba7b90cd9824b905ffe68089beed9e
2021-05-03 22:27:24 -07:00
Samuel Fufa 3ab273da0c [Search][Motion] Modify interpolator for AllApps background scrim
Also rename ANIM_WORKSPACE_SCRIM_FADE to ANIM_SCRIM_FADE since
the scrim is shared between states now.

Bug: 183001675
Test: Manual in 3 button and 0 button modes
Change-Id: Ice83b54480bdf74155e8593c421b68d7186cf78a
2021-05-03 21:13:20 -07:00
Tony Wickham 154b1c928b Cleanup/consolidate normal<->all apps interpolators
We no longer need to have a different behavior for no button mode,
so make PortraitStatesTouchController the source of truth

Also remove unused ANIM_ALL_APPS_HEADER_FADE & RECENTS_FADE_THRESHOLD

Test: manually in 0 button and 3 button modes
Bug: 183001675
Bug: 175137718
Change-Id: If0bc2a6d6d3bf1649fad45226a4e6055f30e4880
2021-05-03 21:07:24 -07:00
TreeHugger Robot 13e4618b57 Merge "Fade out empty Overview message." into sc-dev 2021-05-04 03:49:54 +00:00
Sunny Goyal 9ab43772ab Adding support for using themed icons on workspace
Bug: 183641907
Test: Manual

Change-Id: Ieda7e73b3ae4dfe3009e3f23754aff5f8826a967
2021-05-03 20:00:38 -07:00
Zak Cohen fed2a01fe4 Fade out empty Overview message.
When Overview is empty, fade out its contents on transitions.


Bug: 185447800
Test: Local build and test on P5
Change-Id: I9a0cd649f2f7353e4a7af21a93fb18be36f616a8
2021-05-03 16:47:35 -07:00
Sunny Goyal 19ff728b92 Adding support for determining split layout for launcher.
> Simulating the windo wmanager API to get available device
  profiles until final API
> When a device has multiple internal displays, and with both
  tablet and phone possibilities, it uses a split workspace layout

Bug: 186160341
Bug: 175782275
Test: Manual
Change-Id: Ieff2329acac7cdd6b9abe6f96cd459cd45bd0efe
2021-05-03 14:48:28 -07:00
Zak Cohen daa3b8b9a3 AssistContentRequester-weaken references to system callback
The callback objects used to call into system server can
outlive the parent requester object. This can cause leaked
activities (on rotation for example). Use a weaker collection
of callback objects that aren't tied to the lifecycle of
the callback.

Bug: 186670923
Test: Ran TAPL tests to check for leaked activities
Change-Id: I33f556ad55b823652b06410d264f1473d3003320
2021-05-03 13:55:59 -07:00
Tracy Zhou 299de3f292 Merge "Revert "Revert "Finish recents animation upon home rotation""" into sc-dev 2021-05-03 18:08:37 +00:00
Tracy Zhou ef7b4d5dae Revert "Revert "Finish recents animation upon home rotation""
This reverts commit 0f8787db80.

Reason for revert: Revert and fix the broken tapl test

Fixes: 184054813
Change-Id: Ib647e11bfa0a2dc79a5a815be56452bb07e04ddf
2021-05-03 18:08:31 +00:00
Zak Cohen 554cf58401 Merge "Overview - fade task icon instead of scaling it per new ux" into sc-dev 2021-05-03 17:52:46 +00:00
Cyrus Boadway 92af1bfe5b Merge "Create return-to-home app widget animation" into sc-dev 2021-05-03 17:51:45 +00:00
Zak Cohen 20d00faf72 Overview - fade task icon instead of scaling it per new ux
Bug: 186256286
Test: Local build and run on p5
Change-Id: I318b62ddbf9cb475736d2844489a7ed2d9a8a409
2021-05-01 22:41:08 +00:00
Winson Chung 7c53f5d907 Merge "Take screenshot on ui helper thread in live tile" into sc-dev 2021-05-01 20:47:26 +00:00
Cyrus Boadway 3bdfc3cd2d Create return-to-home app widget animation
If an app has been most recently launched from an app widget, when
swiped away, the app animates to the widget's position.

This is done by attributing the app launch to the widget through
the ActivityOptions's launch cookies, and using a FloatingWidgetView
throughout the animation.

Bug: 169042867
Test: manual
Change-Id: I24c2623b5b3407504a4768b076849c47f73cbae0
2021-04-30 09:37:53 +00:00
TreeHugger Robot 8a50f93f91 Merge "Fade overview actions on transition to Home." into sc-dev 2021-04-30 01:05:13 +00:00
Winson Chung d2e91bace4 Take screenshot on ui helper thread in live tile
- Unify the live tile/non-live tile flow for taking a screenshot
  and post it to the ui helper thread

Bug: 186455799
Test: Test to verify that snapshots are still updated correctly
Change-Id: I26759419adf89c73602589da531bbc494b5c29e3
2021-04-29 16:23:58 -07:00
Zak Cohen cf38c65dc4 Fade overview actions on transition to Home.
Bug: 184696445
Fixes: 184696445
Test: Local build and flash
Change-Id: I950a08b1528ba983157615f99c21f06de220d414
2021-04-29 16:17:10 -07:00
TreeHugger Robot 2aec5f2643 Merge "Fix a couple issues with tracking launch cookies" into sc-dev 2021-04-29 21:04:25 +00:00
Winson Chung 3c192b3f72 Fix a couple issues with tracking launch cookies
- Fix NPE when there is no running task
- Fix issue where we were defaulting to a prediction icon when
  there was no launch cookie
- Don't use a launch cookie when we are launching from a non-workspace
  item, just fallback to the package name matching in that case

Fixes: 186653036
Fixes: 186593373
Test: Swipe up from various apps launched from predictions, also
      launch an app from all apps and swipe up and ensure it
      doesn't match a prediction
Change-Id: Ie8f5da010c140a5056045ac268d082c80271ab68
2021-04-29 04:23:40 +00:00
thiruram 7350b0f47e Logging ItemInfo.attribute field for LauncherUiChanged atom.
Unlike LaucherStaticLayout, LauncherUiChanged atom does not have origin field to write into statsd. This workaround solution will pack attribute value into target_id field and provides backward compatibility too.

Bug: 186169419
Test: Manual
Change-Id: Ib5344fad08accdd0aac827700c3842b7f102b7dc
2021-04-28 17:35:20 -07:00
TreeHugger Robot 127714094a Merge "Change TaskIconMenu to lay out vertically" into sc-dev 2021-04-28 20:16:43 +00:00
Vinit Nayak 4cc0dbb552 Change TaskIconMenu to lay out vertically
Still lays out horizontally when in phone
landscape.
TODO(b/186583656), need to center view.
Also have all layout be dynamic instead of having
some cases be in XML and some in code.

Bug: 181704764
Test: Task menu visible with all options in
portrait/landscape tablet
portrait phone
fake/real landscape phone

Change-Id: I3632eeb174f3e4baf2c9d69d51c1815c3c512e59
2021-04-28 11:47:08 -07:00
Steven Ng 84298b3998 Add a flag to enable custom local filter for recommended widgets
Test: Run WidgetsPredictionUpdateTaskTest
Bug: 186648032
Change-Id: I2bd5e2c81f971e0a40a4b05c8cab2a7adb171f96
2021-04-28 18:47:33 +01:00
Winson Chung 4dd75b334f Merge "Prevent multiple calls to finish on the recents controller" into sc-dev 2021-04-28 17:22:19 +00:00
Winson Chung bfb6274920 Merge "Invalidate when switching to new consumer" into sc-dev 2021-04-28 17:01:02 +00:00
Winson Chung fb45e57ac1 Prevent multiple calls to finish on the recents controller
Bug: 186246362
Test: Verify from logs that we don't finish the controller
      multiple times
Change-Id: I8d40a756216133b8a278a28b822cf75c6e2a3046
2021-04-27 21:20:24 -07:00
Tony Wickham 9137946fd6 Merge "Don't setEnableDrawingLiveTile(true) unless end target is RECENTS" into sc-dev 2021-04-28 04:15:35 +00:00
TreeHugger Robot 69cb35a85a Merge "Some overview scrim and status bar color adjustments" into sc-dev 2021-04-28 03:23:13 +00:00
Bill Lin 0bcfe825fc Merge "Revert "Revert "2/ Resolve gesture one handed conflicts swipe up..."" into sc-dev 2021-04-28 03:14:30 +00:00
TreeHugger Robot 45167d6030 Merge "Removing dependency on wallpaper colors and using theme resources" into sc-dev 2021-04-28 03:00:17 +00:00
Winson Chung 4df3b23225 Invalidate when switching to new consumer
- When switching to a new consumer, also invalidate the handler to
  clean up references held by that handler
- Also make sure that we calculate the task index used for logging
  prior to starting the task view since the handler can be invalidated
  between starting the activity and the callback happening

Bug: 185909226
Test: Presubmit
Change-Id: I20e06b5a6b31a5e242c6fc840bf4f215797eb12c
2021-04-27 19:13:04 -07:00
Tony Wickham b482188775 Some overview scrim and status bar color adjustments
- Replace UI_STATE_OVERVIEW with UI_STATE_FULLSCREEN_TASK. Overview no
  longer needs it's own status bar treatment as it's handled by
  ScrimView already. So remove instances of UI_STATE_OVERVIEW and
  replace some with UI_STATE_FULLSCREEN_TASK if a TaskView is behind
  the status bar.
- Add ScrimView to fallback recents activity.
- Remove scrim from Background state, don't fade it in until the
  gesture ends to RECENTS.

Test: watch scrim and status bar colors during the following
- Swipe up to home (no scrim, status bar matches task at first but
  then wallpaper once task isn't overlapping status bar)
- Swipe up to overview (no scrim until let go to overview, status
  bar matches task at first, then wallpaper after not overlapping,
  then scrim once it's 90% opacity)
- Quick switch from home (scrim fades in, status bar matches once
  it reaches 90% opacity)
- Quick switch from app (no scrim, status bar matches center task)
- Repeat above for 3P launcher and 2 button mode

Fixes: 185681676
Fixes: 185286870
Change-Id: I9e5c292cc734e714169b9cc8268e8dad4e868aca
2021-04-27 17:44:30 -07:00
Tony Wickham e953739fd0 Don't setEnableDrawingLiveTile(true) unless end target is RECENTS
This addresses the case where the gesture ends before an end
target is calculated. Also technically live tile is only
supported in RECENTS anyway.

Test: Open calculator, tap the nav region, ensure we don't go home
(Same for 2 button mode, but tap outside of deferred region)

Fixes: 186197537
Change-Id: I05e288ae952f8c8ea0fa72d8c6e6aa2b6dbb0b1e
2021-04-27 17:34:04 -07:00