media: replace CHECK with parameter validation

This change replaces CHECK (which aborts the mediaserver
upon failure) with validation and return with error code upon
failure.
Also, deprecated getService is replaced with waitForService

Bug: 323920490
Test: atest android.media.recorder.cts.MediaRecorderTest
Change-Id: I28f45ad07b27b60a60b98f14833c057f7d1da235
1 file changed