Skip to content

handle install broadcasts after InstallManagerService was killed

If InstallManagerService was killed, it'll forget all of its state. If it is killed while an install process is running, and that install fails, InstallManagerService will receive a broadcast about the error but then it can't find anything about the app in question besides its download URL. That is enough to control the notification, but not enough to get the name of the app in question. This is a workaround by showing the APK filename when the app name cannot be found. Ideally, the packageName would somehow magically be delivered to InstallManagerService in this case, but the Installer stuff doesn't always have it to send.

With android-23, there is getActiveNotifications(), which we might be able to use to stash the packageName and fetch it as needed.

Merge request reports