summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/Camera.java21
-rw-r--r--src/com/android/camera/VideoCamera.java7
2 files changed, 11 insertions, 17 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 2ab4d24..74d4547 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -308,13 +308,11 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
if (!mIsImageCaptureIntent) {
setOrientationIndicator(mLastOrientation);
}
- if (mGLRootView != null) {
- mGLRootView.queueEvent(new Runnable() {
- public void run() {
- mHeadUpDisplay.setOrientation(mLastOrientation);
- }
- });
- }
+ mGLRootView.queueEvent(new Runnable() {
+ public void run() {
+ mHeadUpDisplay.setOrientation(mLastOrientation);
+ }
+ });
}
}
};
@@ -1277,13 +1275,14 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
closeCamera();
resetScreenOn();
- if (mGLRootView != null) {
+ if (!isFinishing()) {
mGLRootView.onPause();
if (mHeadUpDisplay != null) {
mHeadUpDisplay.setGpsHasSignal(false);
mHeadUpDisplay.collapse();
}
}
+
if (mFirstTimeInitialized) {
mOrientationListener.disable();
if (!mIsImageCaptureIntent) {
@@ -2069,10 +2068,8 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
private boolean switchToVideoMode() {
if (isFinishing() || !isCameraIdle()) return false;
MenuHelper.gotoVideoMode(this);
- if (mGLRootView != null) {
- ((ViewGroup) mGLRootView.getParent()).removeView(mGLRootView);
- mGLRootView = null;
- }
+ ((ViewGroup) mGLRootView.getParent()).removeView(mGLRootView);
+ mHandler.removeMessages(FIRST_TIME_INIT);
finish();
return true;
}
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index dbe5b7a..548f8ae 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -632,7 +632,7 @@ public class VideoCamera extends NoSearchActivity
super.onPause();
mPausing = true;
- if (mGLRootView != null) {
+ if (!isFinishing()) {
mGLRootView.onPause();
if (mHeadUpDisplay != null) mHeadUpDisplay.collapse();
}
@@ -1399,10 +1399,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;
}