Commit Graph
20776 Commits
Author SHA1 Message Date
Pun Butrach eba9492be1 Revert "feat(home): live glass blur behind icons, folders and widgets (#7393)" (#7419)
This reverts commit d9afe890a3.
2026-10-21 22:19:44 +07:00
x-JOCandClaude Opus 5.5 6c2c2c22ef fix(workspace): rework infinite scrolling without wrap state (#7413)
Infinite scrolling kept a wrap state (target page, saved scroll bounds,
a cached feed flag) that every path out of a swipe had to tear down.
Paths that missed it caused the bugs: a short or backward swipe on the
last page wrapped anyway, the first page flashed when a layout pass
reset the bounds mid-wrap, touching during a wrap jumped to the target,
two-panel layouts got stuck between pages, and the page indicator lost
its active dot.

The wrap now follows from the scroll position alone: on an end that
wraps, the scroll may run one screen further, and the screen from the
other end is translated into that gap. Workspace decides which ends
wrap; other paged views behave as in AOSP.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:41:57 +08:00
R05P0 d9afe890a3 feat(home): live glass blur behind icons, folders and widgets (#7393)
* feat(home): live glass blur behind icons, folders and widgets

Add an optional "Glass blur" setting that blurs the wallpaper behind home
screen icons, folder icons, open folders and widgets, like CSS
backdrop-filter. SurfaceFlinger renders the blur through blur regions
(a copy of the framework BackgroundBlurDrawable), so it stays live and
follows the items during page scrolls and animations.

SurfaceFlinger ignores all the blur of an app layer once there are more
than 10 blur requests on screen (kMaxBlurRequests, b/399120953), unless
the layer was created by a privileged process. With root, the regions go
to an effect layer created by the root helper and placed below the
launcher window content. Without root, they go to the window layer and
are subject to that limit.

Also fix RootHelperManager, unused until now: it reported root as not
available until a root shell had been created, and bound the root
service off the main thread.

* fix(home): redraw when a glass blur region is removed

Without a frame the pre-draw listener never sends the regions left, so a
removed blur, the last one in particular, could stay on screen until the
next redraw.
2026-10-21 19:34:15 +08:00
x-JOCandClaude 59b60098b2 fix(grid): apply the icon size setting on responsive grids (#7407)
Home screen > Icon size (homeIconSizeFactor) had no effect on responsive
grids such as "practical": DeviceProfileOverrides scales the IDP's
iconSize, but responsive grids take their icon size from their cell
specs (mResponsiveWorkspaceCellSpec.getIconSize()) and never read
inv.iconSize.

getResponsiveIconSizePx() now applies the factor to the cell specs' icon
size, for the workspace, the hotseat and folder content, the same three
places the IDP-sized grids use inv.iconSize. The responsive code still
shrinks an icon that doesn't fit its cell (getIconSmallerThan). The icon
bitmap size already followed the factor, as the IDP computes it from the
scaled iconSize.

Visible change: on responsive grids the setting now works; at 100% (the
default) nothing changes.


(cherry picked from commit 6345b71df7dbd77be6c4da03ddcc76ebcadd2e90)

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-21 17:10:33 +08:00
x-JOCandClaude 5c1979227e fix(fold): keep the device type stable across folds (#7402)
* fix(display): keep the device type stable across folds

LawnchairWindowManagerProxy estimated the supported bounds only from
DisplayManager#getDisplays, which reports the panel in use. On a foldable
the DisplayController cache then held a single state, so every fold and
unfold invalidated it ("Unexpected normalizedDisplayInfo found"), the
device type flipped between PHONE (folded) and MULTI_DISPLAY (unfolded,
through the hinge check), and CHANGE_SUPPORTED_BOUNDS reloaded the grid
and the model. The smaller dock of the phone profile also made the
loader delete the dock items past its size.

On devices with FEATURE_SENSOR_HINGE_ANGLE, the estimate now also holds
the other states of the internal display:
- WindowManager#getPossibleMaximumWindowMetrics, like
  SystemWindowManagerProxy, when the system answers (it only does for the
  recents provider) and the current state is one of its states.
- Otherwise each state of the default display seen on the device is
  remembered. A state with the same aspect ratio replaces an older one,
  so a resolution change leaves no stale bounds.

The extra states are built the way DisplayController.Info builds the key
it looks up (getDisplayInfo(context).normalize(), no-cutout default), so
the lookup finds them and folding no longer changes the supported
bounds. Once both panels are known they hold a phone and a tablet size,
and the device type is MULTI_DISPLAY in both states, across restarts too.
A hinge device never seen unfolded still reports PHONE: flip phones also
have the hinge sensor, so it can't be assumed.

The states are kept in their own device-protected file,
lc_display_states, not in boot_aware_prefs: DisplayController can run
before unlock, the values must not be backed up or restored on another
device, and the write happens while DisplayController is being
constructed. AOSP's taskbar-pinning listener on boot_aware_prefs calls
getInfo() for every change, which is still null at that point, so a write
to that file crashed the launcher when it started on the other screen
than last time.

The hinge check now lives in one place, LawnchairWindowManagerProxy
.isFoldable(), which DisplayController.Info uses as well.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 14e6051ac83cba92cb371eec1c408966cb41ba9d)

* chore(display): log the device type once per info

getDeviceType() is called many times for each display change (once per
DeviceProfile and more), and logged its result every time. Log it once
per DisplayController.Info, that is once per display change, with the
current size, so the device type of each state can be read in logcat.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 9fa57ec7e3d678c3e19d6ce1309ae11b893e18fc)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-21 17:09:10 +08:00
x-JOCandClaude Opus 5.5 20b34479c2 fix(fold): keep dock icons that don't fit the cover dock instead of deleting them (#7403)
* fix(fold): keep dock items past the hotseat size instead of deleting them

LoaderCursor#checkItemPlacement rejects hotseat items whose rank is not
below InvariantDeviceProfile#numDatabaseHotseatIcons, and checkAndAddItem
then marks them deleted like overlapping items, so they are removed from
the database. That size can shrink only for a while: on a foldable the
folded (phone) profile has a smaller hotseat than the unfolded one, and
folding once deleted the dock icons at ranks 4 and 5 for good.

Skip such items for binding but keep them in the database, so they show
up again once the hotseat is large enough. Why this is safe:
- Overlapping items (in bounds) are still deleted as before.
- Nothing can be placed at a rank past the current hotseat size, so a
  kept item can't collide with a new one while it is hidden. If it ever
  does, the regular overlap check deletes it when it comes back.
- Grid migrations are unchanged and run before the loader.
- Only top-level hotseat items are bound, so the contents of a kept
  folder stay unbound with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit d556864ee08d0e2494f21a5fc3a9f00676f1269a)

* fix(migration): skip dock entries past the hotseat size (pre-existing crash)

Both solveHotseatPlacement versions (GridSizeMigrationDBController and
GridSizeMigrationLogic) mark the target's remaining dock items in an
array sized to the new dock: occupied[entry.screenId] = true. When the
target grid's database was last used with a larger dock, an entry's
rank can be past that size, and moving back to that grid with anything
to add to the dock throws ArrayIndexOutOfBoundsException. The Kotlin
path then aborts the migration; the Java path resets the target
database.

Such an entry takes no slot in the new dock, so it is skipped when
marking. Nothing else changes: the placement loop and every other entry
are as before.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit f9bdf9e9eebd710a11281c066c5293b76d71d18c)

* fix(migration): also skip negative dock ranks in the hotseat guard

A corrupt database could hold a negative hotseat rank, which would still
index outside the array. Such an entry takes no slot either.

Suggested in review by CodeRabbit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 17:07:28 +08:00
x-JOCandClaude Opus 5.5 99d015f121 fix(folder): keep the folder settings' defaults from the grid option (#7406)
InvariantDeviceProfile.initGrid took closestProfile's folder arrays as
they were, and DeviceProfileOverrides then wrote the folder settings
into them. The folder sliders take their default from closestProfile
(numFolderRows/numFolderColumns[INDEX_DEFAULT]), so the default they
compared against was the value currently applied, not the grid
option's. Setting the value that was already current, e.g. releasing
the slider thumb without moving it, removed the key and the folder grid
fell back to the grid option's on that reload.

Copy the arrays instead. Nothing else reads closestProfile's folder
arrays: the profiles read the IDP's own arrays, and every initGrid
parses fresh grid options.


(cherry picked from commit 198724e42446611b204d0700e6630a82d0c10502)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 17:06:00 +08:00
x-JOCandClaude Opus 5.5 ccdd15951a fix(drawer): two-line app labels in every language (#7410)
The "Use multiple lines" setting of the app drawer shows in every
language, but AOSP only honoured it in English, so it did nothing for
other languages. Labels break at spaces, or between words in camel case
names, which works for other scripts too.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 01:04:54 +07:00
Joseph Petersen 85335d904a fix(dock): remove unused label space when labels are hidden (#7364)
* fix(dock): remove unused label space when labels are hidden

* test(dock): remove tests and setup per review
2026-10-14 00:50:16 +08:00
zamyatinmn 43a21b43d7 fix: keyboard closing when clearing app search (#7353) 2026-10-02 09:12:03 +08:00
John Andrew Camu 494399a699 fix: address intermittent unresponsive drawer search and stale results (#7347)
- closes #7325

* chore: apply suggestions
2026-09-27 10:57:33 +08:00
Pun Butrach 6889441e64 fix(QuickSwitch): Restrict Task/navbar unification to V QPR2+ (#7336) 2026-09-24 20:18:47 +07:00
Pun Butrach 09e0cb129c fix: Hastily init of SharedPreference (CE type) on Prefs1 system (#7334) 2026-09-24 17:59:07 +07:00
Pun Butrach d2d1775131 fix(QuickSwitch): Transition behaviour compat for 16.0 (#7282) 2026-09-13 20:04:50 +07:00
Pun Butrach 6d084bfa43 feat: Reimplement placing widget on hotseat (#7272) 2026-09-10 10:41:05 +00:00
wellorbetter c92a59b0ae fix: infinite scroll wrap animation direction (#6653)
This commit fixes the infinite scroll wrap animation so it scrolls one page in the correct swipe direction instead of animating through all intermediate pages.
2026-08-27 11:05:19 +00:00
Pun Butrach a3384005f4 fix: Legacy shortcut does not show source target app (#7197) 2026-08-23 22:32:55 +07:00
Pun Butrach 44950791f3 fix: Inconsistent L3 theming around work pfp and widget selector (#7185) 2026-08-20 14:13:08 +00:00
Pun Butrach b60b925c65 fix: Compatibility layer for config night mode check for API <30 (#7183) 2026-08-20 13:24:42 +00:00
Pun Butrach eed2baf4ef fix: Show themed icon and notification dot for prediction row (#7177) 2026-08-18 16:03:09 +00:00
Pun Butrach ddc49b529c fix: Widget colouring compatibility with Android 13 (#7174) 2026-08-18 13:13:43 +00:00
Pun Butrach a98747abd5 fix: Disable managed/private space user on affected 37.2 Beta 3 (#7172) 2026-08-18 12:51:44 +00:00
Vedant Vohra a3a77ed77a fix: initialize window manager in grid previews (#7151) 2026-08-13 07:57:00 +08:00
Pun Butrach 4c76a6bb64 fix: Blank QSB space being override by hotseat grid adjustment (#7148) 2026-08-12 21:23:26 +07:00
Pun Butrach aecfed6d55 fix: Use old widget theme implementation on Android 12 and lower (#7147) 2026-08-12 16:30:28 +07:00
Pun Butrach fed6e619df fix: Apply launcher colour on widget dynamic theming (#7135) 2026-08-11 02:20:50 +07:00
Pun Butrach 95adc9ebbf fix: Crash on Android O, O_MR1, Q (#7131) 2026-08-10 22:11:24 +07:00
Pun Butrach ab5be6ca81 feat: Customisable hotseat bg corner radius (#7133) 2026-08-09 20:39:23 +07:00
8a3a05ea6a feat: Reimplement support for non-root app predictions (#6745)
This commit reimplements support for app predictions without root.

---------

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
Co-authored-by: TheSuperDragon <70206496+SuperDragonXD@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-08-09 21:31:22 +08:00
John Andrew Camu 3e43b5b45f fix: drawer folder crashes (#7130)
* fix: drawer folder crashes

* apply suggestion by coderabbit
2026-08-09 16:06:45 +08:00
alesimula 2d45cd2e2c fix: Invert condition for lifecycle method calls (#6401) 2026-08-09 01:18:36 +07:00
Pun Butrachandcoderabbitai[bot] 5cb2e99626 fix: Reimplement legacy shortcut path (#7027)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-08-08 16:48:49 +00:00
Pun Butrach a9d0bac2b5 feat: Richer haptic feedback (#7121)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-08-08 22:30:20 +07:00
John Andrew Camu 99a4e77713 feat: implementation scroll dock page (#7120)
- Closes: #3491
2026-08-08 18:04:55 +08:00
Pun Butrach 142cbea797 feat: Folder allapps shortcut popup (#7113)
* feat: Record folder entry ID

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

* feat: Show allapps folder popup

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

* chore: Update comment

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

---------

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-08-08 12:40:27 +08:00
Pun Butrach 6bcfd31a70 feat: Allow creation of item outside of workspace (#7110)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-08-05 23:50:54 +07:00
Pun Butrach 8cb7ea8ec4 revert: fix: Align widget visually to the icon (#7095) 2026-08-05 17:54:07 +07:00
Pun Butrach 2de2036f4d fix: Avoid calling file related to Protolog under S (#7090)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-08-01 16:28:19 +07:00
TheSuperDragon 83a1bd1a3f feat: Improve drawer search animations and state (#7054)
This commit improves the app drawer search state system to do the following things to match Pixel Launcher:

* Activate zero state only if these conditions are met:
  - The drawer search bar is tapped
  - The dock search bar is tapped, and matchHotseatQsbStyle is on or AppSearch is the current provider
  - The query is cleared
* Improves the search bar animation state to only remove the background and padding when the search bar has focus or has query
* Fixes the search bar end icon animation on tap
* Adds a back state handler in LawnchairLauncher so when back button is pressed, it exits search instead of exiting the app drawer, matching the intention of shouldBackExitSearch.
2026-07-30 13:19:58 +08:00
Pun Butrach beeb036ff7 fix: Align widget visually to the icon (#7047)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-07-22 22:46:06 +07:00
Pavel VolkovandCursor de5da81463 fix: Close drawer folders when dismissing All Apps via sheet edge (#6999)
Tapping the upper edge of the All Apps bottom sheet goes to NORMAL
without FLAG_CLOSE_POPUPS, so folders opened from the drawer stayed
visible on the workspace.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 09:31:48 +08:00
Pavel VolkovandCursor c32af3c8c5 fix: Clear stuck workspace blur after drawer/folder close (#6998)
Depth blur could leave RenderEffect on workspace/hotseat when SurfaceControl apply returned early, then setDepth(0) skipped re-apply. Always sync view blur with depth and force re-apply when settling to NORMAL; also clear leftover effects on folder dismiss.

blurWorkspaceDepthTargets can run on API 30; setRenderEffect and
createBlurEffect require API 31 and would throw on R.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 09:26:23 +08:00
Pavel VolkovandCursor f2897a16b4 fix: Respect folder color preference in spring folder animations (#6994)
Expressive folder animations ignored folderColor and always used the theme charcoal background. Resolve preview/open colors from prefs in both animation paths, and return after applying a custom color.

Reveal the first-page preview before showing the folder icon again, instead of sliding page previews for ~400ms after close.

Address CodeRabbit nit: the field was never populated after dropping the post-close slide animation.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 19:10:48 +08:00
Pavel VolkovandCursor 713b2661fa fix(allapps): Hide work/private badges on their drawer tabs (#6992)
User badges are redundant when the Work tab or Private Space section
already establishes the profile context. Keep badges on home and search.

Guard skipUserBadge with hasSearchResults() so work/private badges
remain visible when search results are shown.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 13:51:30 +08:00
Pavel VolkovandCursor b0adb1d918 fix: Tighten app drawer spacing around search and tabs (#6991)
Remove the double status-bar inset and leftover AOSP header padding so
search, personal/work tabs, and the app grid sit at even gaps. Also
collapse reserved space when the drawer search bar is hidden.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 13:49:52 +08:00
Pavel VolkovandCursor 2b24fe9966 fix: Apply icon packs to work/private profile apps (#6990)
* fix: Apply icon packs to work/private profile apps

Resolve components via ActivityInfo/LauncherApps instead of
getLaunchIntentForPackage, and harden icon customization for
non-current users. Also restore work badges when themed icons are off.

Fixes #5202
Fixes #4988

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor: Cache getActivityList result in SelectIconPreference

Avoid a redundant LauncherApps IPC when resolving work/private app labels.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 13:47:14 +08:00
John Andrew Camu 6741c3416d feat: Add option to have two-row dock (#6979)
- Closes: #3216
2026-07-11 16:58:57 +08:00
John Andrew Camu 0677ba2420 fix: crashes on android 8 (#6978) 2026-07-11 14:26:02 +08:00
Pun Butrach c32bd9f605 fix: Guard wallpaper hint with API check to prevent crash (#6976)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-07-10 18:09:59 +07:00
Pun Butrach c3d1ba01f9 fix: Compose QSB does not relinquish space when it's disabled (#6960)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-07-09 15:25:54 +00:00