예제 #1
0
 @Override
 public void onPictureTaken(byte[] data, Camera camera) {
   Log.d("run", "into picture call back");
   mHandleTask = new HandlePicAsyncTask();
   mHandleTask.execute(data);
   Log.d("run", "execute asynctask");
 }
예제 #2
0
 @Override
 protected void onPause() {
   super.onPause();
   if (mHandleTask != null) {
     if (mHandleTask.cancel(true)) ;
   }
   if (mCamera != null) {
     mCamera.setPreviewCallback(null);
     mCamera.stopPreview();
     mCamera.release();
     mCamera = null;
     mPreviewing = false;
     Log.d("mPreviewing", "mPreviewing changed to :" + mPreviewing);
   }
   orientationEventListener.disable();
 }