A bulk update produced one standalone notification per app for both
successes and failures, flooding the shade. Bundle these terminal
notifications into two groups, each with a collapsible summary that
lists the apps via InboxStyle:
- "N apps installed" on the (LOW, silent) installed channel, expiring
on its own since it's informational.
- "N apps failed" on the (HIGH) alerts channel, persisting until
handled and carrying a Retry action per app.
Summaries are rebuilt from the live posted notifications rather than
tracked state, so they stay correct across retries, dismissals and
process restarts, and are only posted on Android N+ where the system
actually renders groups.
Retry re-queues the download via a new DownloadRetryReceiver; the
worker resumes from verified files on disk, so retrying an install
failure re-installs without re-downloading.
ComposeActivity becomes the sole launch target; the legacy MainActivity
is removed. Destination / Screen pair drives navigation3, NavDisplay
handles deep links plus microG-aware resume rechecks, and Theme.kt
is tightened for edge-to-edge.
TODO:
- Reduce notification frequency, create too many notifications resulting in notification actions being inaccesible.
- Its a bad practive to bombard system with notification redraws
Introduce a new activity to host composables as View system behaves
quite bad when composable are used inside it.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
INSTALL and DELETE packages permissions are only available to system apps
and every project including Aurora Store by default seems to include it
as a user app
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This reverts commit baa954eb20.
Reason for revert: If user has multiple accounts on microG but chooses to login
using one of them, they will not be prompted again for selecting accounts again as
Aurora Store can only see the permitted account from the first time.
SessionInstaller can commit silent installs if the app is device owner. Implemented on
request of users.
This still needs user to set the app as device owner manually using ADB (only possible
if the device has no accounts setup yet).
Co-authored-by: Syuugo <pub@s1204.me>
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
The new setRequestUpdateOwnership() method allows us to indicate to the system that we intend to be responsible for future updates to an app it is installing.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Move app installation logic to onSuccess method in worker under a NonCancellable
context and convert the receiver class to be a generic status handler for anything
except success which should be handled in PackageManagerReceiver.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>