fixing build and lint warnings

This commit is contained in:
Andrey Pavlenko 2013-04-16 15:30:43 +04:00
parent c02095ae1c
commit 8c40f0ccf2
6 changed files with 9 additions and 14 deletions

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="InlinedApi">
<ignore path="src\org\opencv\android\JavaCameraView.java" />
</issue>
<issue id="NewApi">
<ignore path="src\org\opencv\android\JavaCameraView.java" />
</issue>

View File

@ -74,6 +74,7 @@ public abstract class CameraBridgeViewBase extends SurfaceView implements Surfac
getHolder().addCallback(this);
mMaxWidth = MAX_UNSPECIFIED;
mMaxHeight = MAX_UNSPECIFIED;
styledAttrs.recycle();
}
public interface CvCameraViewListener {
@ -155,8 +156,6 @@ public abstract class CameraBridgeViewBase extends SurfaceView implements Surfac
mPreviewFormat = format;
}
private CvCameraViewListenerAdapter() {}
private int mPreviewFormat = Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA;
private CvCameraViewListener mOldStyleListener;
};

View File

@ -267,9 +267,6 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
mRgba.release();
}
private JavaCameraFrame(CvCameraViewFrame obj) {
}
private Mat mYuvFrameData;
private Mat mRgba;
private int mWidth;

View File

@ -131,17 +131,17 @@ public class NativeCameraView extends CameraBridgeViewBase {
}
}
private class NativeCameraFrame implements CvCameraViewFrame {
private static class NativeCameraFrame implements CvCameraViewFrame {
@Override
public Mat rgba() {
mCamera.retrieve(mRgba, Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA);
mCapture.retrieve(mRgba, Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA);
return mRgba;
}
@Override
public Mat gray() {
mCamera.retrieve(mGray, Highgui.CV_CAP_ANDROID_GREY_FRAME);
mCapture.retrieve(mGray, Highgui.CV_CAP_ANDROID_GREY_FRAME);
return mGray;
}
@ -158,9 +158,6 @@ public class NativeCameraView extends CameraBridgeViewBase {
private class CameraWorker implements Runnable {
private Mat mRgba = new Mat();
private Mat mGray = new Mat();
public void run() {
do {
if (!mCamera.grab()) {

View File

@ -6,7 +6,6 @@ import org.opencv.android.OpenCVLoader;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
public class CvNativeActivity extends Activity {

View File

@ -1,4 +1,4 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:opencv="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -20,4 +20,4 @@
opencv:show_fps="true"
opencv:camera_id="any" />
</LinearLayout>
</FrameLayout>