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,9 +227,13 @@ class ManageApplication : MultiDexApplication() {
227 227
             if (ModelNameUtils.IS_LianxX505f()) {
228 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 235
             return if (serial.isNullOrBlank()) {
232
-                "0"
236
+                ""
233 237
             } else {
234 238
                 serial
235 239
             }
@@ -319,8 +323,6 @@ class ManageApplication : MultiDexApplication() {
319 323
             // disableInstallation(false)
320 324
             setRuntimePermissions(true)
321 325
             enableAccessibility()
322
-            enableCaptureScreen(false)
323
-            disallowSetAutoRotation(true)
324 326
         }
325 327
     }
326 328
 

Loading…
Cancel
Save