mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-05-18 23:06:50 +00:00
android: change device bypass sharedPref key
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user