Update a few things

This commit is contained in:
2025-08-07 19:01:52 -07:00
parent e52e2f76fe
commit 4cd4b7e0ef
6 changed files with 9 additions and 10 deletions

View File

@@ -19,8 +19,8 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import dev.oxmc.androiddevicenames.DeviceInfo
import dev.oxmc.androiddevicenames.AndroidInfo
import dev.oxmc.androiddeviceinfo.DeviceInfo
import dev.oxmc.androiddeviceinfo.AndroidInfo
import dev.oxmc.androiddeviceinfo_demo.ui.theme.AndroidDeviceInfoTheme
import kotlinx.coroutines.launch
@@ -66,12 +66,13 @@ fun DeviceInfoScreen() {
androidVersion = "${AndroidInfo.Version.release} (SDK ${AndroidInfo.Version.sdkInt})"
serial = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
@Suppress("DEPRECATION")
Build.SERIAL.takeIf { it != Build.UNKNOWN }
?: Settings.Secure.getString(context.contentResolver, Settings.Secure.ANDROID_ID)
} else {
try {
Build.getSerial()
} catch (e: SecurityException) {
} catch (_: SecurityException) {
Settings.Secure.getString(context.contentResolver, Settings.Secure.ANDROID_ID)
}
}

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
package dev.oxmc.androiddevicenames
package dev.oxmc.androiddeviceinfo
object AltDeviceNames {
/**

View File

@@ -1,4 +1,4 @@
package dev.oxmc.androiddevicenames
package dev.oxmc.androiddeviceinfo
import android.content.Context
import android.os.Build

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
package dev.oxmc.androiddevicenames
package dev.oxmc.androiddeviceinfo
import android.content.Context
import android.database.SQLException

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
package dev.oxmc.androiddevicenames
package dev.oxmc.androiddeviceinfo
import android.content.Context
import android.os.Build

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
package dev.oxmc.androiddevicenames
package dev.oxmc.androiddeviceinfo
import android.content.Context
import android.os.Build
@@ -75,8 +75,6 @@ object AndroidDeviceInfo {
model
}
//Log.i("DeviceInfo", "Device name: $finalDeviceName, codename: $codename, model: $model, manufacturer: $manufacturer")
return DeviceInfo(manufacturer, finalDeviceName, codename, model)
}