mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 03:59:16 +01:00
Using official Android S SDK
This commit is contained in:
parent
5026c48864
commit
ef93655d87
@ -1,6 +1,5 @@
|
||||
package eu.kanade.tachiyomi.extension.util
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.app.PendingIntent
|
||||
import android.content.Intent
|
||||
@ -23,7 +22,6 @@ import uy.kohesive.injekt.injectLazy
|
||||
*/
|
||||
class ExtensionInstallActivity : Activity() {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
try {
|
||||
@ -39,9 +37,7 @@ class ExtensionInstallActivity : Activity() {
|
||||
val params = SessionParams(
|
||||
SessionParams.MODE_FULL_INSTALL
|
||||
)
|
||||
// TODO: Add once compiling via SDK 31
|
||||
// if (Build.VERSION.SDK_INT >= 31) {
|
||||
if (Build.VERSION.PREVIEW_SDK_INT + Build.VERSION.SDK_INT >= 31) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
params.setRequireUserAction(USER_ACTION_NOT_REQUIRED)
|
||||
}
|
||||
val sessionId = packageInstaller.createSession(params)
|
||||
|
@ -31,7 +31,7 @@ import eu.kanade.tachiyomi.util.system.isLTR
|
||||
import eu.kanade.tachiyomi.util.view.resetStrokeColor
|
||||
import eu.kanade.tachiyomi.util.view.updateLayoutParams
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility", "NewApi")
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
class MangaHeaderHolder(
|
||||
view: View,
|
||||
private val adapter: MangaDetailsAdapter,
|
||||
@ -127,7 +127,7 @@ class MangaHeaderHolder(
|
||||
)
|
||||
true
|
||||
}
|
||||
if (Build.VERSION.PREVIEW_SDK_INT + Build.VERSION.SDK_INT >= 31) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
backdrop.setRenderEffect(
|
||||
RenderEffect.createBlurEffect(
|
||||
10f,
|
||||
|
@ -59,7 +59,7 @@ class ThemePreference @JvmOverloads constructor(context: Context, attrs: Attribu
|
||||
selectExtensionLight = fastAdapterLight.getSelectExtension().setThemeListener(false)
|
||||
selectExtensionDark = fastAdapterDark.getSelectExtension().setThemeListener(true)
|
||||
val enumConstants = Themes.values()
|
||||
val isOnA12 = Build.VERSION.SDK_INT + Build.VERSION.PREVIEW_SDK_INT >= 31
|
||||
val isOnA12 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
|
||||
itemAdapterLight.set(
|
||||
enumConstants
|
||||
.filter { (!it.isDarkTheme || it.followsSystem) && (it.styleRes != R.style.Theme_Tachiyomi_Monet || isOnA12) }
|
||||
|
@ -93,7 +93,7 @@ object LegacyPluginClassPath {
|
||||
}
|
||||
|
||||
object AndroidVersions {
|
||||
const val compileSdk = "android-S"
|
||||
const val compileSdk = 31
|
||||
const val minSdk = 23
|
||||
const val targetSdk = 30
|
||||
const val versionCode = 77
|
||||
|
Loading…
Reference in New Issue
Block a user