android: change device bypass sharedPref key

This commit is contained in:
Kavish Devar
2026-04-24 20:07:02 +05:30
parent 67fc93bde5
commit d2dd722bc7
3 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ android {
applicationId = "me.kavishdevar.librepods" applicationId = "me.kavishdevar.librepods"
minSdk = 33 minSdk = 33
targetSdk = 37 targetSdk = 37
versionCode = 36 versionCode = 37
versionName = versionName versionName = versionName
} }
buildTypes { buildTypes {

View File

@@ -310,7 +310,7 @@ fun Main() {
showPlayBypassVisible.value = true showPlayBypassVisible.value = true
} else { } else {
sharedPreferences.edit { sharedPreferences.edit {
putBoolean("bypass_device_check", true) putBoolean("bypass_device_check.v2", true)
val intent = Intent(context, MainActivity::class.java) val intent = Intent(context, MainActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
context.startActivity(intent) context.startActivity(intent)
@@ -333,7 +333,7 @@ fun Main() {
onConfirm = { onConfirm = {
showPlayBypassVisible.value = false showPlayBypassVisible.value = false
sharedPreferences.edit { sharedPreferences.edit {
putBoolean("bypass_device_check", true) putBoolean("bypass_device_check.v2", true)
val intent = Intent(context, MainActivity::class.java) val intent = Intent(context, MainActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
context.startActivity(intent) context.startActivity(intent)

View File

@@ -38,5 +38,5 @@ fun isSupported(sharedPreferences: SharedPreferences): Boolean {
} else if (isOppoOrOnePlus) { } else if (isOppoOrOnePlus) {
return Build.VERSION.SDK_INT >= 36 return Build.VERSION.SDK_INT >= 36
} }
return sharedPreferences.getBoolean("bypass_device_check", false) return sharedPreferences.getBoolean("bypass_device_check.v2", false)
} }