Fix NPE in FlashlightController

Bug: 18007548
Change-Id: Iecd1303feeb8062741752862312043ecd75cebbe
(cherry picked from commit fa81d2126a)
This commit is contained in:
Adrian Roos
2014-10-27 16:55:36 +01:00
committed by Zach Riggle
parent aaa37da8e0
commit 54eb845d9f

View File

@@ -308,7 +308,11 @@ public class FlashlightController {
new CameraCaptureSession.StateListener() {
@Override
public void onConfigured(CameraCaptureSession session) {
mSession = session;
if (session.getDevice() == mCameraDevice) {
mSession = session;
} else {
session.close();
}
postUpdateFlashlight();
}