|
@@ -6,6 +6,7 @@ import android.content.Context;
|
|
|
import android.content.pm.PackageInfo;
|
|
|
import android.content.pm.PackageManager;
|
|
|
import android.os.Build;
|
|
|
+import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
|
|
|
import java.lang.reflect.Method;
|
|
@@ -47,6 +48,17 @@ public final class DeviceUtils {
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ // 兼容版本11的紫鹏
|
|
|
+ if (TextUtils.isEmpty(serial)) {
|
|
|
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
|
+ serial = Build.getSerial();
|
|
|
+ }else{
|
|
|
+ serial = Build.SERIAL;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return serial;
|
|
|
}
|
|
|
|