BOOT TIMEOUT: forcing display enabled



http://stackoverflow.com/questions/31618101/android-custom-launcher-doesnt-stop-the-bootanimation




问题描述:


新开发的launcher,启动后20s左右没有反应,查看打印信息显示:


I/InputDispatcher( 2707): Dropped event because input dispatch is disabled.

W/WindowManager(  591): ***** BOOT TIMEOUT: forcing display enabled
I/PowerManagerService(  591): Boot animation finished.


解决方案:

禁用WallpaperService



Tracing the BOOT TIMEOUT problem, it comes from WindowManagerServiceperformEnableScreen() waiting for a wallpaper to be set/active, the boot isn't considered done otherwise:

            // If we are turning on the screen after the boot is completed
            // normally, don't do so until we have the application and
            // wallpaper.
            if (mSystemBooted && ((!haveApp && !haveKeyguard) ||
                    (wallpaperEnabled && !haveWallpaper))) {
                return;
            }

I also noticed that the wallpapers apks in packages/wallpapers are not built for the target because the bbbandroid repo lacks opengl support for now.

My current workaround for this problem is to disable the WallpaperService via its internal config.xml file:

diff --git a/frameworks/base/core/res/res/values/config.xml b/frameworks/base/core/res/res/values/config.xml
index 6efb4a4..0c873b7 100644
--- a/frameworks/base/core/res/res/values/config.xml
+++ b/frameworks/base/core/res/res/values/config.xml
@@ -701,7 +701,7 @@
     <string name="default_wallpaper_component" translatable="false">@null</string>

     <!-- True if WallpaperService is enabled -->
-    <bool name="config_enableWallpaperService">true</bool>
+    <bool name="config_enableWallpaperService">false</bool>

     <!-- Whether to enable network location overlay which allows network
          location provider to be replaced by an app at run-time. When disabled,

This solution works if you don't mind using modified android sources.



  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值