fix: add installed apps to the launcher home screen#1350
Open
Victor-root wants to merge 1 commit into
Open
Conversation
AOSP Launcher3's SessionCommitReceiver only auto-adds a newly installed app to the home screen when the session's install reason equals INSTALL_REASON_USER. All three installer backends were omitting this: SessionInstaller left the reason at INSTALL_REASON_UNKNOWN; RootInstaller and ShizukuInstaller pass the reason via pm's --install-reason 4 flag (available since Android O).
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.
🐛 Problem
Apps installed via Droid-ify were not appearing on the launcher home screen, while the same app installed from another store (e.g. Aurora Store) would be added automatically. ❌
🔍 Root cause
AOSP Launcher3's
SessionCommitReceiveronly adds the icon to the home screen if the install session hasINSTALL_REASON_USERas its install reason. None of the three installer backends were setting it:INSTALL_REASON_UNKNOWNpmcommand was missing the flag→ The launcher silently ignored the committed session: the app was installed correctly, but no shortcut was ever created.
✅ Fix
SessionInstaller→setInstallReason(INSTALL_REASON_USER)RootInstaller&ShizukuInstaller→ added--install-reason 4(Android 8+)Three lines total, no behavioral change outside this case. ✨
📱 Testing
Tested on physical devices (LineageOS / Android 13 and Android 16): the icon now correctly appears on the home screen after installation, in both session and root mode. ✅
Properly fixes #807, #113 which was closed as completed but never actually resolved.