Skip to content

Commit

Permalink
Fix Auto-update for Pixel 7 (arm64-v8a only)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Dec 29, 2022
1 parent ed3a14c commit 6a745a7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions app/src/main/java/com/junkfood/seal/util/UpdateUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,8 @@ object UpdateUtil {
return@withContext flow<DownloadStatus> { emit(DownloadStatus.Finished(context.getLatestApk())) }
}

val isArmArchSupported = Build.SUPPORTED_ABIS.contains(ARM32)
val is64BitsArchSupported = with(Build.SUPPORTED_ABIS) {
if (isArmArchSupported) contains(ARM64)
else contains(X64)
}
val preferredArch = if (is64BitsArchSupported) {
if (isArmArchSupported) ARM64 else X64
} else {
if (isArmArchSupported) ARM32 else X86
}
val abiList = Build.SUPPORTED_ABIS
val preferredArch = abiList.first() ?: ARM64

val targetUrl = latestRelease.assets?.find {
return@find it.name?.contains(preferredArch) ?: false
Expand Down

0 comments on commit 6a745a7

Please sign in to comment.