Android性能优化 2021-06-01 ANR问题分析和解决 ANR类型按键或触摸事件在特定时间内无响应1234//ActivityTaskManagerService.java// How long we wait until we timeout on key dispatching.public static final int KEY_DISPATCHING_TIMEOUT_MS = 5 * 1000; BroadcastRecevier超时12345//ActivityManagerService.java// How long we allow a receiver to run before giving up on it.static final int BROADCAST_FG_TIMEOUT = 10*1000;static final int BROADCAST_BG_TIMEOUT = 60*1000; 前台广播超时时间是 10s,后台广播超时是 60s,这类超时没有提示框弹出。 Read More
Android性能优化 2021-06-01 启动速度优化 启动流程应用的启动流程如下: SystemServer 负责应用的启动流程调度、进程的创建和管理、 窗口的创建和管理(StartingWindow 和 AppWindow) 等 应用进程被 SystemServer 创建后,进行一系列的进程初始化、 组件初始化(Activity、Service、ContentProvider、Broadcast)、 主界面的构建、内容填充等 Read More
Android未分类 2021-06-01 adb工具 查询设备 12345adb devicesList of devices attachedemulator-5554 deviceemulator-5556 deviceemulator-5558 device 将命令发送至特定设备 12adb -s serial_number commandadb -s emulator-5556 install helloWorld.apk Read More