首页 > 其他分享 >BOOT TIMEOUT: forcing display enabled

BOOT TIMEOUT: forcing display enabled

时间:2022-12-11 21:31:55浏览次数:59  
标签:xml core enabled BOOT frameworks base res forcing config

 

​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.

标签:xml,core,enabled,BOOT,frameworks,base,res,forcing,config
From: https://blog.51cto.com/u_13316945/5928717

相关文章