fix wipe on inactivity not showing on Android before Q

This commit is contained in:
lucky 2022-06-14 20:30:44 +03:00
parent e353c1d891
commit b7463e3910
3 changed files with 6 additions and 4 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId "me.lucky.wasted"
minSdk 23
targetSdk 32
versionCode 23
versionName "1.3.3"
versionCode 24
versionName "1.3.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -60,7 +60,8 @@ open class MainActivity : AppCompatActivity() {
if (prefs.code == "") prefs.code = makeCode()
updateCodeColorState()
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) hideESIM()
if (!packageManager.hasSystemFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN))
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q &&
!packageManager.hasSystemFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN))
hideSecureLockScreenRequired()
binding.apply {
code.text = prefs.code

View File

@ -0,0 +1 @@
fix wipe on inactivity not showing on Android before Q