diff options
| author | John Reck <jreck@google.com> | 2019-10-16 16:17:17 -0700 |
|---|---|---|
| committer | John Reck <jreck@google.com> | 2019-10-17 17:21:29 +0000 |
| commit | 4a6f2c59c0a542baad78240a9cdd93bab778f2b2 (patch) | |
| tree | ef09540741527824742d5960c2e4fc0caf548e7f /core/java/android | |
| parent | 3441faa0453907f8713ebccfa33049c2e99e4fe6 (diff) | |
Add missing @NonNull
Test: builds
Bug: 142875299
Change-Id: I7a8d6edcc83175c48948de0295c312494141a147
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/SurfaceHolder.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/core/java/android/view/SurfaceHolder.java b/core/java/android/view/SurfaceHolder.java index 2fd2e966dc38..c5d45c318f67 100644 --- a/core/java/android/view/SurfaceHolder.java +++ b/core/java/android/view/SurfaceHolder.java @@ -16,7 +16,10 @@ package android.view; +import android.annotation.IntRange; +import android.annotation.NonNull; import android.graphics.Canvas; +import android.graphics.PixelFormat; import android.graphics.Rect; /** @@ -76,7 +79,7 @@ public interface SurfaceHolder { * * @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 @@ -85,12 +88,12 @@ public interface SurfaceHolder { * once, after {@link #surfaceCreated}. * * @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 height The new height of the surface. */ - public void surfaceChanged(SurfaceHolder holder, int format, int width, - int height); + void surfaceChanged(@NonNull SurfaceHolder holder, @PixelFormat.Format int format, + @IntRange(from = 0) int width, @IntRange(from = 0) int height); /** * 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. */ - 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. */ - void surfaceRedrawNeeded(SurfaceHolder holder); + void surfaceRedrawNeeded(@NonNull SurfaceHolder holder); /** * An alternative to surfaceRedrawNeeded where it is not required to block @@ -140,7 +143,8 @@ public interface SurfaceHolder { * from any thread. * */ - default void surfaceRedrawNeededAsync(SurfaceHolder holder, Runnable drawingFinished) { + default void surfaceRedrawNeededAsync(@NonNull SurfaceHolder holder, + @NonNull Runnable drawingFinished) { surfaceRedrawNeeded(holder); drawingFinished.run(); } |
