Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release/3.10' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
TranceLove committed Oct 10, 2024
2 parents 5cb924a + f4eec02 commit 0f01031
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ class SftpConnectDialog : DialogFragment() {

val accentColor = (activity as ThemedActivity).accent

// Use system provided action to get Uri to PEM.
// Use system provided action to get Uri to PEM (mostly via DocumentsUI).
binding.selectPemBTN.setOnClickListener {
val intent =
Intent()
.setType(MimeTypes.ALL_MIME_TYPES)
.setAction(Intent.ACTION_GET_CONTENT)
activityResultHandlerForPemSelection.launch(intent)
activityResultHandlerForPemSelection.launch(
Intent.createChooser(intent, getString(R.string.ssh_select_pem)),
)
}

// Define action for buttons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class SftpConnectDialogSshTest : AbstractSftpConnectDialogTests() {
/**
* Test invoke [SftpConnectDialog] with arguments including password and URL encoded path.
*/
@Suppress("ktlint:standard:max-line-length")
@Suppress("ktlint:standard:max-line-length", "ktlint:standard:no-single-line-block-comment")
@Test
@Throws(GeneralSecurityException::class, IOException::class)
fun testInvokeSftpConnectionDialogWithPasswordAndEncodedDefaultPath() {
Expand Down Expand Up @@ -163,7 +163,7 @@ class SftpConnectDialogSshTest : AbstractSftpConnectDialogTests() {
val mocked = mc.constructed()[0]
await().atMost(10, TimeUnit.SECONDS).until { mocked.arguments != null }
for (key in BUNDLE_KEYS) {
if (mocked.arguments!!.getString(key) != null) {
if (mocked.arguments?.getString(key) != null) {
if (key == ARG_PASSWORD) {
assertEquals(
verify.getString(key),
Expand All @@ -179,4 +179,19 @@ class SftpConnectDialogSshTest : AbstractSftpConnectDialogTests() {
}
}
}

companion object {
@JvmStatic
private val BUNDLE_KEYS =
arrayOf(
"address",
"port",
"keypairName",
"name",
"username",
"password",
"edit",
"defaultPath",
)
}
}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ allprojects {
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://jcenter.bintray.com" }
maven { url "https://repository.liferay.com/nexus/content/repositories/public/"}
}
tasks.withType(Test).tap {
configureEach {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ apacheMina = "2.0.16"
mockito = "4.11.0"
mockitoInline = "4.11.0"
mockitoKotlin = "4.1.0"
androidBilling = "5.0.0"
androidBilling = "6.0.1"
cloudrailSiAndroid = "2.22.4"
junrar = "7.4.0"
vectordrawableAnimated = "1.1.0"
Expand Down

0 comments on commit 0f01031

Please sign in to comment.