Rom 判断逻辑是否可以优化 #110
liuchao0206
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
xCrash/xcrash_lib/src/main/java/xcrash/Util.java
Line 525 in 457066c
在
xCrash.init
初始化调用Util.getMobileModel()
获取设备机型信息时会针对 MIUI 系统有特有的获取逻辑,在判断是否为 MIUI 系统的Rom.isMiui()
方法中可能会多次执行getprop
命令,若在应用初始化的主线程中调用,多次的 IO 操作会产生一些耗时,在线上导致了一些卡顿上报,此处觉得可以优化一下,缓存第一次获取的结果,不用每次都执行一次Beta Was this translation helpful? Give feedback.
All reactions