Browse Source

1.修改获取SN的方式。

master
wangwanlei 8 months ago
parent
commit
f87d4639b1
1 changed files with 6 additions and 4 deletions
  1. 6
    4
      app/src/main/java/com/xhly/manageapp/ManageApplication.kt

+ 6
- 4
app/src/main/java/com/xhly/manageapp/ManageApplication.kt View File

227
             if (ModelNameUtils.IS_LianxX505f()) {
227
             if (ModelNameUtils.IS_LianxX505f()) {
228
                 return csdkManager?.getDeviceInfo(type)
228
                 return csdkManager?.getDeviceInfo(type)
229
             }
229
             }
230
-            val serial = Build.SERIAL
230
+            val serial = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
231
+                Build.getSerial()
232
+            } else {
233
+               Build.SERIAL
234
+            }
231
             return if (serial.isNullOrBlank()) {
235
             return if (serial.isNullOrBlank()) {
232
-                "0"
236
+                ""
233
             } else {
237
             } else {
234
                 serial
238
                 serial
235
             }
239
             }
319
             // disableInstallation(false)
323
             // disableInstallation(false)
320
             setRuntimePermissions(true)
324
             setRuntimePermissions(true)
321
             enableAccessibility()
325
             enableAccessibility()
322
-            enableCaptureScreen(false)
323
-            disallowSetAutoRotation(true)
324
         }
326
         }
325
     }
327
     }
326
 
328
 

Loading…
Cancel
Save