lint: Linting

This commit is contained in:
Kumi 2025-03-24 10:35:16 +01:00
parent 310ada53e2
commit f546ee245d
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 6 additions and 6 deletions

View file

@ -84,9 +84,9 @@ class PasswordExportService : Service() {
private fun copyFileToDir(passwordFile: DocumentFile, targetDirectory: DocumentFile) {
val sourceInputStream = contentResolver.openInputStream(passwordFile.uri)
val name = passwordFile.name
val targetPasswordFile =
val targetPasswordFile =
targetDirectory.createFile(
"application/octet-stream",
"application/octet-stream",
requireNotNull(name) { "File name cannot be null" }
)
if (targetPasswordFile?.exists() == true) {
@ -108,9 +108,10 @@ class PasswordExportService : Service() {
sourceDirectory.listFiles().forEach { file ->
if (file.isDirectory) {
// Create new directory and recurse
val newDir = targetDirectory.createDirectory(
requireNotNull(file.name) { "File name cannot be null when creating directory" }
)
val newDir =
targetDirectory.createDirectory(
requireNotNull(file.name) { "File name cannot be null when creating directory" }
)
copyDirToDir(
file,
requireNotNull(newDir) { "Target directory cannot be null when copying directories" }

View file

@ -8,7 +8,6 @@ import android.app.assist.AssistStructure
import android.content.Context
import android.content.pm.PackageManager
import android.content.pm.PackageManager.ApplicationInfoFlags
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.view.autofill.AutofillId