mirror of
https://git.code.sf.net/p/opencamera/code.git
synced 2024-09-20 03:52:26 +02:00
Fix warnings.
This commit is contained in:
parent
db43895d31
commit
91cd69706a
@ -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());
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user