0
0
mirror of https://git.code.sf.net/p/opencamera/code.git synced 2024-09-19 19:42:29 +02:00

Fix warnings.

This commit is contained in:
Mark Harman 2024-05-08 22:44:04 +01:00
parent db43895d31
commit 91cd69706a
3 changed files with 7 additions and 3 deletions

View File

@ -5321,7 +5321,7 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen
*/
private class MyGestureDetector extends SimpleOnGestureListener {
@Override
public boolean onFling(@NonNull MotionEvent e1, @NonNull MotionEvent e2, float velocityX, float velocityY) {
public boolean onFling(MotionEvent e1, @NonNull MotionEvent e2, float velocityX, float velocityY) {
try {
if( MyDebug.LOG )
Log.d(TAG, "from " + e1.getX() + " , " + e1.getY() + " to " + e2.getX() + " , " + e2.getY());

View File

@ -7,6 +7,8 @@ import android.os.Handler;
import android.util.Log;
import android.view.View;
import androidx.annotation.NonNull;
/** View for on top of the Preview - this just redirects to Preview.onDraw to do the
* work. Only used if using a MyTextureView (if using MySurfaceView, then that
* class can handle the onDraw()). TextureViews can't be used for both a
@ -42,7 +44,7 @@ public class CanvasView extends View {
}
@Override
public void onDraw(Canvas canvas) {
public void onDraw(@NonNull Canvas canvas) {
/*if( MyDebug.LOG )
Log.d(TAG, "onDraw()");*/
preview.draw(canvas);

View File

@ -16,6 +16,8 @@ import android.view.MotionEvent;
import android.view.SurfaceView;
import android.view.View;
import androidx.annotation.NonNull;
/** Provides support for the surface used for the preview, using a SurfaceView.
*/
public class MySurfaceView extends SurfaceView implements CameraSurface {
@ -82,7 +84,7 @@ public class MySurfaceView extends SurfaceView implements CameraSurface {
}
@Override
public void onDraw(Canvas canvas) {
public void onDraw(@NonNull Canvas canvas) {
preview.draw(canvas);
}