This commit is contained in:
wangcongtao
2020-07-17 14:41:44 +08:00
parent 21c035e617
commit 0e960be1f9
4 changed files with 14 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import android.telephony.CellLocation;
import android.telephony.TelephonyManager;
import android.telephony.cdma.CdmaCellLocation;
import android.telephony.gsm.GsmCellLocation;
import android.text.TextUtils;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -55,11 +56,16 @@ public class Utils {
public static final String GET = "get";
public static final String GSM_SERIAL = "gsm.serial";
public static final String BYD_SERIAL = "ro.serialno";
public static final String FOTA_VERSION = "ro.fota.version";
public static final String PROPERTIES = "android.os.SystemProperties";
public static String getSn() {
return getSystemProperties( GSM_SERIAL );
String sn = getSystemProperties( GSM_SERIAL );
if ( TextUtils.isEmpty( sn ) ) {
sn = getSystemProperties( BYD_SERIAL );
}
return sn;
}
public static String getFotaVersion() {