aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-02-26 01:58:20 +0530
committerGitHub <noreply@github.com>2022-02-26 01:58:20 +0530
commit778834d5e4d2095a5a95007dd303ebd8e6c08493 (patch)
tree56aa39f7cb300df0fe3297b0c1cf969c17f477af /app
parent0af4e2920cd22d2b680faa26aac77d4baf84f36c (diff)
Upgrade ktfmt to 0.33 (#1753)
* build: upgrade ktfmt to 0.33 * all: reformat with ktfmt 0.33
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt11
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt7
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/util/git/sshj/OpenKeychainKeyProvider.kt25
3 files changed, 20 insertions, 23 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt
index 6be60fa2..ddabb8a8 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt
@@ -178,12 +178,11 @@ class AutofillFilterView : AppCompatActivity() {
setText(initialSearch, TextView.BufferType.EDITABLE)
addTextChangedListener { updateSearch() }
}
- origin.text =
- buildSpannedString {
- append(getString(R.string.oreo_autofill_select_and_fill_into))
- append("\n")
- bold { append(formOrigin.getPrettyIdentifier(applicationContext, untrusted = true)) }
- }
+ origin.text = buildSpannedString {
+ append(getString(R.string.oreo_autofill_select_and_fill_into))
+ append("\n")
+ bold { append(formOrigin.getPrettyIdentifier(applicationContext, untrusted = true)) }
+ }
strictDomainSearch.apply {
visibility = if (formOrigin is FormOrigin.Web) View.VISIBLE else View.GONE
isChecked = formOrigin is FormOrigin.Web
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt b/app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt
index c6da00b6..db3d3670 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt
@@ -33,10 +33,9 @@ class PasswordSettings(private val activity: FragmentActivity) : SettingsProvide
}
editText(PreferenceKeys.GENERAL_SHOW_TIME) {
titleRes = R.string.pref_clipboard_timeout_title
- summaryProvider =
- { timeout ->
- activity.getString(R.string.pref_clipboard_timeout_summary, timeout ?: "45")
- }
+ summaryProvider = { timeout ->
+ activity.getString(R.string.pref_clipboard_timeout_summary, timeout ?: "45")
+ }
textInputType = InputType.TYPE_CLASS_NUMBER
}
checkBox(PreferenceKeys.SHOW_PASSWORD) {
diff --git a/app/src/main/java/dev/msfjarvis/aps/util/git/sshj/OpenKeychainKeyProvider.kt b/app/src/main/java/dev/msfjarvis/aps/util/git/sshj/OpenKeychainKeyProvider.kt
index 3a40b8a2..90d0ecc1 100644
--- a/app/src/main/java/dev/msfjarvis/aps/util/git/sshj/OpenKeychainKeyProvider.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/util/git/sshj/OpenKeychainKeyProvider.kt
@@ -76,21 +76,20 @@ class OpenKeychainKeyProvider private constructor(val activity: ContinuationCont
}
private suspend fun prepare() {
- sshServiceApi =
- suspendCoroutine { cont ->
- sshServiceConnection.connect(
- object : SshAuthenticationConnection.OnBound {
- override fun onBound(sshAgent: ISshAuthenticationService) {
- logcat { "Bound to SshAuthenticationApi: $OPENPGP_PROVIDER" }
- cont.resume(SshAuthenticationApi(context, sshAgent))
- }
+ sshServiceApi = suspendCoroutine { cont ->
+ sshServiceConnection.connect(
+ object : SshAuthenticationConnection.OnBound {
+ override fun onBound(sshAgent: ISshAuthenticationService) {
+ logcat { "Bound to SshAuthenticationApi: $OPENPGP_PROVIDER" }
+ cont.resume(SshAuthenticationApi(context, sshAgent))
+ }
- override fun onError() {
- throw UserAuthException(DisconnectReason.UNKNOWN, "OpenKeychain service unavailable")
- }
+ override fun onError() {
+ throw UserAuthException(DisconnectReason.UNKNOWN, "OpenKeychain service unavailable")
}
- )
- }
+ }
+ )
+ }
if (keyId == null) {
selectKey()