Always call IKeyChainAliasCallback

At the moment the logic in ResponseSender does not invoke
IKeyChainAliasCallback.alias() when there is exception or
when the alias is not user selectable. This breaks the
control flow and causes the invoking app to wait indefinitly
for the alias selection process to finish. Fix this by
calling IKeyChainAliasCallback.alias() with null when error
occurs.

Strictly speaking this is a change of behaviour for the case
where alias does not exist: prior to U, setGrant() will finish
non-exceptionally on a non-existent alias, so we call
IKeyChainAliasCallback.alias with mAlias. Starting from U,
setGrant() will throw on a non-existent alias and after this change
we will call IKeyChainAliasCallback.alias with null instead.
One could argue that the new behaviour is actually more correct:
in KeyChainAliasCallback API contract, null denotes no certificate
is chosen, which is more aligned with the non-existent alias case.

Bug: 272468831
Test: manual
Change-Id: I084db75d522697603d28d137793088e44b9a6e1d
(cherry picked from commit 4cb1a942d76c0d25a271d96a9e544a0457f51a19)
1 file changed