Add missing nullptr checks for data.readCString() strings

Protect the Audio Policy Manager by adding extra checks
for data.readCString() strings when parsing / decoding
a Binder transaction.

 * Moved audio_is_output_device() / audio_is_input_device() checks
   inside handleDeviceConfigChange()
   from the AudioPolicyInterface to the AudioPolicyManager
 * Removed similar redundant checks inside

Test: code compilation
Change-Id: Ib32a28ba2669b73aaf32b31bb18f41c8dd7d2605
3 files changed