Repository navigation
fix(allapps): bottom sheet drawer ghost on the home screen after close - #46
Draft
denson9874 wants to merge 1 commit into
Draft
denson9874 wants to merge 1 commit into
denson9874 wants to merge 1 commit into
Conversation
…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. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Csz3tZW7iXZyCGuRafe8WU
Owner
Author
|
CI: Generated by Claude Code |
3 of 5 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the translucent drawer sheet that stays painted from about a third of the way down the home screen after opening and closing All Apps (seen on the Pixel 7 Pro on ExpressiveOS with launcher 5.0.8, "Bottom sheet drawer" on, Android 17 base, not QPR2, so frosted glass is not involved).
Two things combine:
allAppsShiftRange300 dp,allAppsPadding.top0,bottomSheetDepth0) whileFlags.allAppsSheetForHandheld()answered true. The closed drawer therefore parks 300 dp down instead of off screen. The same stale-profile case happens when the process is started before unlock for TouchInteractionService, since the flag supplier is only installed on unlock.AllAppsTransitionController.setAlphasruns while the state is still ALL_APPS, so it keeps the drawer as the scrim's drawing controller through the close animation, and nothing clears it afterwards.drawOnScrimWithScaleAndBottomOffsetthen keeps painting the sheet at the closed offset until some later state change happens to callsetAlphasagain. With a full-screen shift range the sheet is off screen so this was invisible before.Changes:
PreferenceManager2: the sheet preference callsreloadHelper.restart()(grid rebuild + recreate) instead ofrecreate().LawnchairApp.onUserUnlocked: when the sheet is on, rebuild the profiles once the flag supplier is installed.AllAppsTransitionController: after a transition out of ALL_APPS completes, drop the scrim's drawing controller.Evidence from the phone:
dumpsys activity topshowedbottom_sheet_backgroundVISIBLE (sheet mode) next toallAppsShiftRange: 1050.0px (300.0dp)andallAppsPadding.top: 0(full-screen profile), state Normal,apps_viewGONE, scrim still drawing. 1050 px is exactly where the ghost starts on the 3120 px screen.Reasoning
The drawer sheet is drawn on the scrim, not on the apps view, so the apps view going GONE does not hide it. Keeping the scrim's drawing controller after the close is harmless only while the closed translation pushes the sheet off screen; the stale device profile broke that assumption. Both halves are fixed so neither can bring the ghost back on its own.
Testing
Not run on a phone yet (no local Gradle here; CI compiles). Steps for the 7 Pro:
adb shell dumpsys activity top | grep -E "allAppsShiftRange|allAppsPadding.top"should show the sheet profile values (shift range near screen height, top padding non-zero) while the toggle is on.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)
❌ Chore (Changes to the build process or other tooling)
Generated by Claude Code