Too many changes
This commit is contained in:
parent
d1bf1c44a1
commit
cbaa339c37
@ -5,6 +5,7 @@
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package net.mezimmah.wkt9
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.inputmethodservice.InputMethodService
|
||||
import android.media.AudioManager
|
||||
@ -398,7 +399,7 @@ class WKT9: InputMethodService(), SpellCheckerSession.SpellCheckerSessionListene
|
||||
|
||||
commitHistory.add(lastComposed)
|
||||
|
||||
loadSuggestions(commitHistory.joinToString(""))
|
||||
// loadSuggestions(commitHistory.joinToString(""))
|
||||
}
|
||||
|
||||
private fun loadSuggestions(word: String) {
|
||||
@ -421,11 +422,20 @@ class WKT9: InputMethodService(), SpellCheckerSession.SpellCheckerSessionListene
|
||||
}
|
||||
|
||||
private fun goHome() {
|
||||
with(Intent(Intent.ACTION_MAIN)) {
|
||||
this.addCategory(Intent.CATEGORY_HOME)
|
||||
this.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
if (Settings.canDrawOverlays(this)) {
|
||||
val startMain = Intent(Intent.ACTION_MAIN)
|
||||
|
||||
startActivity(this)
|
||||
startMain.addCategory(Intent.CATEGORY_HOME)
|
||||
startMain.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
|
||||
startActivity(startMain)
|
||||
} else {
|
||||
val intent = Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION)
|
||||
|
||||
intent.data = Uri.parse("package:$packageName")
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,8 +6,6 @@ import net.mezimmah.wkt9.keypad.Key
|
||||
import net.mezimmah.wkt9.keypad.KeyEventResult
|
||||
|
||||
class AlphaInputMode: BaseInputMode() {
|
||||
private val tag = "WKT9"
|
||||
|
||||
init {
|
||||
mode = "alpha"
|
||||
status = Status.CAP
|
||||
|
@ -6,6 +6,8 @@ import net.mezimmah.wkt9.keypad.KeyEventResult
|
||||
import net.mezimmah.wkt9.keypad.KeyLayout
|
||||
|
||||
open class BaseInputMode: InputMode {
|
||||
protected val tag = "WKT9"
|
||||
|
||||
protected var newKey = true
|
||||
protected var keyIndex = 0
|
||||
protected var lastKey: Key? = null
|
||||
|
@ -7,7 +7,6 @@ import net.mezimmah.wkt9.keypad.KeyCommandResolver
|
||||
import net.mezimmah.wkt9.keypad.KeyEventResult
|
||||
|
||||
class FNInputMode: BaseInputMode() {
|
||||
private val tag = "WKT9"
|
||||
override val keyCommandResolver: KeyCommandResolver = KeyCommandResolver(
|
||||
parent = super.keyCommandResolver,
|
||||
|
||||
|
@ -6,8 +6,6 @@ import net.mezimmah.wkt9.keypad.Key
|
||||
import net.mezimmah.wkt9.keypad.KeyEventResult
|
||||
|
||||
class IdleInputMode : BaseInputMode() {
|
||||
private val tag = "WKT9"
|
||||
|
||||
init {
|
||||
mode = "idle"
|
||||
status = Status.NA
|
||||
|
@ -7,7 +7,6 @@ import net.mezimmah.wkt9.keypad.KeyCommandResolver
|
||||
import net.mezimmah.wkt9.keypad.KeyEventResult
|
||||
|
||||
class NumericInputMode: BaseInputMode() {
|
||||
private val tag = "WKT9"
|
||||
override val keyCommandResolver: KeyCommandResolver = KeyCommandResolver(
|
||||
parent = super.keyCommandResolver,
|
||||
|
||||
|
@ -8,7 +8,6 @@ import net.mezimmah.wkt9.keypad.KeyLayout
|
||||
import java.lang.StringBuilder
|
||||
|
||||
class WordInputMode: BaseInputMode() {
|
||||
private val tag = "WKT9"
|
||||
private val codeWord = StringBuilder()
|
||||
|
||||
init {
|
||||
|
@ -16,7 +16,7 @@ object KeyLayout {
|
||||
)
|
||||
|
||||
val en_US = mapOf(
|
||||
Key.N1 to listOf('.','?','!',',','-','\'','"','@','$','/','%',':','(',')'),
|
||||
Key.N1 to listOf('.','?','!',',','-','+','=','\'','"','@','$','/','%',':','(',')'),
|
||||
Key.N2 to listOf('a','b','c','ä','æ','å','à','á','â','ã','ç'),
|
||||
Key.N3 to listOf('d','e','f','è','é','ê','ë','đ'),
|
||||
Key.N4 to listOf('g','h','i','ì','í','î','ï'),
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id("com.android.application") version "8.1.0" apply false
|
||||
id("com.android.application") version "8.1.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.8.0" apply false
|
||||
id("com.google.devtools.ksp") version "1.8.10-1.0.9" apply false
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user