Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60a65025 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix SurfaceView callback timings" into sc-dev

parents d765a063 8685ce1d
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -2854,7 +2854,6 @@ public final class ViewRootImpl implements ViewParent,
                            return;
                        }
                    }
                    notifySurfaceCreated();
                } else if (surfaceDestroyed) {
                    // If the surface has been removed, then reset the scroll
                    // positions.
@@ -2894,10 +2893,6 @@ public final class ViewRootImpl implements ViewParent,
                    }
                }

                if (!surfaceCreated && surfaceReplaced) {
                    notifySurfaceReplaced();
                }

                if (mDragResizing != dragResizing) {
                    if (dragResizing) {
                        mResizeMode = freeformResizing
@@ -3110,7 +3105,14 @@ public final class ViewRootImpl implements ViewParent,
            }
        }

        if (surfaceDestroyed) {
        // These callbacks will trigger SurfaceView SurfaceHolder.Callbacks and must be invoked
        // after the measure pass. If its invoked before the measure pass and the app modifies
        // the view hierarchy in the callbacks, we could leave the views in a broken state.
        if (surfaceCreated) {
            notifySurfaceCreated();
        } else if (surfaceReplaced) {
            notifySurfaceReplaced();
        } else if (surfaceDestroyed)  {
            notifySurfaceDestroyed();
        }