diff options
author | Adrian Roos <roosa@google.com> | 2014-10-27 16:55:36 +0100 |
---|---|---|
committer | Adrian Roos <roosa@google.com> | 2014-10-27 16:57:43 +0100 |
commit | fa81d2126aae262a60b194877daadfb9ed1d50da (patch) | |
tree | 786f40ccd64e40ec533039e95056dbd110a7fd3f /packages/SystemUI | |
parent | b9ae09066c315a3bdb01e1bd9d3d21cd0e2ea3f1 (diff) | |
download | frameworks_base-fa81d2126aae262a60b194877daadfb9ed1d50da.zip frameworks_base-fa81d2126aae262a60b194877daadfb9ed1d50da.tar.gz frameworks_base-fa81d2126aae262a60b194877daadfb9ed1d50da.tar.bz2 |
Fix NPE in FlashlightController
Bug: 18007548
Change-Id: Iecd1303feeb8062741752862312043ecd75cebbe
Diffstat (limited to 'packages/SystemUI')
-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 6f021ac..33f7aff 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(); } |