Commit Graph

11552 Commits

Author SHA1 Message Date
Bryce Lee 3a0e420e6f Merge "Do not allow system gestures when dreaming." into tm-qpr-dev 2023-01-26 21:08:59 +00:00
Bryce Lee 05c9d551d8 Do not allow system gestures when dreaming.
Currently, TaskBar expansion is allowed when an activity context is
available. Since Dreams are implemented as an activity, this leads
to being able to expand the TaskBar over a dream. This changelist
updates the logic to not allow system gestures when dreaming.

Test: manual
Bug: 265755700
Change-Id: If58608c1e491da7906a2615681da0514fa49cfc8
Merged-In: If58608c1e491da7906a2615681da0514fa49cfc8
2023-01-25 17:15:18 +00:00
Fengjiang Li 6bb8d79549 Predictive back: widget to all apps
This CL adds a layer of OnBackPressedHanlderRouter to Launcher:
1. 4 OnBackPressedHandler(s) are added in such order: auto cancel action mode handler, drag handler, view handler and state handler
2. first handler who can handle back will handle the entire back gesture
3. Let WidgetsFullSheet to handle widget to all apps transition

Bug: b/260956481
Test: manual
Change-Id: Idbce3dcec746226dd68aaabaddc8fe01334e9673
2023-01-24 15:51:46 -08:00
Schneider Victor-tulias 74484f4a99 Merge "Revert^2 "Cancel gestures on launcher destroy"" into tm-qpr-dev 2023-01-24 17:55:54 +00:00
Alex Chau 1103195e42 Merge "Destroy taskbar if it's not present in DeviceProfile" into tm-qpr-dev 2023-01-24 17:35:37 +00:00
Ats Jenk 5858226f02 Merge "Fix flicker when opening transient taskbar" into tm-qpr-dev 2023-01-24 16:59:00 +00:00
TreeHugger Robot b92a83a430 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2023-01-24 08:46:00 +00:00
Ats Jenk 1668aeca49 Fix flicker when opening transient taskbar
When transient taskbar is opened, launcher state updates to background
and then quickswitch. Quickswitch launches the last task which is the
DesktopTaskView when desktop tasks are visible.
DesktopTaskView launchTasks is called which ensures that desktop tasks
are visible on top again and launcher state updates to normal.
If launcher state moves to normal with animation, the task views for any
visible desktop task flicker on screen. To remove this flicker, stop
animating state transitions when moving from DesktopTaskView back to
home screen.
This can be readdressed when implement a proper recents animation.

Bug: 263264985
Test: enable transient taskbar, put some tasks on desktop,
  swipe up to show transient taskbar, observe no flicker
Test: have some tasks on desktop, swipe up to overview, click on desktop
  tile, observe they are brought to front
Change-Id: I6ee5c55d9b805d6ef6d58ea137e697ccd40cda29
2023-01-23 16:59:54 -08:00
Sunny Goyal e1daf91dfd Merge "Moving all intent receiver register calls to a single place" into tm-qpr-dev 2023-01-24 00:10:08 +00:00
Winson Chung 5f9b26b626 Prevent falling into OtherActivityInputConsumer when over lockscreen am: f6d75c98a9 am: 3c265823a8 am: cabcc513fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21050546

Change-Id: I13f7dbf20f3978afca18d7e61c30799e5c3936f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-23 22:15:42 +00:00
Winson Chung cabcc513fd Prevent falling into OtherActivityInputConsumer when over lockscreen am: f6d75c98a9 am: 3c265823a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21050546

Change-Id: I4d0bd01bb60280af62daf026a4a6139cbb8ec972
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-23 21:35:20 +00:00
Winson Chung 3c265823a8 Prevent falling into OtherActivityInputConsumer when over lockscreen am: f6d75c98a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21050546

Change-Id: I3cdb8010e623e1fb2309b2657730d4fb7032a98a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-23 20:52:07 +00:00
Ats Jenk de85ee9d23 Merge "Support desktop tasks in recents animation" into tm-qpr-dev 2023-01-23 18:14:53 +00:00
Bill Yi 3c65bf37cc Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Idbc01117ecff8d5dd1f950039a6371db6465f0a0
2023-01-23 08:42:37 -08:00
Nicolò Mazzucato 8995043d16 Merge "Fix CUJ_RECENTS_SCROLLING" into tm-qpr-dev 2023-01-23 16:21:44 +00:00
Sunny Goyal a992ac9e8d Moving all intent receiver register calls to a single place
This is eventually allow us to move all register to background thread
Also creating a single ScreenOn tracked which is used at multiple places

Bug: 264465756
Test: Verified on device
Change-Id: Ibadf9ca43218e578954420d97a733adfa0a94fc7
Merged-In: Ib410e5bf02773cefde5bf0a0a1f2f1c108718d24
2023-01-22 05:24:48 +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
Alex Chau 2d9692f63d Destroy taskbar if it's not present in DeviceProfile
Bug: 254119092
Test: manual
Change-Id: I9eb95cc90c92bf93d9220b05406d4589b2cb196f
2023-01-20 20:57:58 +00: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
Winson Chung f6d75c98a9 Prevent falling into OtherActivityInputConsumer when over lockscreen
- When opening the emergency dialer from the bouncer, there's a brief
  period where notificationPanelExpanded=false and occluded=false which
  currently means canStartSystemGesture=true and
  isKeyguardShowingOccluded=false, which falls through to other activity
  input consumer.  In this state, we can't properly finish the gesture
  stream because Launcher never shows (it's behind the lockscreen)
  and the recents animation never finishes.

Bug: 242704576
Test: atest NexusLauncherTests
Change-Id: I7795abe0aebefca2d42998a672abfd12f951d501
2023-01-19 22:01:04 +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
Bill Yi f11b864a12 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2023-01-17 19:55:05 +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
Bill Yi c084cd761e Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I755d591028eba2dfa55fea32f1461472ec7da3d0
2023-01-15 20:52:29 -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