New reader (#1550)

* Delete old reader

* Add utility methods

* Update dependencies

* Add new reader

* Update tracking services. Extract transition strings into resources

* Restore delete read chapters

* Documentation and some minor changes

* Remove content providers for compressed files, they are not needed anymore

* Update subsampling. New changes allow to parse magic numbers and decode tiles with a single stream. Drop support for custom image decoders. Other minor fixes
This commit is contained in:
inorichi
2018-09-01 17:12:59 +02:00
committed by GitHub
parent 7c99ae1b3b
commit 18f89cc341
105 changed files with 6918 additions and 7247 deletions
@@ -11,6 +11,7 @@ import android.content.pm.PackageManager
import android.content.res.Resources
import android.net.ConnectivityManager
import android.os.PowerManager
import android.support.annotation.AttrRes
import android.support.annotation.StringRes
import android.support.v4.app.NotificationCompat
import android.support.v4.content.ContextCompat
@@ -79,7 +80,7 @@ fun Context.hasPermission(permission: String)
*
* @param resource the attribute.
*/
fun Context.getResourceColor(@StringRes resource: Int): Int {
fun Context.getResourceColor(@AttrRes resource: Int): Int {
val typedArray = obtainStyledAttributes(intArrayOf(resource))
val attrValue = typedArray.getColor(0, 0)
typedArray.recycle()
@@ -161,4 +162,4 @@ fun Context.isServiceRunning(serviceClass: Class<*>): Boolean {
@Suppress("DEPRECATION")
return manager.getRunningServices(Integer.MAX_VALUE)
.any { className == it.service.className }
}
}