Commit Graph

19960 Commits

Author SHA1 Message Date
Andy Wickham dc681e83e7 Only update All Apps scrim (panel) when blur state changes.
Previously we updated many other things, such as the buttons and RV
decorators, but the latest UX guidance is to use the same colors
when blurs are enabled or disabled, other than the panel color.

Note: When Overview blur is enabled, the activity is recreated and
this change is redundant. So this is only done if that flag is off.

Demo with home and taskbar all apps (toggling blur with adb):
https://drive.google.com/file/d/1HzveExKpAERxMVdu7JXQSYeGRwaBNR4_/view?usp=sharing&resourcekey=0-l-dGWOS6aCQjj2KStvwySA

Fix: 413229346
Flag: com.android.launcher3.all_apps_blur
Test: Manual with battery saver and `adb shell wm disable-blur 1` / 0
Change-Id: I55c9b46f0999c574c29a6ac7ae557b1e30d91d15
2025-05-19 19:20:34 -07:00
Andy Wickham 982b08ede0 Merge "Fix All Apps interpolators and blur." into main 2025-05-19 15:11:00 -07:00
Treehugger Robot 12927a055c Merge "launcher3: Add logcat event for launcher ready" into main 2025-05-19 12:06:56 -07:00
Alex Chau 13d1b07304 Merge "Reland "Recreate Launcher activity when blur enabled changes"" into main 2025-05-19 07:03:27 -07:00
Brandon Dayauon 123fba5790 Merge "Handle case where PS animation method may be called while running" into main 2025-05-16 23:00:20 -07:00
Mykola Podolian 9e4b44afcd Merge changes from topic "remove_ipc" into main
* changes:
  [5/5] Removed unused IPC call.
  [4/5] Cover DragToBubbleController with tests.
  [3/5] Implement DragToBubbleController.
  [2/5] Hook up DragToBubbleController and prepare launcher to use it.
  [1/5] Added DragToBubbleController
2025-05-16 16:01:03 -07:00
Shamali Patwa b7b5e60d9f Merge "Pass device profile as constructor arg to DatabaseWidgetPreviewLoader" into main 2025-05-16 14:06:39 -07:00
Shamali Patwa 35c051001c Merge "Centralize all entry points for widget picker" into main 2025-05-16 13:41:26 -07:00
Brandon Dayauon fa87e4d470 Handle case where PS animation method may be called while running
I suspect the animation may be called while a current animation running. Should be using the mAnimatorSet pattern anyways.

bug: 414369872
Test: manually -presubmit ensured current animation doesn't change
Flag: EXEMPT bug fix
Change-Id: Ieeda50026cda656579c60d92f35f085a169eb18a
2025-05-16 11:51:46 -07:00
Shamali P 4cb6ff3838 Pass device profile as constructor arg to DatabaseWidgetPreviewLoader
This is so, we can use it with compose, and let caller pass the needed
dependencies. May also convert to dagger in
 followup

Bug: 408283627
Flag: EXEMPT BUGFIX
Test: N/A
Change-Id: I9b04011ec2592df3bd02bd74ec4889eb05928e7f
2025-05-16 11:47:18 -07:00
mpodolian 86f7a230f8 [2/5] Hook up DragToBubbleController and prepare launcher to use it.
Updated DragController logic to set touch event XY coordinates if there
is no view returned by the DropTarget. Added wait call for all drop
targets views removed to the
TaskbarActivityContext#onDragEndOrViewRemoved() method.

Bug: 411506181
Flag: com.android.wm.shell.enable_create_any_bubble
Test: build launcher
Change-Id: Ie97b08f22ae8dc34bd9f4e3738704e4fc90345bb
2025-05-16 10:34:55 -07:00
Charlie Anderson 157da33ffc Merge "Add more logging for the options launcher returns to picker" into main 2025-05-16 07:27:42 -07:00
Alex Chau 557d8e6d7f Reland "Recreate Launcher activity when blur enabled changes"
- When battery saver changes, WallpaperThemeManager always recreate activity to reapply theme base on wallpaper color hint changes
- Battery saver change can also result in light/dark theme changes, for which WallpaperThemeManager also recreate activity to apply theme changes
- As a result, it'll be much simpler to recreate activity whenever isBlurEnabled changes
- Exposed recreateToUpdateTheme API from WallpaperThemeManager to achieved this
- Greatly simplified Overview styling to read from styles

Reland fix:
- Removed mBlursEnabled in BaseDepthController, and only use `mCrossWindowBlursEnabled` to control swapping between blur style and fallback style
- Temporary variables like `mPauseBlurs` and `hasOpaqueBg` should only affect if blurs are applied, but not result in swapping of blur style, otherwise this cause unnecessary redraw or activity recreate

Reason for revert: reland
Reverted changes: /q/submissionid:33581402-revert-33554447-b/414789280-CTVRJLPLRT
Bug: 414789280
Test: manually toggling battery saver and light/dark theme and WallpaperThemeManagerTest
Test: PressBackFromLaunchedApp.testPressBackFromLaunchedApp
Flag: EXEMPT bugfix

Change-Id: Iac2b0c00811e0e79684da0cf77df76a120c1272a
2025-05-16 12:33:44 +01:00
Brandon Dayauon c182354074 Merge "Fix workUtilityView showing up before keyboard is up" into main 2025-05-15 20:13:31 -07:00
Federico 'Morg' Pareschi 49ee74932f launcher3: Add logcat event for launcher ready
This event helps us monitor via logcat when a login (after a screen unlock)
event ends.

Bug: 417839016
Test: manually unlock screen and verify the log shows up when ready
Change-Id: I051bf3d5e77b363bcfe37f995146a82e6db69a94
Flag: EXEMPT log only update
2025-05-16 02:45:22 +00:00
Treehugger Robot 6bc72676ed Merge "Recreate DP for CD when displayInfo changes" into main 2025-05-15 18:07:54 -07:00
Andy Wickham d4100bec42 Fix All Apps interpolators and blur.
Fixes an issue where leaving All Apps did not reverse interpolators,
causing blur to disappear too quickly.

In addition, the logic in BaseDepthController is updated to ensure
100% blur is applied upon reaching max depth. Previously we were
multiplying the depth by 3, but the intention was to reach 1 when
depth reached 0.3. So the blur was only at 90% the intended value in
All Apps (which has a depth of 0.3).

Finally, related to the 100% blur, we correctly end early wakeup
when that is reached, which means we also start it again when the
blur starts changing back towards 0 again. This spins up the GPU,
CPU, and SurfaceFlinger and should help avoid missed frames.

In order to avoid negative performance hits, reducing the max blur
radius from 34dp to 30dp, so that it matches what we were hitting
previously. (The full 34dp unfortunately does cause some regressions).

Bug: 415247657
Test: Open all apps, drag back down, view animation. Also try other
Launcher state transitions.
Flag: com.android.launcher3.all_apps_blur
Change-Id: Ia5daa07525ac96c0597a25bb4320348f27a4ee56
2025-05-15 17:53:17 -07:00
Brandon Dayauon d2bf99e068 Fix workUtilityView showing up before keyboard is up
The reason is that there is extra translation applied to account for the all apps moving. Rather we should only offset any translation when -windowInsets.bottom < 0.

bug: 416323265
Test: videos in bug
Flag: EXEMPT bug fix
Change-Id: I3565d3a2ee09f545c0d01aa0ce3da8f80a017308
2025-05-15 16:14:27 -07:00
Ajinkya Chalke 1fd6090eb7 Recreate DP for CD when displayInfo changes
- Only IDP is updated when displayInfo changes but DPs of CD don't. As
  a result taskbars on CD end up reusing the old config DPs. For
  example, when user changes display size, displayInfo updates but
  taskbars on CD continue using old DP resources.
- So, update DP for CD when DisplayInfo changes.
- Also added using supplied context with dpToPx for calculating radius
  for taskbar roundedness at the ends.

Fix: 414933860
Test: m
Flag: com.android.window.flags.enable_taskbar_connected_displays

Change-Id: I7d8ed3c5ba69b755a58d3462a5da9ed7fd404198
2025-05-15 22:42:09 +00:00
Alex Chau 38efd382b7 Merge "Revert "Recreate Launcher activity when blur enabled changes"" into main 2025-05-15 13:07:22 -07:00
Sunny Goyal 1d4a457680 Merge "Adding repository for AppsList data" into main 2025-05-15 12:23:44 -07:00
Charlie Anderson cd4382aa43 Add more logging for the options launcher returns to picker
Bug: 413707700
Test: N/A just logs
Flag: EXEMPT just logs

Change-Id: I2377a6bcf7fa8d219fec784570ff92eface1118e
2025-05-15 12:21:40 -07:00
Catherine Liang 00dbb434dd Fix incorrect widget layout when previewing grid
When previewing grid, actual widgets are updated. Revert grid changes
when preview binder dies to restore original widget layout in Launcher.

Flag: com.android.systemui.shared.new_customization_picker_ui
Bug: 408934352
Test: manually verified
Change-Id: I18f63fd1760b1188306defd2a8315fe5765dab01
2025-05-15 18:43:27 +00:00
Priyanka Advani (xWF) 1f891a6b67 Revert "Recreate Launcher activity when blur enabled changes"
Revert submission 33554447-b/414789280

Reason for revert: Droidmonitor created revert due to b/417614196. Will be verifying through ABTD before submission.

Fix: 417614196

Reverted changes: /q/submissionid:33554447-b/414789280

Change-Id: Idf349cd39a3f86910f597f0f9ab4d46fb03e945c
2025-05-15 11:12:05 -07:00
Alex Chau 6564f33184 Merge "Remove debug logs on a closed bug" into main 2025-05-15 06:37:49 -07:00
Alex Chau b7dd7bf1e0 Merge "Recreate Launcher activity when blur enabled changes" into main 2025-05-15 06:07:58 -07:00
Sunny Goyal 869b20cb27 Adding repository for AppsList data
Flag: com.android.launcher3.model_repository
Test: atest AppsListRepositoryTest
Bug: 390572144
Change-Id: I6e5993c91f77ed8f0b6f2c12c9d743c87a497134
2025-05-14 21:19:18 -07:00
Treehugger Robot 6bcd5d93de Merge "launcher3: Add error handling for drag preview bitmap creation." into main 2025-05-14 19:02:50 -07:00
Brandon Dayauon 11388a53f4 Merge "Make hotseatQsbShadowHeight public" into main 2025-05-14 17:48:57 -07:00
Adnan Begovic 0e41e168b2 launcher3: Add error handling for drag preview bitmap creation.
In some cases, the bitmap that is needed for FastBitmapDrawable
can fail to render. Return a placeholder in that case.

Bug: 416779946
Flag: EXEMPT Bug fix
Test: manual
Change-Id: I188a820157f4ac43b8a13a99f3ac2c2348afbc13
2025-05-14 16:28:34 -07:00
Treehugger Robot 753ee52a18 Merge "Support desktop device category in grid options" into main 2025-05-14 13:30:52 -07:00
Brandon Dayauon 653b4b9b31 Make hotseatQsbShadowHeight public
This variable is used during layout of the psb in hotSeat.java. It is specifically
applied to calculate the qsbOffsetY()

bug: 413719316
Test: manually presubmit
Flag: com.google.android.apps.nexuslauncher.psb_aim_reskin
Change-Id: I9b4bd244a39de61e7ef23dbf477e1808f30f5401
2025-05-14 11:33:10 -07:00
Alex Chau a6fa3db580 Recreate Launcher activity when blur enabled changes
- When battery saver changes, WallpaperThemeManager always recreate activity to reapply theme base on wallpaper color hint changes
- Battery saver change can also result in light/dark theme changes, for which WallpaperThemeManager also recreate activity to apply theme changes
- As a result, it'll be much simpler to recreate activity whenever isBlurEnabled changes
- Exposed recreateToUpdateTheme API from WallpaperThemeManager to achieved this
- Greatly simplified Overview styling to read from styles

Bug: 414789280
Test: manually toggling battery saver and light/dark theme and WallpaperThemeManagerTest
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: I90ad724867283fe3c62a9073a6e072491533f774
2025-05-14 17:45:04 +01:00
Treehugger Robot 8cc0274fb0 Merge "Fixing leak in model repository" into main 2025-05-13 17:55:55 -07:00
Shamali P 8dc2f98338 Centralize all entry points for widget picker
So we have a central place to replace it with opening
WidgetPickerActivity behind a flag.

Bug: 408283627
Flag: EXEMPT minor refactor
Test: Existing tests
Change-Id: I1c26c3faec8549fd5c3057b4c26ab2ab109f6f0c
2025-05-13 17:15:25 -07:00
Sunny Goyal 6e8b2bc95b Fixing leak in model repository
Bug: 417356788
Flag: com.android.launcher3.model_repository
Test: atest TaplDragTest
Change-Id: I4b11a521d66790637dfc05682fb1550f6cc9adcd
2025-05-13 15:15:11 -07:00
Daniel Akinola 6efff5eeac Update StatusBarTouchController to work on external display
Dragging on launcher background on external display didn't do anything
because there was no StatusBarTouchController. Now by adding it to
SecondaryDragLayer, we can open the shade on external display via
launcher drag

Bug: 362719719
Bug: 416511740
Test: manual testing
Flag: EXEMPT refactor only
Change-Id: I1a587fe85bf2e7c6f212b3358646d5d282019eef
2025-05-13 13:26:41 -07:00
Sunny Goyal 43841027b0 Merge "Removing some unnecessary launcher typecast" into main 2025-05-13 11:42:34 -07:00
Sunny Goyal b2315b69c2 Removing some unnecessary launcher typecast
Bug: 417227133
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ie794e4855441f86441d869d315699bf46fce0db5
2025-05-13 08:26:25 -07:00
Naresh Kumar Podishetty (xWF) b02666e592 Merge "Revert "Update All Apps sheet interpolators."" into main 2025-05-12 23:46:34 -07:00
Ana Salazar 501df846c4 Support desktop device category in grid options
Adds desktop enum value to grid option deviceCategory attribute type.
The device type is used for devices that have
`R.bool.desktop_form_factor` config value set.

Bug: 30153091
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Test: Manual
Change-Id: Ie4747b5bae3e124e914af51445778c9b6285ff66
2025-05-13 04:17:34 +00:00
Sunny Goyal fabe5b213d Merge "Adding support for diff in WorkspaceData, so that UI can apply incremental updates" into main 2025-05-12 18:27:05 -07:00
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
Priyanka Advani (xWF) 8e59df0bda Revert "Update All Apps sheet interpolators."
This reverts commit 28f422544e.

Reason for revert: Droidmonitor created revert due to Jank Regression b/415709038.

Bug: 415247657
Fix: 415709038
Change-Id: Iaf692dd2e054c548a6b40831ce6d51a546642ac4
2025-05-12 17:09:05 -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
Treehugger Robot de9b62ed3e Merge "Fix All Apps fallback colors." into main 2025-05-12 14:02:18 -07:00
Treehugger Robot d89bd8d886 Merge "Split BlurStyle and BlurFallbackStyle for All Apps and Overview." into main 2025-05-12 14:02:09 -07:00
Treehugger Robot 8381d839f7 Merge "Use RecentsWindowFlags in DisplayController" into main 2025-05-12 13:58:24 -07:00