appop: Finish all when last in chain fail

When starting an op for an attribution chain, if a later attr in the
chain fails to start, we should finish the already started ops to avoid
a split in the op state in the chain.

Test: Manual with mic indicator and recording
Test: CtsMediaAudioRecordPermissionTests
Test: CtsSensorPrivacyTestCases
Fixes: 363915467
Bug: 293603271
Flag: EXEMPT security
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c0bca399b2f809ca9efebb5e9ed492e0c32fa95c)
Merged-In: I92060d44e666fa6725411de5d714ac0d380f42ae
Change-Id: I92060d44e666fa6725411de5d714ac0d380f42ae
1 file changed