Android性能案例分析
一、如何避免重要app进程被系统lmk-lowmemorykiller杀掉
常见的低内存查杀的解决方案就是加白名单,避免系统省点精灵查杀
#setprop debug.whitelist.taskname com.android.launcher3
#getprop | grep white
// 内存压力
#mem-pressure
二、黑屏问题分析及解决案例
问题复现:
环境:AOSP14
操作要求:恢复出厂设置,启动模拟器
提问:
# emulator -wipe-data // 模拟器恢复出厂,黑5-6s
# emulator // 正常启动
解决要求:
优先使用考虑使用Winscope 寻找原因?为啥看不到壁纸画面,是什么时机设置的图层参数无法看到壁纸?
fallbackhome闪黑问题:
修改方案1:bootanimation延长消失时间
等到launcher启动绘制后再消失
问题就是规避了问题,但是开机动画时间较长