After the phone power on , the screen will be black about 1s,then appear lockscreen
开机后,进入锁屏界面会闪黑一下,谷歌机器没有出现这个问题
1、此问题需要AMS/WMS的log才能继续分析,需按照如下方式打开AMS/WMS的debug开关:
adb shell dumpsys activity log x on
adb shell dumpsys window -d enable a
此命令只对当前次开机有效,关机或者重启失效,需要重新执行。
如果不能执行AMS/WMS的debug命令,请将ActivityManagerDebugConfig.java和WindowManagerDebugConfig.java的DEBUG_XXXX以及SHOW_XXXX全部设置成true,然后build。
2、录制视频请参考以下的方式录制:
adb shell screenrecord --bugreport /sdcard/filename.mp4
adb pull /sdcard/filename.mp4
3.请先按照第2步的方法修改代码,若还是复现,则按照第1步的方法打开debug开关
1).将Wallpaper相关的debug开关打开,将DEBUG设置为true
/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/ImageWallpaper.java
/frameworks/base/core/java/android/service/wallpaper/WallpaperService.java
/frameworks/base/core/java/com/android/internal/view/BaseSurfaceHolder.java
/frameworks/base/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
如何打开WMS debug开关请参考:[FAQ18375]分析windowManagerService相关的问题,需要提交哪些log给MTK?
访问FAQ的网站是http://online.mediatek.inc/_layouts/15/mol/ui/ext/home.aspx2).请贵司将如下方法的异步改为同步进行测试(目的是将异步改为同步,如果编译过程中出现异常,还请贵司看一下源代码修改一下)
/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/ImageWallpaper.java
private void loadWallpaper(boolean needsDraw, boolean needsReset) {
mNeedsDrawAfterLoadingWallpaper |= needsDraw;
if(!loadWallpaperPending){
loadWallpaperPending = true;
mBackground = null;
mBackgroundWidth = -1;
mBackgroundHeight = -1;
Bitmap bt = null;
Throwable exception = null;
try {
if (needsReset) {
mWallpaperManager.forgetLoadedWallpaper();
}
bt = mWallpaperManager.getBitmap();
} catch (RuntimeException | OutOfMemoryError e) {
exception = e;
}
if (exception != null) {
// Note that if we do fail at this, and the default wallpaper can't
// be loaded, we will go into a cycle. Don't do a build where the
// default wallpaper can't be loaded.
Log.w(TAG, "Unable to load wallpaper!", exception);
try {
mWallpaperManager.clear();
} catch (IOException ex) {
// now we're really screwed.
Log.w(TAG, "Unable reset to default wallpaper!", ex);
}
try {
bt = mWallpaperManager.getBitmap();
} catch (RuntimeException | OutOfMemoryError e) {
Log.w(TAG, "Unable to load default wallpaper!", e);
}
}
if (bt != null) {
mBackground = bt;
mBackgroundWidth = mBackground.getWidth();
mBackgroundHeight = mBackground.getHeight();
}
loadWallpaperPending = false;
if (DEBUG) {
Log.d(TAG, "Wallpaper loaded: " + mBackground);
}
updateSurfaceSize(getSurfaceHolder(), getDefaultDisplayInfo(),
false /* forDraw */);
if (needsDraw) {
drawFrame();
}
}else{
if (DEBUG) {
Log.d(TAG, "Skipping loadWallpaper, already in flight ");
}
return;
}
}
希望对你有所帮助~