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

Commit 42318204 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Update SurfaceView.getSurfaceControl documentation

Updates the javadoc to clarify that the returned SurfaceControl is only
valid between `surfaceCreated` and `surfaceDestroyed` callbacks, and
will be null otherwise.

Bug: 442013170
Flag: DOCS_ONLY
Test: presubmit
Change-Id: Ieed0f82b3335deda67a6717ced70143fac99f3c7
parent bb8c568f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2118,6 +2118,11 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
     * any {@link SurfaceControl.Transaction} to this SurfaceControl except for reparenting
     * child SurfaceControls. See: {@link SurfaceControl.Transaction#reparent}.
     *
     *  The SurfaceControl lifetime follows the SurfaceView's Surface lifetime. You should implement
     * {@link SurfaceHolder.Callback#surfaceCreated} and
     * {@link SurfaceHolder.Callback#surfaceDestroyed} to discover when the
     * SurfaceControl is valid. Outside of that, a {@code null} SurfaceControl will be returned.
     *
     * @return The SurfaceControl for this SurfaceView.
     */
    public SurfaceControl getSurfaceControl() {