Commit Graph

6770 Commits

Author SHA1 Message Date
Ats Jenk
de85ee9d23 Merge "Support desktop tasks in recents animation" into tm-qpr-dev 2023-01-23 18:14:53 +00:00
Nicolò Mazzucato
8995043d16 Merge "Fix CUJ_RECENTS_SCROLLING" into tm-qpr-dev 2023-01-23 16:21:44 +00:00
Brian Isganitis
b28a810d55 Merge "Add loopable EDU lottie files and convert to light theme manually." into tm-qpr-dev 2023-01-21 23:05:43 +00:00
TreeHugger Robot
654f714718 Merge "Implement initial transient Taskbar EDU tooltips." into tm-qpr-dev 2023-01-21 07:28:30 +00:00
Brian Isganitis
4bcc9bc816 Add loopable EDU lottie files and convert to light theme manually.
These new assets are better at looping than the previous ones.

Followed go/sysui-illustration-eng to map from dark to light colors
programmatically. Handling the mapping in code is preferred over having
separate lottie assets for light and dark theme.

Test: Manual
Bug: 263157739
Change-Id: Ia3cd2a1e7d349188d182d796ba927f1c513d4716
2023-01-20 15:16:20 -08:00
Brian Isganitis
b21ad2da8c 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
2023-01-20 15:16:12 -08:00
Ats Jenk
9db95e89b2 Support desktop tasks in recents animation
Desktop tasks are using freeform windowing mode. Update recents
animation to support freeform tasks when desktop mode feature flag is
enabled.

Changes:
- set initial size for freeform tasks to be the size of the thumbnail
  instead of size of the screen
- support multiple individual remote animation targets when starting the
  recents animation

TODO:
- there are flickers when starting and ending the recents animation

Bug: 263264985
Test: swipe up when more than 1 desktop task is visible
Change-Id: I27ee02774281b3a433d779c0bb8825cdb6ea5457
2023-01-20 14:09:32 -08:00
Nicolo' Mazzucato
beecffed7c Fix CUJ_RECENTS_SCROLLING
The atom was output also when swiping from the bottom to open overview. Now, it's only reported on horizontal swipes between tasks.

Fixes: 265790869
Test: checked perfetto traces
Change-Id: Ic70f440a30ea2c61e44f84098d84b0485a85905e
2023-01-20 15:09:43 +00:00
Pat Manning
0f76a4d810 Merge "Reset splash icon when task icon is null to avoid caching incorrect drawable." into tm-qpr-dev 2023-01-20 14:17:09 +00:00
Nick Chameyev
effbe5aa48 Merge "Calculate StatusBar height locally in Launcher" into tm-qpr-dev 2023-01-20 11:42:19 +00:00
Vinit Nayak
8d98dd2905 Merge "Add unit tests for TaskbarKeyguardController" into tm-qpr-dev 2023-01-20 00:12:53 +00:00
Nicolò Mazzucato
1207e773e2 Merge changes I2c1e440b,I805d56d4 into tm-qpr-dev
* changes:
  Add OPTIMIZE_MEASURE flag to QuickSteplauncher window
  Log device profile changes in perfetto traces
2023-01-19 19:42:26 +00:00
Miranda Kephart
188ff40249 Merge "Update ImageActionUtils to construct a ScreenshotRequest" into tm-qpr-dev 2023-01-19 17:23:57 +00:00
Nicolo' Mazzucato
62fe4445c7 Add OPTIMIZE_MEASURE flag to QuickSteplauncher window
This flag allows to avoid an initial measure pass by getting the window size by the LayoutParams.

Test: Recorded a trace before and after this change and compared the doFrames
Bug: 265150323
Change-Id: I2c1e440b73437df9f328d64c98d160bed11282f3
2023-01-19 16:48:11 +00:00
Jeremy Sim
bc1fa1e6a4 Merge "Fix bug with Taskbar launches in Overview" into tm-qpr-dev 2023-01-19 02:23:32 +00:00
TreeHugger Robot
7c323889aa Merge "Close Taskbar AllApps when going from overview to home" into tm-qpr-dev 2023-01-18 20:54:43 +00:00
Vinit Nayak
b1c47227b1 Add unit tests for TaskbarKeyguardController
* Remove setting back button tint for SUW as that
is now done in ag/20953768

Bug: 230027385
Change-Id: I2c157ed67487cab9ba721fa659973351780509bb
2023-01-18 10:42:45 -08:00
TreeHugger Robot
3080803691 Merge "Using AnimatedFloat for maintaing TaskbarInAppDisplayProgress instead of a float array" into tm-qpr-dev 2023-01-18 17:35:24 +00:00
Sunny Goyal
ff5697302b Merge "Updating TaskbarStashController API" into tm-qpr-dev 2023-01-18 16:53:55 +00:00
Nick Chameyev
a8037620bd Calculate StatusBar height locally in Launcher
When reading the status bar inset on devices with
multiple displays after switching the displays
the inset is not updated immediately (SystemUI
should update the height of the window first by
reacting to the display switch in it's own process).

Due to this race condition Launcher is very likely
to calculate DeviceProfile with incorrect inset
of the previous display first and update it to
the correct one only after SystemUI finished the
window update.

To avoid this adding calculation of the StatusBar
height to Launcher locally using the same utility
method that is used by SystemUI.

Bug: 264656380
Test: manual test that the statusbar height is calculated
 correctly in Launcher on a device with two displays, both on
 the inner and outer display and different rotations
Change-Id: Ia16ecadd8fcac29082d27ca693ab7740ce6161c4
2023-01-18 16:04:41 +00:00
Pat Manning
effe64381b Reset splash icon when task icon is null to avoid caching incorrect drawable.
Fix: 263365662
Test: manual
Change-Id: I79390381f4cab79b9729bd819630eeb9c8b47d1d
2023-01-18 13:20:54 +00:00
Tony Wickham
f8176700d3 Merge "Fix launcher crash by set divider hidden" into tm-qpr-dev 2023-01-17 21:31:36 +00:00
Stefan Andonian
1eb59d6c6a Merge "Expanded LauncherPrefs APIs to Replace Direct Shared Preference Usage." into tm-qpr-dev 2023-01-17 18:23:10 +00:00
Nicolo' Mazzucato
cb7bd50247 Log device profile changes in perfetto traces
This is needed to easily spot unwanted DeviceProfile changes in perfetto traces, as each one causes many new inflation and slows down the ui thread considerably.

Test: recorded trace with this log
Bug: 258214245
Change-Id: I805d56d4dfe1c08d7f28215c0462d01fcaece84e
2023-01-17 14:54:11 +00:00
Jeremy Sim
2842bc72fd Fix bug with Taskbar launches in Overview
This patch fixes a bug where Taskbar launches (tapping an icon on the Taskbar) were not executing correctly in Overview.

Now that Taskbar is always present in Overview, we need to handle cases where the user taps to launch an app, but the app is already visible to the user in Overview. This was breaking in a noticeable way with split apps, where the Taskbar simply wouldn't respond when the tapped app was already visible as a live tile.

Fixed by polling RecentsModel for already-running tasks, checking to see if the associated TaskView is visible to the user or not, and calling launchTasks() on the TaskView if so. If the tile is not visible to the user, the app will launch normally.

Fixes: 261952204
Test: Work in progress
Change-Id: If761546913bde7451a22456a272ba6c31942c5f8
2023-01-17 13:54:47 +08:00
Alex Chau
835ccc58e0 Close Taskbar AllApps when going from overview to home
- Also trigger closeAllOpenViews when changing state to NORMAL

Fix: 265689318
Test: manual
Change-Id: I109c0f3a3c741844c8747bd76a6c38bf301ec737
2023-01-16 18:20:27 +00:00
Tony Huang
3f5d510b38 Fix launcher crash by set divider hidden
We will hide divider when isLikelyToStartNewTask become true, but
this call sometime earlier than onRecentsAnimationStart then cause
crash because mRecentsAnimationTargets is still null.

Fix this by checking mRecentsAnimationTargets before set divider
visibility. And also add new condition to hide divider to ensure
it hidden if such case happened.

Fix: 265238266
Test: manaul
Test: pass existing tests
Change-Id: I80b1294e69a52e7ac5255cd8e55e7c5e6a3dcbcb
2023-01-16 14:29:19 +08:00
Sunny Goyal
a34521e434 Updating TaskbarStashController API
> Making the state animator nonNull to avoid null checks at caller
> Updating the methods names to explicitely indication animation
  being started or not

Bug: 265352919
Test: Verified on device
Change-Id: I1f5b47921f831ed0b202aced10825c8e1d39a4dc
2023-01-14 08:07:44 -08:00
Tony Wickham
a329718dcf Merge "Remove extra overview threshold if the transient taskbar is already open" into tm-qpr-dev 2023-01-14 01:09:52 +00:00
Sebastián Franco
519714449f Merge "Change the access of cellX/Y of CellLayoutLayoutParams to private" into tm-qpr-dev 2023-01-14 00:59:47 +00:00
Stefan Andonian
d1b33b311c Expanded LauncherPrefs APIs to Replace Direct Shared Preference Usage.
LauncherPrefs will contain Launcher's shared preference functionality.
It controls optimizations and classifications such as restorable vs
non-restorable data, bootaware vs non-bootaware data, and configurations
such as default values  so the calling code doesn't need to and our code
base can have a single source of truth for items that are used in
multiple places.

The old APIs remain in place, but are deprecated and will be removed
after all Shared Preference usage has been gated by LauncherPrefs in
future CLs.

Bug: 261635315
Test: Manually tested themed icon, Workspace configuration, and app
install functionality.

Change-Id: I29fd516468bc93fda393062e95be26b6d55c816e
2023-01-14 00:54:15 +00:00
Randy Pfohl
dcd79bd6cd Merge "Cleaning up UI jank while quick switching" into tm-qpr-dev 2023-01-13 23:02:41 +00:00
Sebastian Franco
877088e6c3 Change the access of cellX/Y of CellLayoutLayoutParams to private
Bug: 188081026
Test: no op change, should compile
Test: ReorderWidgets
Change-Id: I20367974e5a4cead406e18eb66dafd4d59651b2a
Merged-In: I20367974e5a4cead406e18eb66dafd4d59651b2a
2023-01-13 18:25:10 +00:00
Johannes Gallmann
4aa135f3c7 Merge "Prevent workspace enter animation for predictive back" into tm-qpr-dev 2023-01-13 17:28:42 +00:00
TreeHugger Robot
60c7dfec29 Merge "Provide single threaded executor to UnfoldUnfoldTransitionFactory" into tm-qpr-dev 2023-01-13 15:49:07 +00:00
TreeHugger Robot
5f3784d147 Merge "Revert "Add debug logs for hotseat disapperaed bug"" into tm-qpr-dev 2023-01-13 13:01:03 +00:00
Vinit Nayak
f83d8a00a8 Merge "Respect nav button tinting in SUW" into tm-qpr-dev 2023-01-13 03:28:03 +00:00
Sunny Goyal
00e3c1ace4 Using AnimatedFloat for maintaing TaskbarInAppDisplayProgress instead of a float array
Bug: 265352919
Test: Verified on device
Change-Id: I603a817c18720d5f18fe0c2be7bdfd8cf2d6defc
2023-01-12 16:02:42 -08:00
Jeremy Sim
9dfeb03a71 Merge "Fix transition animations for launch-from-staged operation" into tm-qpr-dev 2023-01-12 23:08:37 +00:00
Ats Jenk
1c28f290c1 Merge "Skip depth and scrim if freeform tasks are visible" into tm-qpr-dev 2023-01-12 22:39:57 +00:00
Alex Chau
f4269f01d7 Revert "Add debug logs for hotseat disapperaed bug"
This reverts commit 04658bcd42.

Reason for revert: root cause found
Bug: 260135164

Change-Id: I809662780d042923de015ff4cb810b3da5169f83
2023-01-12 22:21:07 +00:00
Ats Jenk
984a37d1b1 Merge "Hide DesktopTaskView background while animating" into tm-qpr-dev 2023-01-12 22:11:12 +00:00
randypfohl
9c5fa66d2f Cleaning up UI jank while quick switching
Moving a few calls into the UI helper executor thread, as per the associated bug. duplicated the lines so the synchronous nature of clearing previous state wouldn't affect potential timings.

Test: local testing, rotating screen. quick switching apps.

Bug: 257470365
Change-Id: I59abad9ba51c0b19d467646752aa34ae7ef3ec1d
2023-01-12 19:06:04 +00:00
Ats Jenk
ca009e4e93 Skip depth and scrim if freeform tasks are visible
If freeform tasks are shown, skip applying depth effect and scrim
changes. These cause the background to flicker while showing freeform
tasks and for example showing the transient taskbar.

Bug: 263264985
Test: swipe up to show transient taskbar, observe launcher background
does not blur or flicker to black

Change-Id: I5b10d0f0c7065e903cb761488367c02d7e31d8b2
2023-01-12 10:15:30 -08:00
TreeHugger Robot
944348a522 Merge "Support predictive back from all apps to home" into tm-qpr-dev 2023-01-12 17:01:02 +00:00
Tony Wickham
7d192c0e71 Remove extra overview threshold if the transient taskbar is already open
Test: Swipe to overview when taskbar is already opened vs not
Fixes: 264555943
Change-Id: Ib4c31b085ca51e50fd7442ff9a27a5f47822c242
2023-01-12 16:48:35 +00:00
Luca Zuccarini
51c89ca493 Merge "Revert^2 "Update timings for the Home <> All Apps transition."" into tm-qpr-dev 2023-01-12 14:06:07 +00:00
Nicolo' Mazzucato
696238e086 Provide single threaded executor to UnfoldUnfoldTransitionFactory
This fixes a concurrency issue where HingeSensorAngleProvider was being stopped and started at the same time in a thread-pool after a fast fold/unfold, despite not providing concurrency guarantees.

In sysui, the background executor provided was already single threaded, so no issue arisen. From Launcher, THREAD_POOL_EXECUTOR was provided.

In a follow up cl, I'll add a @SingleThreadBackground annotation to the executor used in the unfold lib.

Bug: 261320823
Test: manually stress tested fold/unfold.
Change-Id: Iccf1f1f7246d8592d4d80a032479aa75f0050655
2023-01-12 09:19:48 +00:00
Johannes Gallmann
031fbcc564 Prevent workspace enter animation for predictive back
Bug: 263913711
Test: Manual, i.e. testing predictive back for four scenarios: Back to all apps, Back to home. Both with the closed app icon visible or not.
Change-Id: Id87686098e6ad413819dc75545071da00291db65
2023-01-12 10:06:18 +01:00
Vinit Nayak
1d7e050bc6 Respect nav button tinting in SUW
* Check was originally added with rationale in
b/204384193#comment26, however presently we
do provide insets to SUW as of b/253538830
so looks like now we are getting the correct
info from SysUI
* There is a possibly related issue where buttons
are not tinted correctly on the final page of
SUW (b/265238238)

Test: Went through setup manually via adb
and observed that on light theme with dark
dialog scrim the button changes color
adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity
Bug: 256521774

Change-Id: I080033e21d22fbc366b7248b2d647fec610a5fb9
2023-01-11 21:29:37 -08:00