Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lawnchair/src/app/lawnchair/LawnchairApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ class LawnchairApp : LauncherApplication() {
FeatureFlagsImpl.sAllAppsSheetForHandheldSupplier = java.util.function.BooleanSupplier {
pref2.allAppsSheetForHandheld.firstCached(pref2)
}
// Device profiles built before this point (the process starts for TouchInteractionService
// before unlock) saw the flag as false. Rebuild them when the sheet is on, or All Apps
// keeps the full-screen shift range and padding under a sheet layout.
if (pref2.allAppsSheetForHandheld.firstCached(pref2)) {
InvariantDeviceProfile.INSTANCE.get(this).onPreferencesChanged(this)
}
ExpressiveUpdateScheduler.ensureScheduled(this)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ class PreferenceManager2 @Inject constructor(
val allAppsSheetForHandheld = preference(
key = booleanPreferencesKey(name = "all_apps_sheet_for_handheld"),
defaultValue = false,
onSet = { reloadHelper.recreate() },
// The sheet changes DeviceProfile (allAppsShiftRange, allAppsPadding, the bottom sheet
// profile), so the profiles must be rebuilt, not just the activity. With a stale profile
// the closed drawer parks at the full-screen shift (300 dp) and its sheet stays painted
// on the scrim a third of the way down the home screen.
onSet = { reloadHelper.restart() },
)

val appDrawerHapticFeedback = preference(
Expand Down
10 changes: 10 additions & 0 deletions src/com/android/launcher3/allapps/AllAppsTransitionController.java
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,16 @@ public void setStateWithAnimation(LauncherState toState,
ALL_APPS_PULL_BACK_ALPHA.set(this, ALL_APPS_PULL_BACK_ALPHA_DEFAULT);

mAllAppScale.updateValue(1f);

// setAlphas ran while the state was still ALL_APPS, so it kept the scrim's
// drawing controller for header protection during the close. Once the drawer
// has settled closed, stop drawing its sheet on the scrim: with a shift range
// shorter than the screen (sheet flag flipped after the device profile was
// built) the sheet would otherwise stay painted over the home screen until the
// next state change.
if (success && !mLauncher.isInState(ALL_APPS)) {
mScrimView.setDrawingController(null);
}
});
}

Expand Down
Loading