cameraserver: Abort camera HAL when cameraservicewatchdog fires
- Abort the camera HAL from the cameraserver when the watchdog
fires to enable creation of a HAL tombstone for debugging
Bug: 349652177
Flag: com.android.internal.camera.flags.enable_hal_abort_from_cameraservicewatchdog
Test: Camera CTS test; Manual triggering of cameraservicewatchdog to
check for creation of HAL tombstone
Change-Id: I134d44e42b6d8ba7583193a39313b8bc08fc980b
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.h b/services/camera/libcameraservice/common/CameraProviderManager.h
index 4a64b44..b686a58 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.h
+++ b/services/camera/libcameraservice/common/CameraProviderManager.h
@@ -431,6 +431,11 @@
// LocalRegistrationCallback::onServiceRegistration
virtual void onServiceRegistration(const String16& name, const sp<IBinder> &binder) override;
+ /*
+ * Return list of provider pid
+ */
+ std::set<pid_t> getProviderPids();
+
/**
* Dump out information about available providers and devices
*/
@@ -914,6 +919,9 @@
// Provider names of AIDL providers with retrieved binders.
std::set<std::string> mAidlProviderWithBinders;
+ std::mutex mProviderPidMapLock;
+ std::map<std::string, pid_t> mProviderPidMap;
+
static const char* deviceStatusToString(
const hardware::camera::common::V1_0::CameraDeviceStatus&);
static const char* torchStatusToString(