Small improvement
This commit is contained in:
parent
9152671eed
commit
ffd89252c7
|
@ -172,9 +172,9 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, resultData)
|
||||
if (requestCode == PICK_IMPORT_SOURCE_INTENT && resultCode == Activity.RESULT_OK && resultData != null && resultData.data != null) {
|
||||
if (requestCode == PICK_IMPORT_SOURCE_INTENT && resultCode == Activity.RESULT_OK && resultData?.data != null) {
|
||||
tryImportContactsFromFile(resultData.data!!)
|
||||
} else if (requestCode == PICK_EXPORT_FILE_INTENT && resultCode == Activity.RESULT_OK && resultData != null && resultData.data != null) {
|
||||
} else if (requestCode == PICK_EXPORT_FILE_INTENT && resultCode == Activity.RESULT_OK && resultData?.data != null) {
|
||||
try {
|
||||
val outputStream = contentResolver.openOutputStream(resultData.data!!)
|
||||
exportContactsTo(ignoredExportContactSources, outputStream)
|
||||
|
|
Loading…
Reference in New Issue