Progress
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user