mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-17 18:40:50 +00:00
Remove the Android 2.x/3.x support code.
The Android 4.x+ code has changed a lot since the initial import
of the eyes-free codebase. A lot of bug fixes and improvements
have been made to it.
The eyes-free codebase had two different code paths:
* one for ICS (4.0) or later, using the Java-based TTS APIs
provided by the Android platform;
* one for pre-ICS using an internal C++-based TTS API.
Thus, any bug fixes or improvements would have to be done to both
code bases if Android 2.x/3.x support is required. This is not
maintainable.
If pre-ICS support is to be re-added in the future, the plan will
be to:
* forward the C++-based APIs to the Java-based APIs via a
compatibility layer;
* use a compatibility layer (Android Support Library?) for using
the ICS settings API on pre-ICS.
This commit is contained in:
@@ -162,32 +162,6 @@ public class SpeechSynthesisTest extends TextToSpeechTestCase
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* This tests that the location of the espeak TTS shared object matches
|
||||
* the location that Android 2.2 looks for it in.
|
||||
*/
|
||||
public void testSharedObjectLocation()
|
||||
{
|
||||
Intent intent = new Intent("android.intent.action.START_TTS_ENGINE");
|
||||
intent.setPackage("com.reecedunn.espeak");
|
||||
PackageManager pm = getContext().getPackageManager();
|
||||
List<ResolveInfo> resolveInfos = pm.queryIntentActivities(intent, 0);
|
||||
assertThat(resolveInfos, is(notNullValue()));
|
||||
assertThat(resolveInfos.isEmpty(), is(false));
|
||||
|
||||
ResolveInfo[] enginesArray = resolveInfos.toArray(new ResolveInfo[0]);
|
||||
ActivityInfo aInfo = enginesArray[0].activityInfo;
|
||||
String soFilename = aInfo.name.replace(aInfo.packageName + ".", "") + ".so";
|
||||
soFilename = soFilename.toLowerCase();
|
||||
assertThat(soFilename, is("espeak.so"));
|
||||
|
||||
soFilename = "/data/data/" + aInfo.packageName + "/lib/libtts" + soFilename;
|
||||
assertThat(soFilename, is("/data/data/com.reecedunn.espeak/lib/libttsespeak.so"));
|
||||
|
||||
File f = new File(soFilename);
|
||||
assertThat(f.exists(), is(true));
|
||||
}
|
||||
|
||||
public void testConstruction()
|
||||
{
|
||||
final SpeechSynthesis synth = new SpeechSynthesis(getContext(), mCallback);
|
||||
|
||||
Reference in New Issue
Block a user