mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
incorporate androidlib
This commit is contained in:
parent
20cf3f0825
commit
5eb5cd1421
63 changed files with 1451 additions and 108 deletions
24
app/src/main/java/com/geeksville/mesh/android/BuildUtils.kt
Normal file
24
app/src/main/java/com/geeksville/mesh/android/BuildUtils.kt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package com.geeksville.mesh.android
|
||||
|
||||
import android.os.Build
|
||||
|
||||
/**
|
||||
* Created by kevinh on 1/14/16.
|
||||
*/
|
||||
object BuildUtils : Logging {
|
||||
|
||||
fun is64Bit(): Boolean {
|
||||
if (Build.VERSION.SDK_INT < 21)
|
||||
return false
|
||||
else
|
||||
return Build.SUPPORTED_64_BIT_ABIS.size > 0
|
||||
}
|
||||
|
||||
fun isBuggyMoto(): Boolean {
|
||||
debug("Device type is: ${Build.DEVICE}")
|
||||
return Build.DEVICE == "osprey_u2" // Moto G
|
||||
}
|
||||
|
||||
/// Are we running on the emulator?
|
||||
val isEmulator get() = Build.MODEL == "Android SDK built for x86" || Build.MODEL == "sdk_gphone_x86" || Build.MODEL == "Android SDK built for x86_64"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue