am 24943bf1: Failing Text-To-Speech CTS tests fix.
* commit '24943bf19d3d000f9f5840513526b48523b62c71': Failing Text-To-Speech CTS tests fix.
This commit is contained in:
committed by
Android Git Automerger
commit
decc6cb1a7
@@ -810,9 +810,15 @@ public abstract class TextToSpeechService extends Service {
|
||||
return TextToSpeech.ERROR;
|
||||
}
|
||||
|
||||
// In test env, ParcelFileDescriptor instance may be EXACTLY the same
|
||||
// one that is used by client. And it will be closed by a client, thus
|
||||
// preventing us from writing anything to it.
|
||||
final ParcelFileDescriptor sameFileDescriptor = ParcelFileDescriptor.adoptFd(
|
||||
fileDescriptor.detachFd());
|
||||
|
||||
SpeechItem item = new SynthesisToFileOutputStreamSpeechItem(caller,
|
||||
Binder.getCallingUid(), Binder.getCallingPid(), params, text,
|
||||
new ParcelFileDescriptor.AutoCloseOutputStream(fileDescriptor));
|
||||
new ParcelFileDescriptor.AutoCloseOutputStream(sameFileDescriptor));
|
||||
return mSynthHandler.enqueueSpeechItem(TextToSpeech.QUEUE_ADD, item);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user