summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorxianming wang <mingwax@codeaurora.org>2018-04-26 13:47:50 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-05-01 18:33:14 -0700
commit901778a2697bbef1239d88ca7e1a5faf0a0f2fc3 (patch)
treebeb61c8f60f75e68661a62c75471fadc558212f5 /src/com
parent890ded29e66ef3a77660f520827968e858f2b15c (diff)
downloadandroid_packages_apps_Snap-901778a2697bbef1239d88ca7e1a5faf0a0f2fc3.tar.gz
android_packages_apps_Snap-901778a2697bbef1239d88ca7e1a5faf0a0f2fc3.tar.bz2
android_packages_apps_Snap-901778a2697bbef1239d88ca7e1a5faf0a0f2fc3.zip
SnapdragonCamera: Set mDeepZoomModeRect gone in surfaceDestroyed
(1) Set mDeepZoomModeRect gone when surfacedestroyed is called. (2) Disable mVideoButton in DeepPortrait mode. CRs-Fixed: 2230047 Change-Id: Ifad2dd6052cd783451251c82307ef24241ea94c6
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java25
-rwxr-xr-xsrc/com/android/camera/CaptureUI.java3
2 files changed, 19 insertions, 9 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 73952b0d7..2b99ec510 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -2327,7 +2327,11 @@ public class CaptureModule implements CameraModule, PhotoController,
if (!mIsSupportedQcfa) {
mUI.enableShutter(true);
}
- mUI.enableVideo(true);
+ if (mDeepPortraitMode) {
+ mUI.enableVideo(false);
+ } else {
+ mUI.enableVideo(true);
+ }
}
});
}
@@ -2914,13 +2918,16 @@ public class CaptureModule implements CameraModule, PhotoController,
msg.arg1 = cameraId;
mCameraHandler.sendMessage(msg);
}
- if (!mDeepPortraitMode) {
- mUI.showSurfaceView();
- mUI.stopDeepPortraitMode();
- } else {
+ if (mDeepPortraitMode) {
mUI.startDeepPortraitMode(mPreviewSize);
- if (mUI.getGLCameraPreview() != null)
+ if (mUI.getGLCameraPreview() != null) {
mUI.getGLCameraPreview().onResume();
+ }
+ mUI.enableVideo(false);
+ } else {
+ mUI.showSurfaceView();
+ mUI.stopDeepPortraitMode();
+ mUI.enableVideo(true);
}
if (!mFirstTimeInitialized) {
@@ -2936,7 +2943,6 @@ public class CaptureModule implements CameraModule, PhotoController,
}
});
mUI.enableShutter(true);
- mUI.enableVideo(true);
setProModeVisible();
String scene = mSettingsManager.getValue(SettingsManager.KEY_SCENE_MODE);
@@ -6018,8 +6024,9 @@ public class CaptureModule implements CameraModule, PhotoController,
updatePreviewSurfaceReadyState(true);
mUI.initThumbnail();
if (getFrameFilters().size() == 0) {
- Toast.makeText(mActivity, "DeepPortrait is not supported",
- Toast.LENGTH_LONG).show();
+ if (mDeepPortraitMode) {
+ Toast.makeText(mActivity, "DeepPortrait is not supported", Toast.LENGTH_LONG).show();
+ }
return;
}
mRenderer = getGLCameraPreview().getRendererInstance();
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index f212eb865..f5fbe2fc4 100755
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -167,6 +167,9 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
public void surfaceDestroyed(SurfaceHolder holder) {
Log.v(TAG, "surfaceDestroyed");
mSurfaceHolder = null;
+ if (mDeepZoomModeRect != null) {
+ mDeepZoomModeRect.setVisibility(View.GONE);
+ }
previewUIDestroyed();
}
};