Remove Android M checks

since android M is already the minimum
This commit is contained in:
Jays2Kings 2021-09-17 18:10:12 -04:00
parent 03ce33e434
commit 3aa06c708f
2 changed files with 14 additions and 19 deletions

View file

@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.os.PowerManager
import android.provider.Settings
@ -76,7 +75,6 @@ class SettingsAdvancedController : SettingsController() {
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val pm = context.getSystemService(Context.POWER_SERVICE) as? PowerManager?
if (pm != null) preference {
key = "disable_batt_opt"
@ -96,7 +94,6 @@ class SettingsAdvancedController : SettingsController() {
}
}
}
}
preference {
key = "pref_dont_kill_my_app"

View file

@ -54,7 +54,6 @@ abstract class WebViewClientCompat : WebViewClient() {
return shouldInterceptRequestCompat(view, url)
}
@TargetApi(Build.VERSION_CODES.M)
final override fun onReceivedError(
view: WebView,
request: WebResourceRequest,
@ -78,7 +77,6 @@ abstract class WebViewClientCompat : WebViewClient() {
onReceivedErrorCompat(view, errorCode, description, failingUrl, failingUrl == view.url)
}
@TargetApi(Build.VERSION_CODES.M)
final override fun onReceivedHttpError(
view: WebView,
request: WebResourceRequest,