diff --git a/GITHUB_CHANGELOG.md b/GITHUB_CHANGELOG.md index c4f7f6b412..0bb04ac503 100644 --- a/GITHUB_CHANGELOG.md +++ b/GITHUB_CHANGELOG.md @@ -19,6 +19,7 @@ older (i.e., Lawnchair `15-dev`). * Most if not all of Lawnchair settings should be usable without crashes * Correct Baseline Profile from old `market` to `play` variant, and now should calculate profile for `nightly` * Smartspace Battery now reports battery charging status of Fast (more than 90% of 20 W) and Slow (less than 90% of 5 W) charging +* Fix Private Space crash when Lawnchair is set as Launcher due to flags only available on A16 #### Split Branch diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index 0980107d3a..72e6e237a7 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -402,11 +402,20 @@ public class AlphabeticalAppsList implement } // Add Install Apps Button first. - if (Flags.privateSpaceAppInstallerButton() && !enableMovingContentIntoPrivateSpace) { - mPrivateProviderManager.addPrivateSpaceInstallAppButton(mAdapterItems); - position++; + if (!ATLEAST_BAKLAVA) { + // LC: Baklava added a new behavior for the PS app button. (enableMovingContentIntoPrivateSpace) + if (Flags.privateSpaceAppInstallerButton() && !enableMovingContentIntoPrivateSpace) { + mPrivateProviderManager.addPrivateSpaceInstallAppButton(mAdapterItems); + position++; + } + } else { + if (Flags.privateSpaceAppInstallerButton()) { + mPrivateProviderManager.addPrivateSpaceInstallAppButton(mAdapterItems); + position++; + } } + // Split of private space apps into user-installed and system apps. Map> split = mPrivateApps.stream() .collect(Collectors.partitioningBy(mPrivateProviderManager