App icon not visible in Bliss Launcher after enabling a disabled component
- /e/ version: 2.4-t
- Device model(s): e_emulator_x86_64
- Developer mode enabled: N/A
- Device rooted: N/A
- Trackers blocker enabled: N/A
Summary
After enabling a disabled activity component of an app (not the package itself), a corresponding launcher is not readded to blisslauncher while it is running. Instead, it is only added after the launcher is restarted.
When does this occur? Why is it relevant?
- We are working on a microG feature that is only applicable to the work profile. Thus, the corresponding launcher icon should only be shown for the work profile; we do this by enabling the component after its requirements are met. As-is, the user would have to restart the device to be able to use the functionality.
- Apps sometimes enable and disable components that correspond to the same UI but have different icons, to allow icon customization this way.
The problem
Steps to reproduce
Disable an activity component, for example, App Lounge's main activity, and then re-enable it.
$ adb shell pm disable foundation.e.apps/foundation.e.apps.MainActivity
$ adb shell pm enable foundation.e.apps/foundation.e.apps.MainActivity
What is the current behavior?
The app icon is subsequently no longer visible on blisslauncher.
What is the expected correct behavior?
The app icon should re-appear. This is the behavior observed with other launcher apps like Lawnchair.
Technical information
Relevant logs (adb logcat
)
When component is disabled:
2024-09-22 16:47:04.158 6220-6243 ModelWriter foundation.e.blisslauncher D removing items from db . Reason: [removed because the corresponding package or component is removed. mOp=2 removedPackages=[] removedComponents=[{foundation.e.apps/foundation.e.apps.MainActivity}]]
No relevant lines are printed when the component is enabled.
Solutions
Workaround
The app icon is shown again after killing and restarting the launcher, for example, after a reboot.
Possible fixes
Not yet known