Given that the next stable version of Chrome (120) will require Android 8+, it's
inevitable that the WebView functionality will gradually break. As always, newer
OS versions are recommended for better support with evolving Internet technologies.
According to https://apilevels.com/, Android 8+ still covers 93.7% of Android users.
* Add private extension install method
Private extensions are put inside private data directory of the running app, so
this kind of extensions can only be used by the running app and not shared with
other apps.
One limitation of private extension is the lack of deeplink handlers (if there's
any) since the extension APK is not installed to the system.
When both kinds of extensions are installed with a same package name, shared
extension (the one installed to the system) will be used unless the version
codes are different. In that case the one with higher version code will be used.
* update
* Replace RxJava in extension installer
Replace common downloadsRelay with Map of individual StateFlows
* Drop RxRelay dependency
* Simplify updateAllExtensions
* Simplify addDownloadState/removeDownloadState
Use immutable Map functions instead of converting to MutableMap
Includes side effects:
- No longer need to restart app for user agent string change to take effect
- parseAs extension function requires a Json instance in the calling context, which doesn't necessarily need to be the default one provided by Injekt
* Simplify DownloadService wake lock handling
_isRunning is only modified in onCreate/onDestroy, so the listener
job is redundant.
* Drop superclass calls to Service.onCreate/onDestroy
From https://developer.android.com/guide/components/services
> Note: Unlike the activity lifecycle callback methods, you are not
> required to call the superclass implementation of these callback
> methods.
Don't block on cache renewals, but notify library on updates so that the badges show up when ready.
We skip the cache when checking if a chapter is downloaded for the reader assuming that it's a
relatively low cost to check for a single chapter.
(Probably) fixes#8254 / fixes#7847
* Add support to update strategy.
* Add JavaDoc and bump the LIB_VERSION_MAX constant.
* Fix a word typo.
* Store update strategy enum as integer in the DB.