updating commons

This commit is contained in:
tibbi
2022-02-05 11:37:16 +01:00
parent 154abdeb8e
commit 4b18b684f5
4 changed files with 41 additions and 24 deletions

View File

@ -187,7 +187,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
R.id.dialpad -> launchDialpad()
R.id.import_contacts -> tryImportContacts()
R.id.export_contacts -> tryExportContacts()
R.id.settings -> startActivity(Intent(applicationContext, SettingsActivity::class.java))
R.id.settings -> launchSettings()
R.id.about -> launchAbout()
else -> return super.onOptionsItemSelected(item)
}
@ -420,6 +420,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
}
private fun launchDialpad() {
hideKeyboard()
Intent(Intent.ACTION_DIAL).apply {
try {
startActivity(this)
@ -518,16 +519,23 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
toast(R.string.no_entries_for_exporting)
} else {
VcfExporter().exportContacts(this, outputStream, contacts, true) { result ->
toast(when (result) {
VcfExporter.ExportResult.EXPORT_OK -> R.string.exporting_successful
VcfExporter.ExportResult.EXPORT_PARTIAL -> R.string.exporting_some_entries_failed
else -> R.string.exporting_failed
})
toast(
when (result) {
VcfExporter.ExportResult.EXPORT_OK -> R.string.exporting_successful
VcfExporter.ExportResult.EXPORT_PARTIAL -> R.string.exporting_some_entries_failed
else -> R.string.exporting_failed
}
)
}
}
}
}
private fun launchSettings() {
hideKeyboard()
startActivity(Intent(applicationContext, SettingsActivity::class.java))
}
private fun launchAbout() {
val licenses = LICENSE_JODA or LICENSE_GLIDE or LICENSE_GSON or LICENSE_INDICATOR_FAST_SCROLL