summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PhotoModule.java
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-11-30 10:40:29 +0100
committerMichael Bestas <mikeioannina@gmail.com>2017-01-04 22:00:45 +0200
commitc071c830f2c72cfa15d5ff254e9ff038a3e1e9e6 (patch)
tree5f3fa970b731a782a84d61c329e98f4e591afc56 /src/com/android/camera/PhotoModule.java
parente56d6a7d169a027615e3c132fc08ee18708a3128 (diff)
downloadandroid_packages_apps_Snap-c071c830f2c72cfa15d5ff254e9ff038a3e1e9e6.tar.gz
android_packages_apps_Snap-c071c830f2c72cfa15d5ff254e9ff038a3e1e9e6.tar.bz2
android_packages_apps_Snap-c071c830f2c72cfa15d5ff254e9ff038a3e1e9e6.zip
Initialize focus manager in onResume().
Since commit 87b4a40d588a7ae8a61cb353c4cff8df37f7b483 moved camera initialization (and focus manager initialization with it) to a background thread, the focus manager initialization now races against the onPreviewRectChanged() call triggered by SurfaceView initialization in the main thread, potentially leaving the focus manager in an uninitialized state that prevented taking pictures. Change-Id: I8cf650d6a67768acd131b3cddad175ed198e0838
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-rw-r--r--src/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 6883a3624..aaa7ca77b 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2484,6 +2484,7 @@ public class PhotoModule extends BaseModule<PhotoUI> implements
@Override
public void onResumeBeforeSuper() {
mPaused = false;
+ if (mFocusManager == null) initializeFocusManager();
}
private void openCamera() {