am: 9ddd6e8d9e -s ours
am skip reason: change_id If5803cb6fcb6f4800032069872daaeac1cd36ed2 with SHA1 9e0302fcc1 is in history
Change-Id: I60c81c4ed863b68c94e3062c126b24f9e04946ee
* changes:
camera2ndk: ~ACameraCaptureSession shouldn't hold device lock in ACameraDevice_close().
AImage: don't allow ~AImageReader to run before AImages are deleted.
AImageReader: make sure ~AImageReader isn't called with FrameListener::mLock held.
AImageReaderVendorTest: Tolerate failures for ACameraDevice_isSessionConfigurationSupported.
* changes:
cameraserver: Avoiding deadlocks while calling isPublicallyHiddenSecureCamera().
Do not include hidden secure cameras in camera1: getNumberOfCameras
AudioPlayer was only used by the commandline utilities, so move it
out of libstagefright.
Test: build, run
Change-Id: I561cccd323206de7415bd235b72711194080aaea
INIT_CHECK() expands to `if (foo) return bar;`, and `EventTimer`'s
destructor uses a value that's only set if `SetAttribute` is called.
This CL flips the INIT_CHECK/EventTimer lines to match getKeyRequest.
Caught by clang's static analyzer:
frameworks/av/include/media/EventMetric.h:155:7: warning: 2nd function
call argument is an uninitialized value
[clang-analyzer-core.CallAndMessage]
Bug: None
Test: TreeHugger
Change-Id: Ie0c4fb8c99a56082e234475e539c2ec4bc8fd948
JetPlayer.cpp was only used by the JetPlayer JNI code, so move
it to the same library.
Test: atest JetPlayerTest
Change-Id: I14b8241c5eb6c789ebc5d6725db716b9b0f8f31f
Merged-In: I14b8241c5eb6c789ebc5d6725db716b9b0f8f31f
Removing it doesn't have any effect on binary size, but makes it easier
to track dependencies.
Test: build
Change-Id: I0a792e48e781a73b920cb68c0daaa7920f08b8bf
The following scenario can occur:
T1 serving Client A's disconnect() call:
T2 : serving Client B's connect() call
T2 : CameraProviderManager::openSession() locks mInterfaceMutex and waits on open() HAL
interface call
T1: updateStatus() locks mStatusListenerMutex
T1: CameraProviderManager::isPublicallyHiddenSecureCamera() waits
on mInterfaceMutex
T2: while waiting on open(), gets a torchModeStatus() callback from the camera HAL
T2: onStatusChanged()
T2: broadcastTorchModeStatus() which waits on mStatusListenerMutex
As a result there's a possible circular hold and wait between T1 and T2.
We cache isPublicallyHiddenSecureCamera in CameraState. That doesn't completely
avoid having to hold mInterfaceLock while calling isPublicallyHiddenSecureCamera() in CameraService
(cache updates), instead it reduces it. We instead need to hold mCameraStates lock which has a
smaller scope.
Bug: 141756275
Test: CTS
Test: GCA (sanity)
Merged-In: I4a697c1eaccc3603007be4a595febea981fbeb64
Change-Id: Ie5508afb126a874f76fbbfc2dd19ef79ae6255e0
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Apps cannot connect to hidden secure cameras. Do not include them in the
number of cameras reported by camera1 api.
Bug: 141247926
Test: Without CL -> mark all cameras as hidden secure cameras;
atest FastBasicsTest.java#testCamera1 fails
With CL -> mark all cameras as hidden secure cameras;
atest FastBasicsTest.java#testCamera1 passes
Test: camera CTS
Merged-In: I9d1721fd5e94fa7f692c3da52aa667ae9247d368
Change-Id: I229a336bed6b2695e16c1457cb8f74c26b07f7e8
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit cf93540965)
MidiIoWrapper's DataSourceUnwrapper doesn't need to inherit from
DataSourceBase, and removing that inheritance saves a little bit
of space too.
Test: build
Change-Id: I9f560ef57b76b624cf323d75872395a39f65ed1f
We call disconnectLocked before stopping CameraDevice's looper, in order to avoid this situation:
1) Its possible that an OnResultReceived callback is received, and posts an
AMessage with sp<ACameraCaptureSession> on CameraDevice's looper.
2) Before the looper message is processsed, ACameraDevice_close() is
called by the client, which results in the looper being stopped and
cleared with device lock held.
3) When the looper is getting cleared, the AMessage containg the
ACameraCaptureSession pointer is destructed leading to
~ACameraCaptureSession running without knowing that the device is
being closed, as a result it tries to hold device lock, resulting in
a deadlock.
Bug: 141603005
Test: CTS native tests
Test: use camera2 vndk client for extended periods of time
Change-Id: Ia0d47fc2975981055cd1f2103c1cbe8d76642fe4
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
am: 342d7bcf44 -s ours
am skip reason: change_id I864be785752f27201d45ce24f95013de6391dbd6 with SHA1 589171c80a is in history
Change-Id: I04b143297a43c04be46e736ee28d6778be097782
With VNDK APEX, the path to VNDK libs is changed from
/system/lib/vndk-VER to /apex/com.android.vndk.vVER/lib.
Bug: 141451661
Test: m && boot (tested with cuttlefish)
Change-Id: Id3a335ad1dfea71fb53ce80b96d550af8ac61760