During binding, check the status when calling callback functions
In a separate bug, we encounter a selinux denial when the update_engine
domain tries to call function from gmscore domain (through the callback).
This results in an infinite progress bar in the UI, and adds confusion
to testers and users.
Even though the callback function is defined as oneway in the aidl, I find
it returns status with the error message upon selinux denial:
Status(-129, EX_TRANSACTION_FAILED): 'FAILED_TRANSACTION: '
So, we should at least check this status and return false in the bind().
We also need to unbind the callback in such case. So the caller can
bind() again later without storing two callbacks in update_engine.
Bug: 146073270
Bug: 145340049
Test: check the error message and return value upon selinux denial
Change-Id: I7aeb80637704907090974192deaa17ba3eadc822
1 file changed