diff options
author | Owen Lin <owenlin@google.com> | 2010-03-23 11:06:10 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2010-03-25 17:01:33 +0800 |
commit | 416f65b0cc009d251a16512e7b6c3621bf62dc76 (patch) | |
tree | bf8a68b40135f05eb3ad9616828c0b778085de35 /src/com/android/camera/VideoCamera.java | |
parent | e2c3e83c2086bd25815e05e1771ecfb95330d7d0 (diff) | |
download | LegacyCamera-416f65b0cc009d251a16512e7b6c3621bf62dc76.zip LegacyCamera-416f65b0cc009d251a16512e7b6c3621bf62dc76.tar.gz LegacyCamera-416f65b0cc009d251a16512e7b6c3621bf62dc76.tar.bz2 |
Fix one more NPE.
Bug: 2529339
Change-Id: Ia9ea3ba839e35e1ce3e5cb3a1b1f0cc6f83f1465
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index 411386a..69d7353 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -632,10 +632,8 @@ public class VideoCamera extends NoSearchActivity super.onPause(); mPausing = true; - if (mGLRootView != null) { - mGLRootView.onPause(); - if (mHeadUpDisplay != null) mHeadUpDisplay.collapse(); - } + mGLRootView.onPause(); + if (mHeadUpDisplay != null) mHeadUpDisplay.collapse(); // Hide the preview now. Otherwise, the preview may be rotated during // onPause and it is annoying to users. @@ -1399,10 +1397,7 @@ public class VideoCamera extends NoSearchActivity private boolean switchToCameraMode() { if (isFinishing() || mMediaRecorderRecording) return false; MenuHelper.gotoCameraMode(this); - if (mGLRootView != null) { - ((ViewGroup) mGLRootView.getParent()).removeView(mGLRootView); - mGLRootView = null; - } + ((ViewGroup) mGLRootView.getParent()).removeView(mGLRootView); finish(); return true; } |