diff --git a/app/build.gradle b/app/build.gradle index bdf706f2..2a8e6837 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,8 +29,8 @@ android { applicationId 'ee.ioc.phon.android.speak' minSdkVersion 23 targetSdkVersion 33 - versionCode 1900 - versionName '1.9.00' + versionCode 1901 + versionName '1.9.01' vectorDrawables.useSupportLibrary = true // Keep only en and et resources resConfigs 'en', 'et' @@ -72,7 +72,7 @@ android { lint { // TODO: in the future check for Kotlin-Java interop //check 'Interoperability' - disable 'ResourceType', 'AppLinkUrlError', 'EllipsizeMaxLines', 'RtlSymmetry', 'Autofill', 'QueryAllPackagesPermission' + disable 'ResourceType', 'AppLinkUrlError', 'EllipsizeMaxLines', 'RtlSymmetry', 'Autofill' } namespace 'ee.ioc.phon.android.speak' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index db9b553d..e5aae095 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -40,16 +40,6 @@ mute the audio stream during recognition. --> - - - + + + + ? = null override fun onComboChange(language: String, service: ComponentName) { - mRewriters = Utils.genRewriters(mPrefs, mRes, arrayOf("Base", "Commands"), - CommandMatcherFactory.createCommandFilter(language, service, componentName)) + mRewriters = Utils.genRewriters( + mPrefs, mRes, arrayOf("Base", "Commands"), + CommandMatcherFactory.createCommandFilter(language, service, componentName) + ) } override fun onFinalResult(results: List, bundle: Bundle) { @@ -96,22 +98,26 @@ class ChatDemoActivity : AppCompatActivity() { siv.init(R.array.keysActivity, callerInfo, false, null) siv.setListener(speechInputViewListener, null) - (findViewById(android.R.id.list) as ListView).onItemClickListener = AdapterView.OnItemClickListener { parent, _, position, _ -> - val entry = parent.adapter.getItem(position) - startActivity(entry.toString()) - } + (findViewById(android.R.id.list)).onItemClickListener = + AdapterView.OnItemClickListener { parent, _, position, _ -> + val entry = parent.adapter.getItem(position) + startActivity(entry.toString()) + } } private fun startActivity(intentAsJson: String) { try { - IntentUtils.startActivityIfAvailable(this, JsonUtils.createIntent(intentAsJson)) + IntentUtils.startActivity(this, JsonUtils.createIntent(intentAsJson)) } catch (e: JSONException) { toast(e.localizedMessage) + } catch (e: SecurityException) { + toast(e.localizedMessage) } } private fun updateListView(list: List) { - (findViewById(android.R.id.list) as ListView).adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, list) + (findViewById(android.R.id.list)).adapter = + ArrayAdapter(this, android.R.layout.simple_list_item_1, list) } private fun toast(message: String) { diff --git a/speechutils b/speechutils index b6f0184e..51e1c4c2 160000 --- a/speechutils +++ b/speechutils @@ -1 +1 @@ -Subproject commit b6f0184e9a200edccd05623cc03d3cf2a6c90b22 +Subproject commit 51e1c4c25d66eb832a3840d8fd25c13939ac8913