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" applicationId "me.lucky.wasted"
minSdk 23 minSdk 23
targetSdk 32 targetSdk 32
versionCode 23 versionCode 24
versionName "1.3.3" versionName "1.3.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

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

View File

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