Is there a way to do this from an app (not looking for store approval with this).
There’s a long standing pulseaudio bug that corrupts subsequent call recordings on the Xperia X but if pulseaudio is restarted it works fine on subsequent recordings as well.
I thought I could write a basic “daemon” to just sit there in a blocking loop waiting for a call to finish/event to happen, but I have no idea how to detect that. (NOTE: if root access is required, that’s fine too, I’m not aiming for a UI app).