Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1540b086 authored by Timi Rautamäki's avatar Timi Rautamäki Committed by Kevin Haggerty
Browse files

cameraservice: Avoid calling getSystemCameraKind if the camera was not mapped yet

* By calling `getSystemCameraKind()` directly in
  `broadcastTorchModeStatus()` we ensure that previous calls to
  `getTorchStatusLocked` and `setTorchStatusLocked` had succeeded,
  meaning that the camera device is already present in mCameraStates.

  When the camera device is already mapped in mCameraStates
  calls to `getSystemCameraKind()` will avoid interrogating the
  CameraProviderManager, which was causing a deadlock
  upon attempting to lock mInterfaceLock.

Change-Id: I2aed9d53f13859d26efe6a8ab300afab6944f5f7
parent ec22f455
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment