您的位置:首页 > 其它

[FAQ18051]M版本开机时间优化

2016-07-22 14:56 288 查看
[FAQ18051]M版本开机时间优化

[DESCRIPTION]

在升级到M版本之后,谷歌在camera新增了一个叫“media.camera.proxy”的service,在开机过程中会去连接该service。
当连接不上时会try 5次,持续5秒左右。影响开机的performance。

如下是连接不上的Log:

01940 01-01 08:35:59.563987 222 222 I ServiceManager: Waiting for service media.camera.proxy...
02086 01-01 08:36:00.564399 222 222 I ServiceManager: Waiting for service media.camera.proxy...
02294 01-01 08:36:01.564777 222 222 I ServiceManager: Waiting for service media.camera.proxy...
02387 01-01 08:36:02.565194 222 222 I ServiceManager: Waiting for service media.camera.proxy...
02494 01-01 08:36:03.565630 222 222 I ServiceManager: Waiting for service media.camera.proxy...

[SOLUTION]

可以打开/frameworks/av/services/camera/libcameraservice/CameraService.cpp
找到pingCameraServiceProxy这个函数


sp<IBinder> binder = sm->getService(String16("media.camera.proxy"));

改为

sp<IBinder> binder = sm->checkService(String16("media.camera.proxy"));
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息