summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormingwax <mingwax@codeaurora.org>2016-11-22 18:26:11 +0800
committermingwax <mingwax@codeaurora.org>2016-11-22 20:35:19 +0800
commit1cc5cc1ff76b11c85ea33798b1af900fd686181f (patch)
tree1f1ab903e0f9c947f06f7b149dc453194bfc2330 /src
parentc6fb74a0f63210f1991686e4303ed928b23e5b4b (diff)
downloadandroid_packages_apps_Snap-1cc5cc1ff76b11c85ea33798b1af900fd686181f.tar.gz
android_packages_apps_Snap-1cc5cc1ff76b11c85ea33798b1af900fd686181f.tar.bz2
android_packages_apps_Snap-1cc5cc1ff76b11c85ea33798b1af900fd686181f.zip
SnapdragonCamera: Fix Camera2 FC AlertDialog occur WindowLeaked
The dialog occur WindowLeaked when attached the activity is destroyed. Add judgement whether the activity is finishing before show dialog, if true return, false show dialog. CRs-Fixed: 1082314 Change-Id: I28fab4c0253d2524a05e7e18a78d7651bdc9ce4a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CaptureModule.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 42f94b6f5..249a17534 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -867,6 +867,9 @@ public class CaptureModule implements CameraModule, PhotoController,
@Override
public void onConfigureFailed(CameraCaptureSession cameraCaptureSession) {
Log.e(TAG, "cameracapturesession - onConfigureFailed "+id);
+ if (mActivity.isFinishing()) {
+ return;
+ }
new AlertDialog.Builder(mActivity)
.setTitle("Camera Initialization Failed")
.setMessage("Closing SnapdragonCamera")