[SHARED] Update libs
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
[versions]
|
||||
androidGradlePlugin = "9.1.0"
|
||||
androidxActivity = "1.12.4"
|
||||
androidxActivity = "1.13.0"
|
||||
androidxArchCoreTesting = "2.2.0"
|
||||
androidxCore = "1.17.0"
|
||||
androidxCore = "1.18.0"
|
||||
androidxCoreSpalshscreen = "1.2.0"
|
||||
androidxDatastorePreferences = "1.2.0"
|
||||
androidxDatastorePreferences = "1.2.1"
|
||||
androidxEspresso = "3.7.0"
|
||||
androidxOrchestrator = "1.6.1"
|
||||
androidxTestCore = "1.7.0"
|
||||
@@ -13,7 +13,7 @@ androidxTestRules = "1.7.0"
|
||||
androidxTestRunner = "1.7.0"
|
||||
androidxTv = "1.0.1"
|
||||
androidxWear = "1.5.6"
|
||||
baselineprofile = "1.5.0-alpha03"
|
||||
baselineprofile = "1.5.0-alpha04"
|
||||
benchmarkMacroJunit4 = "1.4.1"
|
||||
coil = "3.4.0"
|
||||
composeAdaptive = "1.2.0"
|
||||
@@ -23,7 +23,7 @@ composeLifecycle = "2.9.6"
|
||||
composeMultiplatform = "1.10.2"
|
||||
composeMaterial3 = "1.9.0"
|
||||
composeNavigation = "2.9.2"
|
||||
composeUiTest = "1.10.4"
|
||||
composeUiTest = "1.10.5"
|
||||
dependencyUpdate = "0.53.0"
|
||||
horologist = "0.7.15"
|
||||
imageio = "3.13.1"
|
||||
|
||||
+36
-45
@@ -360,8 +360,7 @@ actual class HardwareDataProvider actual constructor() : KoinComponent {
|
||||
File(filePath).readLines().firstOrNull()?.let {
|
||||
functionsList.add(ItemValue.NameResource(Res.string.wifi_mac, it))
|
||||
}
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
} catch (_: Exception) {}
|
||||
|
||||
// IR
|
||||
val irManager =
|
||||
@@ -384,12 +383,14 @@ actual class HardwareDataProvider actual constructor() : KoinComponent {
|
||||
add(ItemValue.NameResource(Res.string.cellular, ""))
|
||||
|
||||
// Phone type
|
||||
@Suppress("DEPRECATION") val phoneType = when (telephonyManager.phoneType) {
|
||||
TelephonyManager.PHONE_TYPE_GSM -> "GSM"
|
||||
TelephonyManager.PHONE_TYPE_CDMA -> "CDMA"
|
||||
TelephonyManager.PHONE_TYPE_SIP -> "SIP"
|
||||
else -> null
|
||||
}
|
||||
@Suppress("DEPRECATION")
|
||||
val phoneType =
|
||||
when (telephonyManager.phoneType) {
|
||||
TelephonyManager.PHONE_TYPE_GSM -> "GSM"
|
||||
TelephonyManager.PHONE_TYPE_CDMA -> "CDMA"
|
||||
TelephonyManager.PHONE_TYPE_SIP -> "SIP"
|
||||
else -> null
|
||||
}
|
||||
if (phoneType != null) {
|
||||
add(ItemValue.NameResource(Res.string.cellular_phone_type, phoneType))
|
||||
}
|
||||
@@ -407,17 +408,18 @@ actual class HardwareDataProvider actual constructor() : KoinComponent {
|
||||
}
|
||||
|
||||
// SIM state
|
||||
val simStateRes = when (telephonyManager.simState) {
|
||||
TelephonyManager.SIM_STATE_READY -> Res.string.cellular_sim_ready
|
||||
TelephonyManager.SIM_STATE_ABSENT -> Res.string.cellular_sim_absent
|
||||
TelephonyManager.SIM_STATE_PIN_REQUIRED,
|
||||
TelephonyManager.SIM_STATE_PUK_REQUIRED -> Res.string.cellular_sim_locked
|
||||
val simStateRes =
|
||||
when (telephonyManager.simState) {
|
||||
TelephonyManager.SIM_STATE_READY -> Res.string.cellular_sim_ready
|
||||
TelephonyManager.SIM_STATE_ABSENT -> Res.string.cellular_sim_absent
|
||||
TelephonyManager.SIM_STATE_PIN_REQUIRED,
|
||||
TelephonyManager.SIM_STATE_PUK_REQUIRED -> Res.string.cellular_sim_locked
|
||||
|
||||
TelephonyManager.SIM_STATE_NETWORK_LOCKED ->
|
||||
Res.string.cellular_sim_network_locked
|
||||
TelephonyManager.SIM_STATE_NETWORK_LOCKED ->
|
||||
Res.string.cellular_sim_network_locked
|
||||
|
||||
else -> Res.string.unknown
|
||||
}
|
||||
else -> Res.string.unknown
|
||||
}
|
||||
add(ItemValue.NameValueResource(Res.string.cellular_sim_state, simStateRes))
|
||||
|
||||
// Network country
|
||||
@@ -434,12 +436,7 @@ actual class HardwareDataProvider actual constructor() : KoinComponent {
|
||||
// SIM country
|
||||
val simCountry = telephonyManager.simCountryIso
|
||||
if (!simCountry.isNullOrEmpty()) {
|
||||
add(
|
||||
ItemValue.NameResource(
|
||||
Res.string.cellular_sim_country,
|
||||
simCountry.uppercase(),
|
||||
)
|
||||
)
|
||||
add(ItemValue.NameResource(Res.string.cellular_sim_country, simCountry.uppercase()))
|
||||
}
|
||||
|
||||
// MCC/MNC
|
||||
@@ -450,32 +447,28 @@ actual class HardwareDataProvider actual constructor() : KoinComponent {
|
||||
}
|
||||
|
||||
// Data state
|
||||
val dataStateRes = when (telephonyManager.dataState) {
|
||||
TelephonyManager.DATA_CONNECTED -> Res.string.cellular_data_connected
|
||||
TelephonyManager.DATA_CONNECTING -> Res.string.cellular_data_connecting
|
||||
TelephonyManager.DATA_DISCONNECTED -> Res.string.cellular_data_disconnected
|
||||
TelephonyManager.DATA_SUSPENDED -> Res.string.cellular_data_suspended
|
||||
else -> Res.string.unknown
|
||||
}
|
||||
val dataStateRes =
|
||||
when (telephonyManager.dataState) {
|
||||
TelephonyManager.DATA_CONNECTED -> Res.string.cellular_data_connected
|
||||
TelephonyManager.DATA_CONNECTING -> Res.string.cellular_data_connecting
|
||||
TelephonyManager.DATA_DISCONNECTED -> Res.string.cellular_data_disconnected
|
||||
TelephonyManager.DATA_SUSPENDED -> Res.string.cellular_data_suspended
|
||||
else -> Res.string.unknown
|
||||
}
|
||||
add(ItemValue.NameValueResource(Res.string.cellular_data_state, dataStateRes))
|
||||
|
||||
// Network type (requires READ_PHONE_STATE on API 30-32,
|
||||
// auto-granted READ_BASIC_PHONE_STATE on API 33+)
|
||||
try {
|
||||
val networkType = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
telephonyManager.dataNetworkType
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
telephonyManager.networkType
|
||||
}
|
||||
val networkType =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
telephonyManager.dataNetworkType
|
||||
} else {
|
||||
@Suppress("DEPRECATION") telephonyManager.networkType
|
||||
}
|
||||
val networkTypeName = getNetworkTypeName(networkType)
|
||||
if (networkTypeName != null) {
|
||||
add(
|
||||
ItemValue.NameResource(
|
||||
Res.string.cellular_network_type,
|
||||
networkTypeName,
|
||||
)
|
||||
)
|
||||
add(ItemValue.NameResource(Res.string.cellular_network_type, networkTypeName))
|
||||
}
|
||||
} catch (_: SecurityException) {
|
||||
// READ_PHONE_STATE not granted
|
||||
@@ -505,9 +498,7 @@ actual class HardwareDataProvider actual constructor() : KoinComponent {
|
||||
ItemValue.ValueResource(
|
||||
"eSIM",
|
||||
getYesNoStringResource(
|
||||
packageManager.hasSystemFeature(
|
||||
PackageManager.FEATURE_TELEPHONY_EUICC
|
||||
)
|
||||
packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_EUICC)
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user