W/WindowManager( 591): ***** BOOT TIMEOUT: forcing display enabled

来源:互联网 发布:淘宝上买彩票 编辑:程序博客网 时间:2024/05/22 01:30
转载地址:http://blog.csdn.net/u012587637/article/details/48289189

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:

[java] view plain copy
  1. // If we are turning on the screen after the boot is completed  
  2. // normally, don't do so until we have the application and  
  3. // wallpaper.  
  4. if (mSystemBooted && ((!haveApp && !haveKeyguard) ||  
  5.         (wallpaperEnabled && !haveWallpaper))) {  
  6.     return;  
  7. }  

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:

[html] view plain copy
  1. diff --git a/frameworks/base/core/res/res/values/config.xml b/frameworks/base/core/res/res/values/config.xml  
  2. index 6efb4a4..0c873b7 100644  
  3. --- a/frameworks/base/core/res/res/values/config.xml  
  4. +++ b/frameworks/base/core/res/res/values/config.xml  
  5. @@ -701,7 +701,7 @@  
  6.      <string name="default_wallpaper_component" translatable="false">@null</string>  
  7.   
  8.      <!-- True if WallpaperService is enabled -->  
  9. -    <bool name="config_enableWallpaperService">true</bool>  
  10. +    <bool name="config_enableWallpaperService">false</bool>  
  11.   
  12.      <!-- Whether to enable network location overlay which allows network  
  13.           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.


原创粉丝点击