Progress
This commit is contained in:
parent
43f2679374
commit
50cb0d6d9b
@ -6,12 +6,12 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace = "net.mezimmah.wkt9"
|
||||
compileSdk = 33
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "net.mezimmah.wkt9"
|
||||
minSdk = 31
|
||||
targetSdk = 33
|
||||
minSdk = 30
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
|
@ -109,7 +109,9 @@ class WKT9: InputMethodService(), SpellCheckerSession.SpellCheckerSessionListene
|
||||
val inputMethodManager = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
val inputMethodSubtype = inputMethodManager.currentInputMethodSubtype
|
||||
|
||||
locale = Locale.forLanguageTag(inputMethodSubtype.languageTag)
|
||||
locale = inputMethodSubtype?.let {
|
||||
Locale.forLanguageTag(it.languageTag)
|
||||
} ?: Locale.forLanguageTag("en-US")
|
||||
|
||||
Log.d(tag, "WKT9 is loading: $locale")
|
||||
|
||||
@ -353,7 +355,7 @@ class WKT9: InputMethodService(), SpellCheckerSession.SpellCheckerSessionListene
|
||||
lastComposedString = null
|
||||
}
|
||||
|
||||
if (allowSuggestions) Log.d(tag, "History: ${commitHistory.toString()}")
|
||||
if (allowSuggestions) Log.d(tag, "History: $commitHistory")
|
||||
|
||||
updateInputStatus()
|
||||
|
||||
@ -525,6 +527,7 @@ class WKT9: InputMethodService(), SpellCheckerSession.SpellCheckerSessionListene
|
||||
handleComposeTimeout(this.timeout)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
private fun onRecord() {
|
||||
// The recorder must be busy...
|
||||
if (recorder !== null || !isInputViewShown) return
|
||||
@ -539,7 +542,7 @@ class WKT9: InputMethodService(), SpellCheckerSession.SpellCheckerSessionListene
|
||||
val duration = Toast.LENGTH_SHORT
|
||||
|
||||
// Instantiate recorder and start recording
|
||||
recorder = MediaRecorder(this).also {
|
||||
recorder = MediaRecorder().also {
|
||||
recording = File.createTempFile("recording.3gp", null, cacheDir)
|
||||
|
||||
it.setAudioSource(MediaRecorder.AudioSource.MIC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user