Skip to content

fix(allapps): blur the home screen behind the bottom sheet drawer again - #48

Open
denson9874 wants to merge 3 commits into
codex/pixel-parityfrom
claude/project-thread-9bv6gn
Open

denson9874 wants to merge 3 commits into
codex/pixel-parityfrom
claude/project-thread-9bv6gn

Conversation

@denson9874

@denson9874 denson9874 commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Requested by Daryl · project thread

Description

On the Pixel 7 Pro (ExpressiveOS Nov 3 build) with Bottom sheet drawer on, the app drawer opened flush with the top of the screen over a sharp home screen: widgets, clock and dock icons showed through the see-through sheet with only a tint and no blur. This PR carries the unmerged fix from #46 onto 5.1.0, adds a self-check that rebuilds the device profile whenever it no longer matches the drawer style, and adds a guard so Home can't show sharp through the sheet.

Supersedes #46 (same first commit, rebased onto current codex/pixel-parity).

Reasoning

Home is meant to stay visible behind the phone sheet, blurred by the depth controller. shouldShowAllAppsOnSheet() reads the setting live, but the sheet's padding, shift range and blur depth (BottomSheetProfile.bottomSheetDepth) are fixed when the DeviceProfile is built. When the two disagree, the sheet layout is used with full screen values: flush with the top, depth 0, no blur, and Home still visible.

  1. Known stale paths (from fix(allapps): bottom sheet drawer ghost on the home screen after close #46).
    • Turning the switch on only recreated the activity (reloadHelper.recreate() in 5.1.0), which reuses the cached profiles. This is what happened on the phone on Nov 3 (see Testing).
    • Flags.allAppsSheetForHandheld() reads the preference through a supplier that LawnchairApp installs only at unlock. The process starts locked for TouchInteractionService, and Launcher can be created before that process's unlock callback runs.
    • Fix: the preference rebuilds the grid (restart), and LawnchairApp rebuilds the profiles at unlock when the sheet is on. The scrim stops drawing the closed sheet (the Nov 1 "ghost on home").
  2. Self-check (new). DeviceProfile records the sheet setting it was built for, and isAllAppsSheetLayoutStale() compares it with the live setting. LawnchairLauncher.onResume rebuilds the profiles when they are stale, whatever made them so. The dump prints allAppsSheetLayoutStale. A backstop for any other path that leaves the profile stale.
  3. Guard. AllAppsState keeps Home visible behind the phone sheet only while a blur will actually be drawn: window blur on, wallpaper depth effect on (with it off DepthController blurs nothing), and a sheet depth above 0. Otherwise Home hides as it does behind the full screen drawer. Tablets are unchanged. Rule: showHomeBehindAllAppsSheet in LawnchairUtils.kt, tests in AllAppsSheetAlphaTest.

Testing

  • Phone evidence, Nov 3, 7 Pro with launcher 5.1.0 (72):
    • Trigger: Daryl had just switched the drawer from full screen to bottom sheet. The process that showed the bug (pid 2310, running since boot) had its activity recreated 10 times at 07:20–07:21 ET. Daryl's screenshot came at 07:22. The process exited at 07:26 when a launcher setting restarted it.
    • Since then the drawer blurs: bottomSheetDepth 0.33, allAppsPadding.top 144 px, SurfaceFlinger backgroundBlurRadius 105 with the drawer open. Same before and after a force-stop.
    • Reboot test at 14:50 ET: the launcher process started 2.5 min before unlock, and Launcher was created 0.34 s after unlock. The layout was still healthy and the drawer blurred, so the boot path did not reproduce the bug.
  • Source review of the first two commits from three angles (compile/API, behaviour across states and transitions, boot and toggle ordering). No blockers. Minor: with the sheet on, the IDP is rebuilt once more on each cold start.
  • CI builds pass on the current head (Play debug, GitHub debug, Nightly release). check-style already fails on the base branch with pre-existing ktlint violations (see comment), and final-status fails only because of it. On this PR it reports 64 Kotlin files both before and after the self-check commit, and spotlessJavaCheck passes.
  • Jenkins unit tests, including the new AllAppsSheetAlphaTest cases.
  • 7 Pro with a release-signed build: open the drawer after a reboot, after toggling Bottom sheet drawer off and on, and after changing wallpaper colours. Expect Home blurred behind a rounded sheet and allAppsSheetLayoutStale: false in the dump.

Type of change

✅ Bug fix (A non-breaking change that fixes an issue)
❌ New feature (A non-breaking change that adds functionality)
❌ Breaking change (A fix or feature that would cause existing functionality to not work as expected)
❌ Refactor (A code change that neither fixes a bug nor adds a feature)
❌ Performance (A code change that improves performance)
❌ Style (Code style changes)
❌ Docs (Changes to documentation)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Csz3tagmgxj1PfoiZY5Ydo

…op the closed sheet painting on the scrim

Turning "Bottom sheet drawer" on only recreated the activity. The device profiles
kept the full-screen values (allAppsShiftRange 300 dp, allAppsPadding.top 0,
bottomSheetDepth 0) while Flags.allAppsSheetForHandheld() answered true, so the
closed drawer parked 300 dp down instead of off screen. Because setAlphas runs
while the state is still ALL_APPS, the scrim kept the drawer as its drawing
controller after an animated close, and drawOnScrim painted the translucent
sheet from a third of the way down the home screen until the next state change.

- PreferenceManager2: the sheet preference now rebuilds the grid (restart) instead
  of only recreating the activity.
- LawnchairApp: when the process started before unlock (TouchInteractionService)
  and the sheet is on, rebuild the profiles once the flag supplier is installed.
- AllAppsTransitionController: once a transition out of ALL_APPS completes, drop
  the scrim's drawing controller so nothing from the drawer is painted on home.

Reported on the Pixel 7 Pro (ExpressiveOS, launcher 5.0.8): drawer sheet ghost on
the home screen after open/close.

First opened as PR #46 (694475d); carried onto 5.1.0 unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Csz3tagmgxj1PfoiZY5Ydo
…urs it

With "Bottom sheet drawer" on, Home stays visible behind the sheet so the depth
controller can blur it. When no blur is drawn, the sheet stays see-through and
Home's widgets, clock and dock icons show sharp under the app grid. That happens
when the sheet has no depth (a device profile built before the sheet setting was
read), when the wallpaper depth effect is off (the depth controller then blurs
nothing), or when window blur is off.

Keep Home visible behind the phone sheet only while all three allow a blur;
otherwise hide it as the full screen drawer does. Tablets are unchanged.

Reported on the Pixel 7 Pro (ExpressiveOS, launcher 5.0.9): app drawer shows
the home screen through it with no blur.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Csz3tagmgxj1PfoiZY5Ydo
@denson9874 denson9874 self-assigned this Nov 3, 2026

Copy link
Copy Markdown
Owner Author

check-style (spotlessCheck) is red here, but the failure isn't caused by this PR. It reports ktlint violations in about 60 existing files (FeedBridge.kt, AllAppsSearchInput.kt, SearchItemBackground.kt, AllAppsCategoryTabs.kt, …), and the same check also fails on the base branch, for example on docs-only #47. The fix is a repo-wide ./gradlew spotlessApply in its own PR, already on the 5.0.9 follow-up list, so it's left out of this one. The Kotlin added here uses the formatting ktlint asks for elsewhere in that log (an expression body on the same line as the return type). The three build jobs are the checks that matter for this change.


Generated by Claude Code

…e drawer style

shouldShowAllAppsOnSheet() reads the Bottom sheet drawer setting live, but the
sheet's padding, shift range and blur depth are fixed when the DeviceProfile is
built. Whenever the two disagree, the drawer uses the sheet layout with the
full screen values: it opens flush with the top, with depth 0 and so no blur.

The previous commits fix the unlock and toggle paths. On the Pixel 7 Pro
(Nov 3), a launcher process that had been running since boot showed the bug,
and a later reboot didn't reproduce it, so what made that profile stale is
still unknown. The profile now records the setting it was built for. The
launcher checks it on every resume and rebuilds the profiles when they are
stale, whatever the cause. The dump prints allAppsSheetLayoutStale for adb
checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Csz3tagmgxj1PfoiZY5Ydo
@denson9874
denson9874 force-pushed the claude/project-thread-9bv6gn branch from e3b10e3 to ded3dba Compare November 3, 2026 19:59
@denson9874
denson9874 marked this pull request as ready for review November 3, 2026 20:17

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants