Commit Graph
87780 Commits
Author SHA1 Message Date
caizhixingandcaizhixing 0614d0b48a fix : NPE in Workspace.onDrop when the dropped cell is detached from the workspace (#7457)
Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-11-09 16:58:58 +07:00
x-JOCandClaude Opus 5.5 5152a54bc0 perf(startup): install the bundled baseline profile on sideloaded builds (#7412)
* fix(startup): install the shipped baseline profile on sideloaded builds

Removing androidx.startup's InitializationProvider (AOSP b/197780098)
also removed ProfileInstallerInitializer, so GitHub and Nightly APKs
never wrote the bundled baseline profile and ran unoptimised until
background dexopt built a profile of its own.

Do the initializer's job from LawnchairApp instead: main process only,
5 s after start, on the background-priority ordered executor. The
provider stays removed, so no other library initializes eagerly.

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

* fix(startup): only install the profile from the main process on API 26-27

Below API 28 the version check let every process through, including
:bugReport. Look up this pid's process name with ActivityManager there.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:12:50 +07:00
Lawnchair BotandCrowdin Bot 677e9c4aa3 New Crowdin translations by GitHub Action (#7507)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-08 00:21:47 +00:00
SEED264andClaude Opus 5.5 aeb92c164b fix(bugreport): prevent the launcher from hanging after a crash (#7499)
The bug report file name used the locale-dependent
SimpleDateFormat.getDateTimeInstance(), which yields '/' in some
locales (e.g. ja_JP: "2026/09/28 12:34:56"). The resulting path had
non-existent parent directories, so createNewFile() threw inside the
uncaught exception handler and the default handler was never invoked,
leaving the process frozen instead of restarting.

- Use a fixed, locale-independent format (yyyy-MM-dd_HH-mm-ss, Locale.US)
- Always delegate to the default handler via try/finally so the process
  is killed even if generating the report fails

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-08 00:29:32 +08:00
renovate[bot] 94b36676fd chore(deps): update gradle to v9.9.0 (#7503)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-06 18:50:43 +00:00
caizhixingandcaizhixing bf784dc6fb fix: survive a missing restriction bypass native library (#7484)
* fix: don't crash at startup when the restriction bypass lib is missing

Unseal.unseal() loads ChickenHook's libnrb.so. Repackaged APKs and
multi-open containers can fail to load it, in which case the call throws
UnsatisfiedLinkError (an Error) that catch (Exception) does not handle. This
runs from Application.onCreate(), so the process crash-loops forever.

Catch Exception | LinkageError. A failed unseal only disables the hidden API
exemption for that launch; other Errors (OOM, etc.) still propagate.

* fix: don't crash reading allowEnterPip when the restriction bypass is broken

getAllowEnterPip() uses RestrictionBypass below SDK 35. If the native bypass
library failed to load, the bypass class is permanently broken and any further
access throws LinkageError (ExceptionInInitializerError on the first touch,
NoClassDefFoundError afterwards), which catch (ReflectiveOperationException)
does not handle.

Return false (PIP not allowed) instead of crashing the transition.

---------

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-11-06 15:19:43 +08:00
caizhixingandcaizhixing 2b719d5134 fix(notification): NPE when the listener disconnects before connecting (#7483)
mSettingsCache is only assigned in onListenerConnected(), but
onListenerDisconnected() unregisters from it unconditionally. The framework
calls onListenerDisconnected() from NotificationListenerService.onDestroy(),
so a service that is destroyed before it ever connects dereferences null and
kills the process.

Guard the unregister; the connected path is unchanged.

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-11-06 14:11:10 +08:00
caizhixingandcaizhixing fcbf433f39 fix(folder): crash when opening a folder with an empty preview (#7482)
getAnimationData() read itemsInPreview[0] to derive the base icon size. The
preview list can be empty when the folder has no bound child views yet, which
made opening the folder crash with an IndexOutOfBoundsException.

Fall back to the device profile icon size when the list is empty; the normal
path is unchanged.

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-11-06 14:05:10 +08:00
renovate[bot] 448f542eac chore(deps): update agp to v9.5.1 (#7498)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-05 23:50:09 +00:00
Pun Butrach b66d36f8cf fix: HW bitmaps copied to SW before placed inside adaptive icons (#7496) 2026-11-05 15:49:42 +00:00
8801864504 fix: crash in icon cache when a component disappears during package update (#7481)
On Android 11 and below, LawnchairActivityCachingLogic#loadIcon resolves
ActivityInfo through PackageManager#getActivityInfo because
LauncherActivityInfo#getActivityInfo is only public since Android 12. When a
package is updated while the launcher refreshes its icon cache, one of its
launcher activities can vanish between LauncherApps handing out the activity
list and this lookup. The resulting NameNotFoundException is uncaught and
kills the model thread:

Fatal Exception: android.content.pm.PackageManager$NameNotFoundException
       at android.app.ApplicationPackageManager.getActivityInfo(ApplicationPackageManager.java:471)
       at app.lawnchair.LawnchairActivityCachingLogic.loadIcon(LawnchairActivityCachingLogic.kt:60)
       at com.android.launcher3.icons.cache.BaseIconCache.addIconToDBAndMemCache(BaseIconCache.kt:235)
       at com.android.launcher3.icons.IconCache.updateIconsForPkg(IconCache.java:206)
       at com.android.launcher3.model.PackageUpdatedTask.execute(PackageUpdatedTask.java:160)
       at com.android.launcher3.LauncherModel.enqueueModelUpdateTask(LauncherModel.kt:412)

Catch the exception and return BaseIconCache#getDefaultIcon instead:
addIconToDBAndMemCache already treats the default icon as "could not be
loaded" and skips the DB/memory cache entry, matching how other icon load
failures are handled. The two other PackageManager#getActivityInfo call
sites (ThemedIconCompat, SearchResultIcon) already catch this exception; the
CachingLogic was the only unguarded one.

Android 12+ is unaffected: it reads the ActivityInfo snapshot from
LauncherActivityInfo directly.

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2026-11-05 15:20:18 +00:00
Pun Butrach f1c1220f1f Revert "chore(deps): update plugin google-protobuf to v0.10.1" (#7494)
This reverts commit 428b6a6062.
2026-11-05 14:10:29 +00:00
renovate[bot] 428b6a6062 chore(deps): update plugin google-protobuf to v0.10.1 (#7493)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-04 22:47:22 +00:00
renovate[bot] ee30d67758 fix(deps): update dependency androidx.test.uiautomator:uiautomator to v2.4.1 (#7492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-04 22:44:20 +00:00
renovate[bot] 874bef418b fix(deps): update dependency androidx.compose.material3:material3 to v1.5.0-rc01 (#7491)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-04 21:06:52 +00:00
renovate[bot] 85493b9776 chore(deps): update plugin diffplug-spotless to v8.11.0 (#7480)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-03 01:21:44 +00:00
renovate[bot] 59396cddd1 fix(deps): update dependency com.google.errorprone:error_prone_annotations to v2.52.0 (#7479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-02 19:44:48 +00:00
x-JOC f83fbb0226 fix(widgets): let the resize frame reach the screen edge horizontally (#7387)
* fix(widgets): let the resize frame reach the screen edge horizontally

The resize frame is drawn resize_frame_background_padding (24dp) outside
the widget, but the horizontal drag range clamped the frame's outer edge
to the DragLayer. When the grid sits close to the screen edge (low
workspace/widget padding, many columns) the last column could not be
reached.

When the frame already overhung the screen edge (gap + widget padding
< 24dp, which is the default), the old range did not contain 0 (left
start positive, right end negative), so the first move event snapped the
frame up to 24dp inward on either side. With half-cell resize steps that
would be enough to drop a step.

Bound the widget's edge instead of the frame's, and keep 0 inside the
range so a touch without movement never moves the frame. The vertical
range is unchanged.

* fix(widgets): count the last partial resize step when the finger hits the edge

The finger cannot travel past the screen edge, and the handle can be
grabbed up to 24dp outside the widget. With little workspace/widget
padding, the travel left for the last column can then be shorter than
RESIZE_THRESHOLD of a step.

While a left/right handle is dragged and the finger is within
resize_frame_background_padding of that screen edge, a partial step of
more than 1 - RESIZE_THRESHOLD towards the edge counts as reached. That
threshold keeps the step from being undone right after it is taken, and
it only applies in the growth direction.

* refactor(widgets): shorten resize frame LC-Notes

Comment-only change: trim the edge-clamp LC-Notes in AppWidgetResizeFrame to one or two lines. No behaviour change.
2026-11-02 15:25:39 +08:00
Jaxon WrightandClaude Opus 5.5 5a9f6e05ba fix(backup): restore into the database that gets opened (#7460)
createDatabaseHelper renamed restored.db to the IDP's dbFile but opened
the dbFile it was passed, from the DB_FILE pref. The Nova import writes
grid prefs before restoring, and hotseatColumns' reloadGrid listener can
move the IDP to an intermediate grid (e.g. launcher_6_4_5.db) first. The
restored layout then landed in a file that was never opened, the opened
file was created empty, performRestore sanitized nothing, and the next
start reset the "empty" database to the default layout. A second import
worked because the prefs no longer changed.

Rename into the file that is opened instead.

migrateDbName moves launcher.db to dbName when dbName doesn't exist yet.
With the restore now renamed into dbFile, a dbFile of launcher.db (the
5_by_5 grid) would be moved away and deleted before DatabaseHelper opens
it. Migrate first, then rename.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 15:22:05 +08:00
renovate[bot] ce6c4132a7 fix(deps): update dependency net.bytebuddy:byte-buddy to v1.18.17-jdk5 (#7475)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-02 05:37:04 +00:00
renovate[bot] ff037218d4 fix(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.18.17-jdk5 (#7476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-02 00:59:02 +00:00
Pun Butrach 849fec9ef6 feat: QoL improvement to suspend application usage (#7338)
* fix: Tint suspend icon

* feat: Check if icon is suspendable

* fix: Resolve app name correctly

* fix: Improve permission detection

* chore: Please the spotless lord

* fix: Apply suggestions

* chore: Apply suggestions

* chore: Apply suggestions
2026-11-01 15:08:31 +07:00
stevenandsteven-ahfu f6ee1d9b3c fix: Handle missing themed icon drawables (#7466)
Co-authored-by: steven-ahfu <4956188+steven-ahfu@users.noreply.github.com>
2026-11-01 13:46:07 +07:00
Lawnchair BotandCrowdin Bot f84b9e3564 New Crowdin translations by GitHub Action (#7470)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-01 00:21:50 +00:00
renovate[bot] b396f41c24 chore(deps): update plugin google-ksp to v2.3.13 (#7465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-30 21:58:32 +00:00
caizhixingandcaizhixing 8429fbe09d fix: Crash in SettingsCache.onChange for unreadable hidden keys (#7452)
SettingsCache observes hidden Settings keys — e.g.
hide_privatespace_entry_point, which ModelInitializer registers a
listener for. Since Android S, hidden settings keys are only readable
by system apps; a query from a third-party app throws
SecurityException.

3962597e6e fixed this for the read path by catching SecurityException
in getValue(), but the ContentObserver path was missed: when the system
writes such a key, onChange() calls updateValue() on the main-thread
handler and the launcher crashes.

Skip the cache update instead, mirroring the existing guard in
getValue().

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-10-30 21:45:11 +07:00
steven c154f993c8 [Fix]: Stop platform from overriding Lawnchair's own dark theme (#7267) 2026-10-30 14:43:23 +00:00
caizhixingandcaizhixing f00bff4f50 Catch SecurityException thrown from setWallpaperOffsets (#7454)
On some OEM builds (e.g. Huawei EMUI on API <= 28), WallpaperManager
.setWallpaperOffsets() internally fetches the current wallpaper bitmap,
and WallpaperManagerService enforces READ_EXTERNAL_STORAGE on that
binder call. When the permission is not granted the call throws
SecurityException, which escaped setOffsetSafely() and fatally crashed
the launcher on every workspace page swipe.

Skip and log the offset update on affected devices instead; wallpaper
parallax simply stops updating there.

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-10-30 21:40:10 +07:00
caizhixingandcaizhixing d714016ffc fix: Crash in multi-window on API 26-29 (#7453)
getMultiWindowDisplaySize() calls WindowManager.getCurrentWindowMetrics(),
added in API 30, without a version check. Lawnchair runs down to
minSdk 26, so building the multi-window device profile
(Launcher#initDeviceProfile and the fallback RecentsActivity) throws
NoSuchMethodError on Android 8-10 devices in split-screen.

Derive the bounds from the default display size below R.

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-10-30 21:37:05 +07:00
Pun Butrach be56ee534f refactor: Move Lawnchair gesture vibrator to MSDL player (#7464)
* feat: Move gesture vibrator to MSDL player

* chore: Please the lord Spotless
2026-10-30 21:32:40 +07:00
Pun Butrach f9b99e2da2 fix: Icon not responding to system accent changes (#7370) 2026-10-30 16:33:00 +07:00
caizhixingandcaizhixing c5c5a42ca4 fix: crash when dismissing a task with haptics on API 26-29 (#7451)
VibratorWrapper.vibrate(primitiveId, ...) calls
Vibrator.areAllPrimitivesSupported() and builds a
VibrationEffect.Composition, both added in API 30, without a version
check. Lawnchair runs down to minSdk 26, so dismissing a task in
Recents — TaskViewTouchControllerDeprecated passes PRIMITIVE_TICK, a
non-negative id — throws NoSuchMethodError and crashes the launcher
on Android 8-10 devices.

Fall back to the plain fallback effect below R, mirroring the existing
ATLEAST_S guard in vibrateForTaskbarUnstash() and the ATLEAST_Q branch
that already builds EFFECT_CLICK.

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-10-30 01:33:33 +08:00
renovate[bot] 2d07299867 chore(deps): update agp to v9.5.0 (#7458)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-28 18:28:13 +00:00
Pun Butrach 15ebe41583 refactor: Hide battery charging speeds behind code flag (#7449) 2026-10-27 16:57:10 +00:00
caizhixingandcaizhixing 1d68a13644 fix: Fall back to the default mask when config_icon_mask is unparsable (#7424)
config_icon_mask is a framework resource that ROM overlays can replace.
When its value is not valid path data (seen in the wild with a line break
inside a coordinate), PathParser throws during Launcher onCreate and the
launcher enters a crash loop. Parse the mask defensively and fall back
to the platform default mask, mirroring the existing guard around
GenericPathShape in the same file.

Co-authored-by: caizhixing <17589399+caizhixing03@user.noreply.gitee.com>
2026-10-27 23:50:02 +07:00
Pun Butrach 7436e7408d refactor: Pass swipe down gesture notifications panel to native touch controller (#7448)
* refactor: Pass swipe down gesture over to native touch controller

* chore: Spotlessified

* fix: Apply reviewer
2026-10-27 22:34:29 +07:00
Pun Butrach e53dcc5c42 fix: (DON'T MAKE) Folder reset scrim during allapps 2026-10-26 01:54:08 +07:00
Pun Butrach 9f1ed85224 fix: Adapt BaseDepthControllerImpl and folder spring animation properties 2026-10-26 00:49:09 +07:00
Pun Butrach 586cb6d5ba refactor: Adapt Lawnchair Shape function to PathWrapper 2026-10-26 00:15:33 +07:00
Tracy Zhou 2efdc9b814 Introduce PathWrapper that also tracks bounds and radii
So that we can use the bounds to set on BackgroundBlurDrawable

Bug: 445467156
Test: manual in the next CL
Flag: EXEMPT BUGFIX
Change-Id: I002d9dfd1d1aabc90c5cd6097772103575d91de9
2026-10-26 00:15:03 +07:00
Charlie Anderson c754a217b9 Fix folder view sticking during close anim when transitioning launcher page and/or state
Bug: 470662985
Test: manual
Flag: EXEMPT BUGFIX
Change-Id: I7a4841ad49cbc0339f6905869a1bb092e7f0c094
2026-10-26 00:12:20 +07:00
Charlie Anderson d66ece9a9c Fix folder clip reveal for multiple different issues
- Folder pages should not swipe out of bounds while opening
- Folder pages should be revealed if swiped in bounds while opening
- Closing the folder should not clip the preview icons

Bug: 458072199
Test: opening/closing/swiping a large folder
Flag: com.android.launcher3.enable_expressive_folder_expansion
Change-Id: I3773a9c79ec0e5efc24c0ac185a516353f955cec
2026-10-26 00:11:05 +07:00
Charlie Anderson 43940b201a Fix clip reveal so that folder doesn't scroll out of bounds while opening
Bug: 449923444
Flag: com.android.launcher3.enable_expressive_folder_expansion
Test: open folder and immediately swipe to next page

Change-Id: Iafa46f3748fdf0c1982b5de6df539b8c8609204f
2026-10-26 00:10:08 +07:00
Charlie Anderson 50cab79984 Fix folder animation workspace scaling to not conflict with other animations.
Bug: 456164513
Test: manual - close app and quickly open folder
Flag: com.android.launcher3.enable_expressive_folder_expansion

Change-Id: I47886b034402549176f99618699ae90bd0356086
2026-10-26 00:10:00 +07:00
Charlie Anderson e9c655dbf6 Add functionality to DepthController to control wallpaper zoom indepedently of blur
Also add wallpaper zoom to folder motion

Bug: b/387543793
Flag: com.android.launcher3.enable_expressive_folder_expansion
Test: manually and DepthControllerTest
Change-Id: I94142806ffb6dfb93d363017ef4d13b3a5e74681
2026-10-26 00:08:46 +07:00
Charlie Anderson 0d40f78616 Reset scrim and launcher workspace properties if folder is closed without animation
Bug: 452119282
Flag: com.android.launcher3.enable_expressive_folder_expansion
Test: use longpress on folder item and tap remove shortcut

Change-Id: Ia6e60189a74d731ed7a23ab74c144a228118a1d9
2026-10-26 00:03:41 +07:00
Charlie Anderson ea06691a37 Convert BubbleTextView Alpha to use spring animation
Flag: com.android.launcher3.enable_expressive_folder_expansion
Bug: 387543793
Test: Manually verifying


Change-Id: Ibadedb1fef2542a4b8373ab3a4557c10c8752a77
2026-10-26 00:00:31 +07:00
Lawnchair BotandCrowdin Bot 8be1c0f469 New Crowdin translations by GitHub Action (#7438)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-10-25 03:57:47 +03:30
def 793ac98db2 feat(feed): add Whisper to the feed provider whitelist (#7399) 2026-10-25 01:18:32 +08:00
renovate[bot] 60f90d713e fix(deps): update dependency net.bytebuddy:byte-buddy to v1.18.16-jdk5 (#7432)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-23 18:42:32 +00:00