Skip to content

Commit 95cd677

Browse files
committed
android: fix bypass on pixels on older A16 version; also check Xposed scope for compatibility
1 parent 0d049d9 commit 95cd677

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

android/app/src/main/java/me/kavishdevar/librepods/MainActivity.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class MainActivity : ComponentActivity() {
223223
fun Main() {
224224
val context = LocalContext.current
225225
val sharedPreferences = context.getSharedPreferences("settings", MODE_PRIVATE)
226-
if (!isSupported(sharedPreferences)) {
226+
if (!isSupported(sharedPreferences) && !XposedState.bluetoothScopeEnabled) {
227227
val showDialog = remember { mutableStateOf(false) }
228228
val showPlayBypassVisible = remember { mutableStateOf(false) }
229229
val hazeState = rememberHazeState()
@@ -323,10 +323,10 @@ fun Main() {
323323
} else {
324324
sharedPreferences.edit {
325325
putBoolean("bypass_device_check.v2", true)
326-
val intent = Intent(context, MainActivity::class.java)
327-
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
328-
context.startActivity(intent)
329326
}
327+
val intent = Intent(context, MainActivity::class.java)
328+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
329+
context.startActivity(intent)
330330
}
331331
},
332332
onDismiss = {

0 commit comments

Comments
 (0)