Loading core/java/android/view/ViewRootImpl.java +13 −3 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ import static com.android.window.flags.Flags.enableWindowContextResourcesUpdateO import static com.android.window.flags.Flags.predictiveBackSwipeEdgeNoneApi; import static com.android.window.flags.Flags.reduceChangedExclusionRectsMsgs; import static com.android.window.flags.Flags.setScPropertiesInClient; import static com.android.window.flags.Flags.fixViewRootCallTrace; import android.Manifest; import android.accessibilityservice.AccessibilityService; Loading Loading @@ -1590,7 +1591,9 @@ public final class ViewRootImpl implements ViewParent, mAttachInfo.mPanelParentWindowToken = panelParentView.getApplicationWindowToken(); } if (!fixViewRootCallTrace()) { mAdded = true; } int res; /* = WindowManagerImpl.ADD_OKAY; */ // Schedule the first layout -before- adding to the window Loading Loading @@ -1641,7 +1644,9 @@ public final class ViewRootImpl implements ViewParent, mTmpFrames.compatScale = compatScale[0]; mInvCompatScale = 1f / compatScale[0]; } catch (RemoteException | RuntimeException e) { if (!fixViewRootCallTrace()) { mAdded = false; } mView = null; mAttachInfo.mRootView = null; mFallbackEventHandler.setView(null); Loading Loading @@ -1672,7 +1677,9 @@ public final class ViewRootImpl implements ViewParent, if (DEBUG_LAYOUT) Log.v(mTag, "Added window " + mWindow); if (res < WindowManagerGlobal.ADD_OKAY) { mAttachInfo.mRootView = null; if (!fixViewRootCallTrace()) { mAdded = false; } mFallbackEventHandler.setView(null); unscheduleTraversals(); setAccessibilityFocus(null, null); Loading Loading @@ -1781,6 +1788,9 @@ public final class ViewRootImpl implements ViewParent, mFirstInputStage = nativePreImeStage; mFirstPostImeInputStage = earlyPostImeStage; mPendingInputEventQueueLengthCounterName = "aq:pending:" + counterSuffix; if (fixViewRootCallTrace()) { mAdded = true; } if (!mRemoved || !mAppVisible) { AnimationHandler.requestAnimatorsEnabled(mAppVisible, this); Loading core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -174,3 +174,14 @@ flag { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "fix_view_root_call_trace" description: "Do not set mAdded=true unless #setView finished successfully" bug: "385705687" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } Loading
core/java/android/view/ViewRootImpl.java +13 −3 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ import static com.android.window.flags.Flags.enableWindowContextResourcesUpdateO import static com.android.window.flags.Flags.predictiveBackSwipeEdgeNoneApi; import static com.android.window.flags.Flags.reduceChangedExclusionRectsMsgs; import static com.android.window.flags.Flags.setScPropertiesInClient; import static com.android.window.flags.Flags.fixViewRootCallTrace; import android.Manifest; import android.accessibilityservice.AccessibilityService; Loading Loading @@ -1590,7 +1591,9 @@ public final class ViewRootImpl implements ViewParent, mAttachInfo.mPanelParentWindowToken = panelParentView.getApplicationWindowToken(); } if (!fixViewRootCallTrace()) { mAdded = true; } int res; /* = WindowManagerImpl.ADD_OKAY; */ // Schedule the first layout -before- adding to the window Loading Loading @@ -1641,7 +1644,9 @@ public final class ViewRootImpl implements ViewParent, mTmpFrames.compatScale = compatScale[0]; mInvCompatScale = 1f / compatScale[0]; } catch (RemoteException | RuntimeException e) { if (!fixViewRootCallTrace()) { mAdded = false; } mView = null; mAttachInfo.mRootView = null; mFallbackEventHandler.setView(null); Loading Loading @@ -1672,7 +1677,9 @@ public final class ViewRootImpl implements ViewParent, if (DEBUG_LAYOUT) Log.v(mTag, "Added window " + mWindow); if (res < WindowManagerGlobal.ADD_OKAY) { mAttachInfo.mRootView = null; if (!fixViewRootCallTrace()) { mAdded = false; } mFallbackEventHandler.setView(null); unscheduleTraversals(); setAccessibilityFocus(null, null); Loading Loading @@ -1781,6 +1788,9 @@ public final class ViewRootImpl implements ViewParent, mFirstInputStage = nativePreImeStage; mFirstPostImeInputStage = earlyPostImeStage; mPendingInputEventQueueLengthCounterName = "aq:pending:" + counterSuffix; if (fixViewRootCallTrace()) { mAdded = true; } if (!mRemoved || !mAppVisible) { AnimationHandler.requestAnimatorsEnabled(mAppVisible, this); Loading
core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -174,3 +174,14 @@ flag { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "fix_view_root_call_trace" description: "Do not set mAdded=true unless #setView finished successfully" bug: "385705687" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } }