tests: Fix crash and static preview issue for LivePreview APK.

1. Set mPreviewTexture to null to avoid crash when stop and resume app.
2. Don't stop camera preview when data buffer size is mismatched, this
will avoid RS preview frame be static when switch resolution time to time.

Change-Id: Ib925f9ec191fb03aeb28848e5b631f9e74cd1637
Signed-off-by: lwan89 <liang.wang@intel.com>
diff --git a/java/tests/LivePreview/src/com/android/rs/livepreview/CameraPreviewActivity.java b/java/tests/LivePreview/src/com/android/rs/livepreview/CameraPreviewActivity.java
index be0af4b..e97d4d2 100644
--- a/java/tests/LivePreview/src/com/android/rs/livepreview/CameraPreviewActivity.java
+++ b/java/tests/LivePreview/src/com/android/rs/livepreview/CameraPreviewActivity.java
@@ -150,6 +150,7 @@
     }
 
     public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
+        mPreviewTexture = null;
         return true;
     }
 
@@ -354,8 +355,6 @@
         if (expectedBytes != data.length) {
             Log.e(TAG, "Mismatched size of buffer! Expected ");
 
-            mState = STATE_NO_CALLBACKS;
-            mCamera.setPreviewCallbackWithBuffer(null);
             return;
         }