Commit Graph

2053 Commits

Author SHA1 Message Date
Treehugger Robot b478d366b5 Merge "Moving some static debug initialization out of Launcher to MainProcessInitializer" into main 2025-05-12 18:20:14 -07:00
Treehugger Robot cb527028ad Merge "launcher3: Avoid mutating model on collisions in Launcher3." into main 2025-05-12 18:17:18 -07:00
Sunny Goyal aeeeb7e220 Moving some static debug initialization out of Launcher to MainProcessInitializer
Bug: 417227133
Test: Presubmit
Flag: EXEMPT refactor and debug code
Change-Id: If16878b6fb93333989897ce7d2f793395c8a14dd
2025-05-12 15:50:04 -07:00
Adnan Begovic 1ada2c53ea launcher3: Avoid mutating model on collisions in Launcher3.
Collisions should be handled prior to binding in the ui layer.

The following change adds extra logging to help identify cases
where this might occur.

Bug: 417021465
Flag: EXEMPT Bug fix
Test: manual
Change-Id: I5549c94fe81eb13088f8c56a5ff797d46d4bedb2
2025-05-12 15:49:02 -07:00
Sunny Goyal e40896639b Simplifying startup latency logger by moving everything to a single class
> Moving some latency logic out of Launcher and into logger
> This makes it easier to move the logger completely out of Launcher

Bug: 390572144
Test: atest StartupLatencyLoggerTest
Flag: EXEMPT refactor

Change-Id: I6f6d99e7ed6c77610534c64461ec34200780225f
2025-05-12 09:39:06 -07:00
Treehugger Robot c9eb3511d2 Merge "Separate blur/fallback styles for all apps and overview" into main 2025-05-09 13:34:51 -07:00
vinayjoglekar 3997f6ce4a Separate blur/fallback styles for all apps and overview
Fix: 415233763
Test: Manual. go to overview/all apps enable/disable battery saver mode.
Flag: com.android.launcher3.all_apps_blur
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: I4fdb672feb34d4b4da74f430eb8ef9a86ec3adf2
2025-05-09 10:17:11 +01:00
Treehugger Robot 2a7a8b5662 Merge "Use setQsbAlpha to update qsb alpha" into main 2025-05-08 13:08:31 -07:00
Sunny Goyal 57a195b790 Making workspaceData immutable
BgDataModel holds a mutable handle of the data, which ensures that all edits go through this class and there is a single place to keep the repository updated

Bug: 390572144
Test: Updated existing model tests
Flag: EXEMPT refactor
Change-Id: I991b707dd21801d1abd00510f676549947285012
2025-05-07 13:21:21 -07:00
Sunny Goyal aef6c7932e Moving predicted items to ItemIdMap instead of extraItems
> This allows the whole workspace model to be contained in itemIdMap instead of spread across multiple data containers
> Deprecating extraItems, all non-workspace data should use separate repositories
> Design: http://go/launchermodel-re-arch?#heading=h.5y8n4r164d5s

Bug: 390572144
Test: atest PredictionUpdateTaskTest
Flag: EXEMPT refactor
Change-Id: I886d0a8d5bbbf9f5c2054d4a2442bf03f9c4eab5
2025-05-05 15:52:37 -07:00
Sunny Goyal 7a332e02aa Removing Smartspace as a widget flag
Bug: 300140279
Flag: EXEMPT removing dead code
Test: Presubmit
Change-Id: If24db0b4c2c119f5cbe1153e3d77599d12ff80a6
2025-05-01 16:00:04 -07:00
vinayjoglekar 45cb055158 Apply fallback overview scrim, overviewactions and clearall in battery saver mode.
1. BlurFallbackStyle/BlurStyle will now be applied in Launcher startup.
   When "updateBlurStyle" is called, individual element style's swap
   happens as per blur style.
2. "hasOpaqueBg" background will now be checked in "applyDepthAndBlur"
   for setting the "currentBlur" value.

Bug: 409758306
Test: Manual. go to overview, enable/disable battery saver mode.
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: Ic9030c2b267867b9124705426dd51deb1b30ca55
2025-04-30 17:23:42 +01:00
Toni Barzic e175eea012 Use setQsbAlpha to update qsb alpha
When updating hotseat qsb alpha in response to assistant visiblity
changes, use Hotseat.setQsbAlpha with a designated alpha channel instead
of updating the view alpha directly. QSB alpha can be changed for
different reasons - e.g. because taskbar is shown, so the calling
View.setAlpha directly may overrride visibility set from other sources.
Using setQsbAlpha ensures that the final qsb alpha aggregates all alpha
inputs.

Bug: 413500588
Flag: EXEMPT bugfix
Test: On desktop device (where taskbar is shown on home), connect a
      display while on home, and verify the inline hotseat qsb does not
      become visible on the primary display.
Change-Id: Ida2325aa630c0c2d2c324d5e3001207cf661f2e9
2025-04-26 05:07:05 +00:00
Sunny Goyal c078d6554c Moving various launcher binding logic, outside LauncherModel
This brings the BgCallbacks closer to a repository pattern making is easier to switch eventually

Bug: 390572144
Flag: EXEMPT refactor
Test: Updated AsyncBindingTest to use real ModelCalbacks
Change-Id: I9c932b00ea8ac7330473b9c0f5d778453fe7a390
2025-04-22 14:12:17 -07:00
Sunny Goyal 007cfecf5e Merging update and modify model callbacks
Instead of the dispatcher specifying the type, the UI checks th diff. This
ensures that the UI is updated correctly in all paths

Bug: 390572144
Flag: EXEMPT refactor
Test: Manually verified folder edit path where these callbacks were getting dispatched

Change-Id: Ib73eed5da87a847753a78453a48ab4fc495c1199
2025-04-21 12:31:23 -07:00
Sunny Goyal 54e5ed0d36 Creating a dumpmanager class to allow dumping state from singleton objects
Bug: 410927105
Flag: EXEMPT refactor
Test: atest DumpManagerTest
Change-Id: Idcd1c74b1edf7a79ec8e4fa91676e617afa04907
2025-04-17 11:05:20 -07:00
Treehugger Robot 2711f8d0d9 Merge "Removing flag enable_smartspace_removal_toggle" into main 2025-04-16 18:57:40 -07:00
Sunny Goyal 613db2b609 Removing flag enable_smartspace_removal_toggle
Test: Presubmit
Flag: EXEMPT cleanup
Bug: 303471576
Change-Id: Iae8cc3afbf15c66612589fd1e19377e4339af7fc
2025-04-16 10:54:45 -07:00
Andy Wickham 16a024df71 Adds Blur and BlurFallback styles for All Apps.
Technically these styles can be used throughout Launcher, e.g.
Widget Picker and Folders, but this CL only applies it to All Apps.

At a high level, views wishing to apply transparency to show blur
should use these new attr values rather than colors directly.

When blur changes, e.g. starting or stopping battery saver, the
style is re-applied and revelant views are invalidated. For
Launcher, this is handled by DepthController, and for Taskbar it's
handled by a CrossWindowBlurListener.

Also updated the Private Space animation slightly to account for
the translucent decorators (specifically, we can't use the mask
view to cover them when blur is enabled).

Screenshots: https://drive.google.com/drive/folders/1tU472KHotgEBpT-Ec9VOBWPBf_YdVqv2?resourcekey=0-ebf7W8O6iDJ4UVMtRzTABg&usp=sharing
Private Space animations: https://drive.google.com/file/d/1h5pn8Xb17TPcbujr7uSAJNTq8kwNZoIp/view?usp=drive_link&resourcekey=0-TzpaJ16Gg8_QJctBx4oiIg
Private Space QS Tile animations: https://drive.google.com/file/d/1dCuqnqd5z2kSBEakGobMlEkMwFDBWRbJ/view?usp=drive_link&resourcekey=0-qRVFPb-a6OzaZQOf4x86Jw

Bug: 371343636
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: Ia9f581f50d1adc0830569656bdeb751deb710a9c
2025-04-15 16:42:56 -07:00
Andy Wickham 3c7f59ac4b Re-adds Workspace behind All Apps and ties to DepthController.
I had previously hidden workspace with All Apps blur because the
approaches I had tried looked poor. However, I found that this
approach is both simple and relatively performant! Essentially,
wallpaper is still pushed back and blurred by the DepthController.
When the DepthController applies blur, we also apply it to the
Workspace and Hotseat. In addition, we scale these at the same
rate as the depth when swiping to all apps. Perhaps we can have
the DepthController control this scale too, but for now we just
use the same Interpolator. The result looks pretty cohesive.

Demo: https://drive.google.com/file/d/1KyKc0c5BsAEOrT3K4buOW3U9-Gk0e7vE/view?usp=sharing&resourcekey=0-MI1gdQMul0cro9IEkQDEng
App exit demo (slightly outdated): https://drive.google.com/file/d/1r-VhzGhlI0300_6IUXthty3Tm1cgw9aI/view?usp=sharing&resourcekey=0-nxZ2BHW2UN34lr567I0RdA

Bug: 400827727
Bug: 371343636
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: I5dc66619a001ccd32f37272cf77966cbe1bf8ef6
2025-03-29 08:12:29 +00:00
Shamali P 472709d9ca Delete the filter code as it will be provided differently in refactor
With the dagger update the initialization happens in constructor which
we would avoid once we work on refactor and move it into a repository
class. The list will also be fetched from a different data source, so,
makes sense to delete it at the moment.

Bug: 406324964
Flag: EXEMPT BUGFIX
Test: Not applicable as code is removed
Change-Id: Iab8bb1e94677abf9b5b882f4d3485b002faf3e0f
2025-03-27 14:15:05 -07:00
Sunny Goyal 0479ff832c Using ItemInflator for inflating Folder instead of duplicating code
Bug: 406668365
Flag: EXEMPT refactor
Test: atest FolderTest
Change-Id: I63186ba620b5380edfc5e8cded253a85379a5d82
2025-03-27 09:48:46 -07:00
Treehugger Robot d46249c412 Merge "Update Launcher UI when model changes are made outside of Launcher UI" into main 2025-03-26 20:35:30 -07:00
Sunny Goyal ca1f87d8f5 Update Launcher UI when model changes are made outside of Launcher UI
Bug: 305877212
Flag: EXEMPT bugfix
Test: Verified manually by modifing folder in taskbar
Change-Id: I513dcfbc9e4ffcd970766ce8352815571e576461
2025-03-26 13:52:53 -07:00
Sunny Goyal 49ec691f92 Removing unnecessary preAdd method from ModelCallbacks
Bug: 390572144
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I23671339394e48ea1e8804a60be1d4dbf520e7d5
2025-03-26 11:57:17 -07:00
Sunny Goyal 66916cda10 Moving LauncherAppWidgetHolder to dagger
This would allow customizing the widget holder in LauncherPreview

Bug: 361850561
Test: Updated tests and presubmit
Flag: EXEMPT dagger
Change-Id: I32491169188992453693048986c57cb780fdf1d8
2025-03-14 14:19:29 -07:00
Sunny Goyal 1ac78b6ec6 Removing listeners from FolderInfo
Folder and FolderIcon are UI objects and can talk to each other directly.
FolderInfo changes are already propogated via model callbacks, and doesn't need a separate listener pattern.

Bug: 398791288
Flag: EXEMPT bugfix
Test: atest FolderTest

Change-Id: Iefd47b8ea12a8ecaf34211a3d908220a0e999187
2025-03-13 10:28:07 -07:00
Sunny Goyal 84e0e6a188 Making ActivityContext extend SavedStateRegistryOwner
Bug: 390572144
Test: Presubmit
Flag: EXEMPT refactor

Change-Id: I8272e95a8d2da95b3c93ec616fdf877b89db5b26
2025-03-05 09:22:47 -08:00
Treehugger Robot 57cab7794a Merge "Simplifying some view iteration methods" into main 2025-03-04 18:42:06 -08:00
Sunny Goyal 476d926972 Simplifying some view iteration methods
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ieffa3a66fbf8595d542995c348df578a3aec9083
2025-03-04 10:39:55 -08:00
Sunny Goyal 372c483eda Merge "Moving widgetFilter to dagger" into main 2025-03-04 09:03:10 -08:00
Sunny Goyal 5025b9ab04 Moving widgetFilter to dagger
Moving widget filtering to UI layer as it changes with surface

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I9d9377540ca36873659cea4ecc91fb162d82cd44
2025-03-03 10:27:14 -08:00
Treehugger Robot 55dd78123c Merge "Taskbar on home should open all apps that support drag to workspace" into main 2025-02-28 17:04:20 -08:00
Toni Barzic 26ad16592a Taskbar on home should open all apps that support drag to workspace
If taskbar is shown on home screen, have the taskbar all apps button
toggle the launcher activity version of all apps UI. This makes the
behavior consistent with how all apps system action (keyboard shortcut)
works, and addresses a gap in functionality where users are unable to
drag apps from the taskbar all apps UI to the workspace.

Bug: 392118517
Flag: com.android.window.flags.enter_desktop_by_default_on_freeform_displays
Test: On desktop device, toggle all apps from taskbar on home screen,
      drag and app from all apps to workspace.
Change-Id: Ida0f230bf38c6e1e35041556f33de1be85daf785
2025-02-28 21:31:46 +00:00
Treehugger Robot 1e8125c76b Merge "Merging some notification dots implementation" into main 2025-02-27 16:08:10 -08:00
Sunny Goyal 39063bf167 Merging some notification dots implementation
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ie02311afba85f06fbafd265a5015cd23bd356a36
2025-02-27 08:50:26 -08:00
Sunny Goyal d8e5ddb4cd Removing unnecessary isBindingItems method from ActivityContext
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: I06fd1dcc81da5e5502a9fb0751c2701b26fd4621
2025-02-27 08:49:33 -08:00
Anushree Ganjam 5a8fcc3d40 Merge "Refactor TestEmitter and it doesn't need to be MainThreadInitializedObject" into main 2025-02-14 10:35:40 -08:00
Anushree Ganjam 7128c6fcfb Refactor TestEmitter and it doesn't need to be MainThreadInitializedObject
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger

Change-Id: I30e7c3c165db698785e9e4d7e2256ab061ff71a2
2025-02-13 15:20:17 -08:00
Brandon Dayauon 3791a80e28 Merge "Fix focusability of web suggest via talkback" into main 2025-02-13 15:05:14 -08:00
ELIYAZ MOMIN (xWF) 31d6be8891 Revert "Moving TisBinder to its own class"
This reverts commit ce9ad064d6.

Reason for revert: <Potential culprit for  b/395855288  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted>

Change-Id: I12d1eb66ae03e2638a503c103d0b1fa8a863b6b5
2025-02-11 08:18:42 -08:00
Sunny Goyal ce9ad064d6 Moving TisBinder to its own class
> Using callback patter for various change events instead of routing it
  via  TIS

Bug: 386288280
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I95577d6a1c17103cb947ef1200c1c22b68fd1d9c
2025-02-11 00:21:51 -08:00
Cole Faust 04bff7b50c Merge "Replace .toList() with .collect()" into main 2025-02-10 11:59:47 -08:00
Brandon Dayauon b30bb197d1 Fix focusability of web suggest via talkback
The reasson is due to shortcut flow not having sent an accessibility
event. Shortcuts adding to home can use the same flow of how apps are
added to home by using bindInflatedItems() with an animation
endCallback(). This change should be fine since addInScreen() is called
in bindInflatedItems() too.

Bug:383461209
Test:Manually video- https://drive.google.com/file/d/1y3CslaIvRQMsODlQCYnGtG0Im4t7p4rR/view?usp=sharing
Flag: EXEMPT bug fix

Change-Id: I3b88b5ee40b4bcd43a83d362b6cbb0925120b700
2025-02-07 02:34:16 +00:00
Adnan Begovic 2eb151771c launcher3: Gate strict mode enablement behind flag.
Bug: 394651876
Flag: com.android.launcher3.enable_strict_mode
Test: Manual
Change-Id: I973dacbfac1fbcd889c503623df948c8fde379dd
2025-02-05 15:32:40 -08:00
Adnan Begovic 3d29c0a062 launcher3: Amend strict mode policy to account for activity leaks.
detectActivityLeaks() will identify any cases where subclasses
  of Activity are leaking.

Bug: 392635961
Test: EXEMPT debug code
Flag: EXEMPT debug code
Change-Id: I28057738a7bb8951a39152f4a4e6954bd2b97706
2025-02-04 14:08:37 -08:00
Sunny Goyal edc1453cf1 Removing BaseDraggingActivity
> Merging come methods to BaseActivtiy
> Separating wallpaper theme implementation to an independent class

Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: I8cdb6d1520beff3f8226b62c5b7eafd48b2c674f
2025-02-03 17:23:10 -08:00
Cole Faust 1b9fd985d4 Replace .toList() with .collect()
.toList() was only introduced to android in api level 34, which is newer than
this module's min_sdk_version. Replace it with .collect().

This was found while updating android lint.

Flag: EXEMPT refactor
Bug: 394096385
Test: Presubmits
Change-Id: Id8d1de1531b67a7daf448e45592b7ef78f685fc2
2025-02-03 14:19:12 -08:00
Sunny Goyal dfbbebc9e3 Revert^2 "Unifying various model update callbacks into one"
72f9943f64

Change-Id: I38901714947a2b7926723ea25df4a2b8216303e4
2025-01-30 13:19:32 -08:00
Pechetty Sravani (xWF) 72f9943f64 Revert "Unifying various model update callbacks into one"
Revert submission 31445615-model-callbacks

Reason for revert: <Droidmonitor crested revert due to b/393222548. Will be verified through ABTD for stanadard investigation.>

Reverted changes: /q/submissionid:31445615-model-callbacks

Change-Id: If6893a125756e5abfbb215af377576429bb1c91b
2025-01-29 22:46:55 -08:00