I have an application where in onCreate() function heavy operation is performed. Thus when we launched an application, it displays white screen and then display the webview.
Now client pressed the home screen when white screen is displayed. In this scenario, launcher is not displayed. The page is still in white screen.
In log,
05-04 17:36:06.237 2841 16533 I WindowManager: Not displayed: s=Surface(name=com.android.launcher/com.android.launcher3.Launcher)/@0x228707a pv=true mDrawState=1 ph=false th=false a=true
I have framework source code,
path: frameworks/base/services/core/java/com/android/server/wm/AppWindowToken.java
boolean updateDrawnWindowStates(WindowState w) {
..............
if (!allDrawn && w.mightAffectAllDrawn()) {
if (DEBUG_VISIBILITY || DEBUG_ORIENTATION) {
Slog.v(TAG, "Eval win " + w + ": isDrawn=" + w.isDrawnLw()
+ ", isAnimationSet=" + isSelfAnimating());
if (!w.isDrawnLw()) {
Slog.v(TAG, "Not displayed: s=" + winAnimator.mSurfaceController
+ " pv=" + w.isVisibleByPolicy()
+ " mDrawState=" + winAnimator.drawStateToString()
+ " ph=" + w.isParentWindowHidden() + " th=" + hiddenRequested
+ " a=" + isSelfAnimating());
}
}
Kindly let me know how to redirect to homescreen when home button is pressed during blank screen or white screen.