summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Yoo <jyoo@codeaurora.org>2016-01-14 12:35:35 -0800
committerSteve Kondik <steve@cyngn.com>2016-08-03 15:45:45 -0700
commit2609176b48f86e68ce50629298b252397a19f463 (patch)
tree3002a010daed84399b3558c86f76ce4efb0c64d4
parent1f74331cd50b58a2ea7ad846a4ca1e9a1bd5242d (diff)
downloadandroid_packages_apps_Snap-2609176b48f86e68ce50629298b252397a19f463.zip
android_packages_apps_Snap-2609176b48f86e68ce50629298b252397a19f463.tar.gz
android_packages_apps_Snap-2609176b48f86e68ce50629298b252397a19f463.tar.bz2
SnapdragonCamera: Adding current camera null check
Adding null check on potential race condition case. Change-Id: Ia837acbdf5fbef824d55b318d9cbddf8a8faf7ef CRs-Fixed: 961548
-rw-r--r--src/com/android/camera/AndroidCameraManagerImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/camera/AndroidCameraManagerImpl.java b/src/com/android/camera/AndroidCameraManagerImpl.java
index e67c7b4..d36b500 100644
--- a/src/com/android/camera/AndroidCameraManagerImpl.java
+++ b/src/com/android/camera/AndroidCameraManagerImpl.java
@@ -739,7 +739,8 @@ class AndroidCameraManagerImpl implements CameraManager {
public void onAutoFocusMoving(
final boolean moving, android.hardware.Camera camera) {
final android.hardware.Camera currentCamera = mCamera.getCamera();
-
+ if(currentCamera == null)
+ return;
mHandler.post(new Runnable() {
@Override
public void run() {