private val saveLogcatActivityResultLauncher = registerForActivityResult(ActivityResultContracts.CreateDocument()) { fileNameUri: Uri? ->
// Only save the file if the URI is not null, which happens if the user exited the file picker by pressing back.
if (fileNameUri != null) {
private val saveLogcatActivityResultLauncher = registerForActivityResult(ActivityResultContracts.CreateDocument()) { fileNameUri: Uri? ->
// Only save the file if the URI is not null, which happens if the user exited the file picker by pressing back.
if (fileNameUri != null) {