api-impl: misc stubs and trivial impls

This commit is contained in:
Mis012
2025-02-15 21:34:37 +01:00
parent df03617f13
commit 453224cf31
12 changed files with 123 additions and 6 deletions

View File

@@ -0,0 +1,33 @@
package android.speech.tts;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
public class TextToSpeech {
public static final int ERROR = -1;
public TextToSpeech(Context context, TextToSpeech.OnInitListener listener) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
listener.onInit(ERROR);
}
});
}
public int setOnUtteranceCompletedListener(TextToSpeech.OnUtteranceCompletedListener listener) {
return ERROR;
}
public void shutdown() {
}
public static interface OnInitListener {
abstract void onInit(int status);
}
public static interface OnUtteranceCompletedListener {
public abstract void onUtteranceCompleted(String utteranceId);
}
}