Some interactions between camera service and hwservicemanager require
multiple threads to execute without deadlocks, such as calling
getService() from within an onRegistered() callback.
Increase thread count to 3 to accomodate.
Also switch the order of listener registration and legacy provider
addition back to what it was originally.
Test: No deadlock when camera service is restarted
Bug: 35096594
Change-Id: I6def961d5765958fef284c0a1820e903abc851ef
In binderized mode, the exact time of destroying the server object
is not defined. Enforce destruction by flusing hwbinder commands
queue after releasing the last client reference.
Bug: 35394629
Test: capture trace while following repro steps, verify that server-side object
gets destroyed
Change-Id: Id2756cab0f36ed4eaf290d3f5a1c750c9c75b1d3
Certain cases of error were not handled properly.
Also, this CL gets rid of the native crash as seen in b/35616667.
(Casting still does not function properly.)
Test: As instructed in b/35616667. No native crashes occur.
Bug: 35616667
Change-Id: I34d48fd83517010e8caa1b9ab246d171db1d4d49
Also clean up some other dependencies.
Test: Manual testing with Camera, YouTube and Play Movies apps.
Bug: 35445903
Change-Id: I28562b5fbcc7054cf45c4ec2530bbe2ab4b5645f
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds
Bug: 33844934
Change-Id: I22817cae1d5ce023db6e8b935ebff65e0abdf026
The current sequence of registering for provider notifications
and trying to add a legacy provider could introduce a race
condition leading to a deadlock. The "onRegistration" callback
will try to acquire "mInterfaceMutex" which is still held during
the execution of "addProvider" for legacy. However "addProvider"
could get suspended waiting on the HIDL provider interface. If this
happens and the same thread that unblocks the service query tries
to notify the provider manager, then we will end up in a deadlock.
To avoid this, the initialization sequence can be modified a bit.
First add the legacy provider and then register for notifications.
Bug: 35096594
Test: Manual using stop/start of cameraserver
Change-Id: Ia381ae6bf567525cabd3f51246a192ddac37b7f8
Now that b/34772726 is fixed, we can remove this temporary code.
Bug: 34772726
Test: audio works on marlin
Change-Id: I1a268e7030d27b4e944659bd7d82ba321be13a6e
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds; VTS HalAudioEffectHidlTargetBasicTest passes
Bug: 33844934
Change-Id: I5283bf7c2d0645bd38a16e92cab05103c1bcdf26
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds
Bug: 33844934
Change-Id: Ifc6d297d0bbf7b28be560700c027c07acaa2466c
This fixes warning: The left operand of '%' is a garbage value.
Bug: None.
Test: The warning is gone.
Change-Id: I191e5bfd9d5f5136afcc2b5d8277c44b7d223998