Fix NPE in FlashlightController

Bug: 18007548
Change-Id: Iecd1303feeb8062741752862312043ecd75cebbe
This commit is contained in:
Adrian Roos
2014-10-27 16:55:36 +01:00
parent b9ae09066c
commit fa81d2126a

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();
}