summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSanthosh Kumar H E <skhara@codeaurora.org>2014-08-28 14:44:23 +0530
committerSanthosh Kumar Thimmanna Bhattar <sthim@codeaurora.org>2014-10-15 13:44:02 +0530
commit41924d9bbb9cbed3ee73e0406d48bb0810308edf (patch)
treee13d54618669e6ce0dd364335848baddbce27a84 /src/com
parentd7810337255f08f3c89e2fb02ca393fc2997ca8d (diff)
downloadandroid_packages_apps_Snap-41924d9bbb9cbed3ee73e0406d48bb0810308edf.tar.gz
android_packages_apps_Snap-41924d9bbb9cbed3ee73e0406d48bb0810308edf.tar.bz2
android_packages_apps_Snap-41924d9bbb9cbed3ee73e0406d48bb0810308edf.zip
While stopping FD, pause UI to avoid further drawing with stale data.
When user disables FD from settings, app will stop FD and sets the callback listeners to null. By the time callbacks are set to null, framework had posted the data and it was not received in the app yet. So even though application clears the UI after setting null callbacks one set of data is getting drawn and it will not be cleared at all. Present change will pause the UI as soon as FD is disabled. When FD is enabled again, photoUI resumes drawing by default so not calling resume again. Change-Id: Iac3887eca6bc002439092390c47c25ae3b216b26
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/android/camera/PhotoModule.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index eee1110b1..010256315 100755
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -825,6 +825,7 @@ public class PhotoModule
if (mParameters.getMaxNumDetectedFaces() > 0) {
mFaceDetectionStarted = false;
mCameraDevice.setFaceDetectionCallback(null, null);
+ mUI.pauseFaceDetection();
mCameraDevice.stopFaceDetection();
mUI.onStopFaceDetection();
}