From 41924d9bbb9cbed3ee73e0406d48bb0810308edf Mon Sep 17 00:00:00 2001 From: Santhosh Kumar H E Date: Thu, 28 Aug 2014 14:44:23 +0530 Subject: 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 --- src/com/android/camera/PhotoModule.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/com') 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(); } -- cgit v1.2.3