refactor: make TvFilePicker activity more sustainable

This commit is contained in:
albexk 2024-11-18 21:03:43 +03:00
parent 51092e91cf
commit 392cacaabc
2 changed files with 40 additions and 14 deletions

View file

@ -36,6 +36,10 @@ class TvFilePicker : ComponentActivity() {
Log.w(TAG, "Activity not found")
setResult(RESULT_CANCELED, Intent().apply { putExtra("activityNotFound", true) })
finish()
} catch (e: Exception) {
Log.e(TAG, "Failed to get file: $e")
setResult(RESULT_CANCELED)
finish()
}
}
}