Other than Session and Native, all installers require third-party apps. No need to pollute
installers list with them if they are unavailable as users often gets confused otherwise.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
* This makes onboarding minimal and only required screens are shown
* SessionInstaller is the recommended choice, user who needs a different can configure in settings
* Instead of showing minimal list, show installer fragment that contains more information
* Also show all installers like before
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
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>
* Don't filter InputStream updates as we are already guarding UI updates against total progress
* Update downloadedBytes based on bytesCopied to reflect real progress
* Use collect instead of collectLatest to ensure all updates from flow are handled
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This allows to open same sessions multiple times when required untill it's
abandoned. Also specifiy file length as it is known.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Android warns that it may not exist on all devices and samsung devices
seems to prove that true.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This allows system to automatically free up space when required as well as
users to delete it manually from the app info settings without wiping out
aurora store specific configuration.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
* If file still exists, resume the download using range requests.
* Avoid deleting files when download fails as we can resume the download again.
* Assert for expected SHA and actual SHA to match
* Verify SHA after download is finished to avoid complicated logic
Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This should fix the issue where progress gets stuck because download speed
gets really low but UI still mentions old speed and time remaining
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
* Use viewModels method to get ViewModel instances
* Use view binding as recommended for fragments
* Mark possible variables as private and val
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
* Don't enable auto-install for updates if battery optimization permission
is not granted during onboarding.
* Drop showing warning in toolbar, show it instead if they want auto-install
* Don't check for the same during downloads. Failing is better instead.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>