chore: Linting
All checks were successful
Deploy snapshot builds / deploy-release-snapshot (push) Successful in 17m31s
All checks were successful
Deploy snapshot builds / deploy-release-snapshot (push) Successful in 17m31s
This commit is contained in:
parent
0d2dcb3247
commit
1d243c0d03
3 changed files with 18 additions and 16 deletions
|
@ -87,7 +87,7 @@ class PasswordExportService : Service() {
|
|||
val targetPasswordFile =
|
||||
targetDirectory.createFile(
|
||||
"application/octet-stream",
|
||||
requireNotNull(name) { "File name cannot be null" }
|
||||
requireNotNull(name) { "File name cannot be null" },
|
||||
)
|
||||
if (targetPasswordFile?.exists() == true) {
|
||||
val destOutputStream = contentResolver.openOutputStream(targetPasswordFile.uri)
|
||||
|
@ -114,7 +114,7 @@ class PasswordExportService : Service() {
|
|||
)
|
||||
copyDirToDir(
|
||||
file,
|
||||
requireNotNull(newDir) { "Target directory cannot be null when copying directories" }
|
||||
requireNotNull(newDir) { "Target directory cannot be null when copying directories" },
|
||||
)
|
||||
} else {
|
||||
copyFileToDir(file, targetDirectory)
|
||||
|
|
|
@ -8,11 +8,11 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.pm.PackageManager.ResolveInfoFlags
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.provider.Settings
|
||||
import android.service.autofill.SaveInfo
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.net.toUri
|
||||
|
||||
/**
|
||||
* In order to add a new browser, do the following:
|
||||
|
@ -244,7 +244,7 @@ private fun getBrowserAutofillSupportLevel(
|
|||
public fun getInstalledBrowsersWithAutofillSupportLevel(
|
||||
context: Context
|
||||
): List<Pair<String, BrowserAutofillSupportLevel>> {
|
||||
val testWebIntent = Intent(Intent.ACTION_VIEW).apply { data = Uri.parse("https://example.org") }
|
||||
val testWebIntent = Intent(Intent.ACTION_VIEW).apply { data = "https://example.org".toUri() }
|
||||
val installedBrowsers =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
context.packageManager.queryIntentActivities(
|
||||
|
|
|
@ -86,9 +86,9 @@ class PGPKeyManagerTest {
|
|||
// Add key using KeyManager
|
||||
keyManager.addKey(secretKey).unwrap()
|
||||
// Remove key
|
||||
keyManager.removeKey(
|
||||
requireNotNull(tryGetId(secretKey)) { "Failed to get ID from secret key" }
|
||||
).unwrap()
|
||||
keyManager
|
||||
.removeKey(requireNotNull(tryGetId(secretKey)) { "Failed to get ID from secret key" })
|
||||
.unwrap()
|
||||
// Check that no keys remain
|
||||
val keys = keyManager.getAllKeys().unwrap()
|
||||
assertEquals(0, keys.size)
|
||||
|
@ -211,13 +211,15 @@ class PGPKeyManagerTest {
|
|||
PGPKey(
|
||||
requireNotNull(this::class.java.classLoader.getResource("alice_owner@example_com")) {
|
||||
"Resource 'alice_owner@example_com' not found"
|
||||
}.readBytes()
|
||||
}
|
||||
.readBytes()
|
||||
)
|
||||
val bobby =
|
||||
PGPKey(
|
||||
requireNotNull(this::class.java.classLoader.getResource("bobby_owner@example_com")) {
|
||||
"Resource 'bobby_owner@example_com' not found"
|
||||
}.readBytes()
|
||||
}
|
||||
.readBytes()
|
||||
)
|
||||
assertTrue(keyManager.addKey(alice).isOk)
|
||||
assertTrue(keyManager.addKey(bobby).isOk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue