Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-merge release/3.10 to release/4.0 branch #4263

Open
wants to merge 5 commits into
base: release/4.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading