|
@@ -191,21 +191,21 @@ fun getSN(): String {
|
|
|
|
|
|
|
|
|
|
|
|
-// return "017A10390020123010190001"
|
|
|
-
|
|
|
- //通过反射获取sn号
|
|
|
- try {
|
|
|
- val c = Class.forName("android.os.SystemProperties")
|
|
|
- val get = c.getMethod("get", String::class.java)
|
|
|
- serial = get.invoke(c, "ro.serialno") as String
|
|
|
- if (serial != "" && serial != "unknown") return serial
|
|
|
-
|
|
|
- //9.0及以上无法获取到sn,此方法为补充,能够获取到多数高版本手机 sn
|
|
|
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) serial = Build.getSerial()
|
|
|
- } catch (e: java.lang.Exception) {
|
|
|
- serial = "unknown"
|
|
|
- }
|
|
|
- return serial
|
|
|
+ return "010D10390020123010190001"
|
|
|
+
|
|
|
+// //通过反射获取sn号
|
|
|
+// try {
|
|
|
+// val c = Class.forName("android.os.SystemProperties")
|
|
|
+// val get = c.getMethod("get", String::class.java)
|
|
|
+// serial = get.invoke(c, "ro.serialno") as String
|
|
|
+// if (serial != "" && serial != "unknown") return serial
|
|
|
+//
|
|
|
+// //9.0及以上无法获取到sn,此方法为补充,能够获取到多数高版本手机 sn
|
|
|
+// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) serial = Build.getSerial()
|
|
|
+// } catch (e: java.lang.Exception) {
|
|
|
+// serial = "unknown"
|
|
|
+// }
|
|
|
+// return serial
|
|
|
}
|
|
|
|
|
|
fun ImageView.load(data: Any?) {
|