patches: Update for Bliss 11.2 Stable
Signed-off-by: Jackeagle <jackeagle102@gmail.com>
Change-Id: I6f7c6beee6581a349627f4f449f99f5c894e37e7
diff --git a/patches/frameworks/av/0004-We-might-not-have-a-mFlashlight-at-this-state-but-th.patch b/patches/frameworks/av/0004-We-might-not-have-a-mFlashlight-at-this-state-but-th.patch
new file mode 100644
index 0000000..36c2509
--- /dev/null
+++ b/patches/frameworks/av/0004-We-might-not-have-a-mFlashlight-at-this-state-but-th.patch
@@ -0,0 +1,26 @@
+From c195131280ea47a045dbc78a9f6a83eb880b733d Mon Sep 17 00:00:00 2001
+From: Pierre-Hugues Husson <phh@phh.me>
+Date: Sun, 19 Aug 2018 23:05:26 +0200
+Subject: [PATCH 4/4] We might not have a mFlashlight at this state, but that's
+ ok
+
+---
+ services/camera/libcameraservice/CameraService.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
+index b62d22080..0f2c4cac7 100644
+--- a/services/camera/libcameraservice/CameraService.cpp
++++ b/services/camera/libcameraservice/CameraService.cpp
+@@ -258,7 +258,7 @@ void CameraService::addStates(const String8 id) {
+ conflicting));
+ }
+
+- if (mFlashlight->hasFlashUnit(id)) {
++ if (mFlashlight != nullptr && mFlashlight->hasFlashUnit(id)) {
+ Mutex::Autolock al(mTorchStatusMutex);
+ mTorchStatusMap.add(id, TorchModeStatus::AVAILABLE_OFF);
+ }
+--
+2.17.1
+