Skip to content

Commit

Permalink
revert to BuildConfig, fix init sequence problems
Browse files Browse the repository at this point in the history
  • Loading branch information
hg42 committed Oct 25, 2024
1 parent 60a529c commit afd12dc
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/main/java/com/machiav3lli/backup/utils/SystemUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,15 @@ object SystemUtils {
return null
}

val packageName = com.machiav3lli.backup.BuildConfig.APPLICATION_ID
val packageName get() = com.machiav3lli.backup.BuildConfig.APPLICATION_ID
@Suppress("DEPRECATION")
val versionCode = if (OABX.minSDK(28)) {
OABX.context.getApplicationInfos()?.longVersionCode
} else {
OABX.context.getApplicationInfos()?.versionCode
} ?: com.machiav3lli.backup.BuildConfig.VERSION_CODE
val versionName = OABX.context.getApplicationInfos()?.versionName ?: com.machiav3lli.backup.BuildConfig.VERSION_NAME
val updateId = "${OABX.context.getApplicationInfos()?.lastUpdateTime?.toString()}-${versionName}"
val versionCode get() = com.machiav3lli.backup.BuildConfig.VERSION_CODE
val versionName get() = com.machiav3lli.backup.BuildConfig.VERSION_NAME
val updateId get() = "${OABX.context.getApplicationInfos()?.lastUpdateTime?.toString()}-${versionName}"

val applicationIssuer = OABX.context.getApplicationIssuer() ?: "UNKNOWN ISSUER"
val applicationIssuer get() = OABX.context.getApplicationIssuer() ?: "UNKNOWN ISSUER"

val numCores = Runtime.getRuntime().availableProcessors()
val numCores get() = Runtime.getRuntime().availableProcessors()

suspend fun <T> runParallel(
items: List<T>,
Expand Down

0 comments on commit afd12dc

Please sign in to comment.