diff options
| author | 2014-10-27 16:55:36 +0100 | |
|---|---|---|
| committer | 2014-12-15 22:48:19 +0000 | |
| commit | 54eb845d9f16b6c42f379965e65ebc0629e4bd3b (patch) | |
| tree | b5423f8fce49d14571e8106742d199407458616e | |
| parent | aaa37da8e0d358317d85e3bc7bfa363c644f5ef1 (diff) | |
Fix NPE in FlashlightController
Bug: 18007548
Change-Id: Iecd1303feeb8062741752862312043ecd75cebbe
(cherry picked from commit fa81d2126aae262a60b194877daadfb9ed1d50da)
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java index 6f021aca15f1..33f7affe892f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java @@ -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(); } |