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

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

Merge "Add missing @NonNull"

parents c0903da3 4a6f2c59
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -50234,14 +50234,14 @@ package android.view {
  }
  }
  public static interface SurfaceHolder.Callback {
  public static interface SurfaceHolder.Callback {
    method public void surfaceChanged(android.view.SurfaceHolder, int, int, int);
    method public void surfaceChanged(@NonNull android.view.SurfaceHolder, int, @IntRange(from=0) int, @IntRange(from=0) int);
    method public void surfaceCreated(android.view.SurfaceHolder);
    method public void surfaceCreated(@NonNull android.view.SurfaceHolder);
    method public void surfaceDestroyed(android.view.SurfaceHolder);
    method public void surfaceDestroyed(@NonNull android.view.SurfaceHolder);
  }
  }
  public static interface SurfaceHolder.Callback2 extends android.view.SurfaceHolder.Callback {
  public static interface SurfaceHolder.Callback2 extends android.view.SurfaceHolder.Callback {
    method public void surfaceRedrawNeeded(android.view.SurfaceHolder);
    method public void surfaceRedrawNeeded(@NonNull android.view.SurfaceHolder);
    method public default void surfaceRedrawNeededAsync(android.view.SurfaceHolder, Runnable);
    method public default void surfaceRedrawNeededAsync(@NonNull android.view.SurfaceHolder, @NonNull Runnable);
  }
  }
  public class SurfaceView extends android.view.View {
  public class SurfaceView extends android.view.View {
+11 −7
Original line number Original line Diff line number Diff line
@@ -16,7 +16,10 @@


package android.view;
package android.view;


import android.annotation.IntRange;
import android.annotation.NonNull;
import android.graphics.Canvas;
import android.graphics.Canvas;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.Rect;


/**
/**
@@ -76,7 +79,7 @@ public interface SurfaceHolder {
         *
         *
         * @param holder The SurfaceHolder whose surface is being created.
         * @param holder The SurfaceHolder whose surface is being created.
         */
         */
        public void surfaceCreated(SurfaceHolder holder);
        void surfaceCreated(@NonNull SurfaceHolder holder);


        /**
        /**
         * This is called immediately after any structural changes (format or
         * This is called immediately after any structural changes (format or
@@ -85,12 +88,12 @@ public interface SurfaceHolder {
         * once, after {@link #surfaceCreated}.
         * once, after {@link #surfaceCreated}.
         *
         *
         * @param holder The SurfaceHolder whose surface has changed.
         * @param holder The SurfaceHolder whose surface has changed.
         * @param format The new PixelFormat of the surface.
         * @param format The new {@link PixelFormat} of the surface.
         * @param width The new width of the surface.
         * @param width The new width of the surface.
         * @param height The new height of the surface.
         * @param height The new height of the surface.
         */
         */
        public void surfaceChanged(SurfaceHolder holder, int format, int width,
        void surfaceChanged(@NonNull SurfaceHolder holder, @PixelFormat.Format int format,
                int height);
                @IntRange(from = 0) int width, @IntRange(from = 0) int height);


        /**
        /**
         * This is called immediately before a surface is being destroyed. After
         * This is called immediately before a surface is being destroyed. After
@@ -101,7 +104,7 @@ public interface SurfaceHolder {
         *
         *
         * @param holder The SurfaceHolder whose surface is being destroyed.
         * @param holder The SurfaceHolder whose surface is being destroyed.
         */
         */
        public void surfaceDestroyed(SurfaceHolder holder);
        void surfaceDestroyed(@NonNull SurfaceHolder holder);
    }
    }


    /**
    /**
@@ -122,7 +125,7 @@ public interface SurfaceHolder {
         *
         *
         * @param holder The SurfaceHolder whose surface has changed.
         * @param holder The SurfaceHolder whose surface has changed.
         */
         */
        void surfaceRedrawNeeded(SurfaceHolder holder);
        void surfaceRedrawNeeded(@NonNull SurfaceHolder holder);


        /**
        /**
         * An alternative to surfaceRedrawNeeded where it is not required to block
         * An alternative to surfaceRedrawNeeded where it is not required to block
@@ -140,7 +143,8 @@ public interface SurfaceHolder {
         * from any thread.
         * from any thread.
         *
         *
         */
         */
        default void surfaceRedrawNeededAsync(SurfaceHolder holder, Runnable drawingFinished) {
        default void surfaceRedrawNeededAsync(@NonNull SurfaceHolder holder,
                @NonNull Runnable drawingFinished) {
            surfaceRedrawNeeded(holder);
            surfaceRedrawNeeded(holder);
            drawingFinished.run();
            drawingFinished.run();
        }
        }