15-puzzle app reverted to usage of old CvCameraViewListener implementation;

super.onPause() call moved to begining of onPause method according Google recomandations.
pull/402/head
Alexander Smorkalov 12 years ago
parent f8720ec60e
commit 076941bb07
  1. 2
      modules/java/generator/src/java/android+JavaCameraView.java
  2. 11
      samples/android/15-puzzle/src/org/opencv/samples/puzzle15/Puzzle15Activity.java
  3. 2
      samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java
  4. 2
      samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java
  5. 2
      samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsActivity.java
  6. 2
      samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1Java.java
  7. 2
      samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2NativeCamera.java
  8. 2
      samples/android/tutorial-3-native/src/org/opencv/samples/tutorial3/Sample3Native.java
  9. 2
      samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4Mixed.java
  10. 2
      samples/android/tutorial-5-cameracontrol/src/org/opencv/samples/tutorial5/Sample5CameraControl.java

@ -263,7 +263,7 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
mWidth = width;
mHeight = height;
mYuvFrameData = Yuv420sp;
mRgba = new Mat(mHeight, mWidth, CvType.CV_8UC4);
mRgba = new Mat();
}
public void release() {

@ -1,12 +1,11 @@
package org.opencv.samples.puzzle15;
import org.opencv.android.BaseLoaderCallback;
import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
import org.opencv.android.LoaderCallbackInterface;
import org.opencv.android.OpenCVLoader;
import org.opencv.core.Mat;
import org.opencv.android.CameraBridgeViewBase;
import org.opencv.android.CameraBridgeViewBase.CvCameraViewListener2;
import org.opencv.android.CameraBridgeViewBase.CvCameraViewListener;
import android.os.Bundle;
import android.app.Activity;
@ -17,7 +16,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
public class Puzzle15Activity extends Activity implements CvCameraViewListener2, View.OnTouchListener {
public class Puzzle15Activity extends Activity implements CvCameraViewListener, View.OnTouchListener {
private static final String TAG = "Sample::Puzzle15::Activity";
@ -64,9 +63,9 @@ public class Puzzle15Activity extends Activity implements CvCameraViewListener2,
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override
@ -127,7 +126,7 @@ public class Puzzle15Activity extends Activity implements CvCameraViewListener2,
return false;
}
public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
return mPuzzle15.puzzleFrame(inputFrame.rgba());
public Mat onCameraFrame(Mat inputFrame) {
return mPuzzle15.puzzleFrame(inputFrame);
}
}

@ -79,9 +79,9 @@ public class ColorBlobDetectionActivity extends Activity implements OnTouchListe
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override

@ -130,9 +130,9 @@ public class FdActivity extends Activity implements CvCameraViewListener2 {
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override

@ -112,9 +112,9 @@ public class ImageManipulationsActivity extends Activity implements CvCameraView
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override

@ -67,9 +67,9 @@ public class Sample1Java extends Activity implements CvCameraViewListener2 {
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override

@ -73,9 +73,9 @@ public class Sample2NativeCamera extends Activity implements CvCameraViewListene
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override

@ -62,9 +62,9 @@ public class Sample3Native extends Activity implements CvCameraViewListener2 {
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override

@ -88,9 +88,9 @@ public class Sample4Mixed extends Activity implements CvCameraViewListener2 {
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override

@ -79,9 +79,9 @@ public class Sample5CameraControl extends Activity implements CvCameraViewListen
@Override
public void onPause()
{
super.onPause();
if (mOpenCvCameraView != null)
mOpenCvCameraView.disableView();
super.onPause();
}
@Override

Loading…
Cancel
Save