Check Target SDK Fix

This commit is contained in:
Yink 2017-03-04 23:30:06 +01:00
parent c69b7341b2
commit b5ac3c0a05
1 changed files with 4 additions and 0 deletions

View File

@ -81,11 +81,15 @@ public class MainActivity extends AppCompatActivity {
/* Input while loop producing bugs and mixes with output */
if (!isLoop && !isSpeaking) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
if (permissionCheck == PackageManager.PERMISSION_GRANTED) {
promptSpeechInput();
} else {
speak(new VoiceLine(R.raw.daga_kotowaru, Mood.PISSED));
}
} else {
promptSpeechInput();
}
}
}});