aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/res/layout/git_passphrase_layout.xml
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-04-17 18:36:07 +0530
committerGitHub <noreply@github.com>2020-04-17 18:36:07 +0530
commitb94b52a42ddc2325b539d0956fd0adcf35308b52 (patch)
tree21f35526cfc444db82e1b4b08d083e49a3c1843b /app/src/main/res/layout/git_passphrase_layout.xml
parent4ffd7ed9bffa5139277ffb91de5a69f2b714222c (diff)
downloadHardenedPass-b94b52a42ddc2325b539d0956fd0adcf35308b52.tar.gz
HardenedPass-b94b52a42ddc2325b539d0956fd0adcf35308b52.zip
Refactor Git related activities (#685)
* Refactor git logic into separate parts * Extract hardcoded strings * Add KDoc to updateHostname, remove unused field * Cleanups * Fix dialog message * Wire in repository clone flow * spotless * Remove unused method * Cleanup GitActivity - Rename to GitOperationActivity. - Ensure identityBuilder is always closed regardless of what fragment uses it. - Remove hardcoded "Operation" strings and replace with REQUEST_ARG_OP. - Apply a transparent theme to GitOperationActivity make the UI less jarring. * Tweak some stupidly worded dialog messages As pointed out in #629, these strings are shoddily worded and do not express any clear intent to the user, leaving them confused and angry. * GitOperationActivity: wrap Context to ensure right theme is used * spotless * undo build.gradle change * Use correct parent theme, remove now useless wrapping * GitServerConfigActivity: fix repository clone flow * temp: disable leakcanary framework leaks on Samsung are pissing me off * Make system bars transparent in git activity * Tweak HTTPS password layout * Unhardcode wrong passphrase string * Store SSH passphrase in EncryptedSharedPreferences Also revamp the dialog to look a bit better * Implement support for remembering HTTPS password Fixes #521 * Try to patch HTTPS remote creation logic * Update security-crypto * Clear saved passphrase/password on auth failure * Revert "Update security-crypto" Broken on R DP2.1 This reverts commit 4b20371dd42c512a3dd3b759859abb6c1ffd2961. * Revert "temp: disable leakcanary" This reverts commit 2db7d41bd67b79c6dc8c5b359a7b27100379f45f. * Update CHANGELOG * Remove spacer * Remove useless override * Wrap git server activity in a ScrollView * GitOperation: always finish calling activity when dialogs are dismissed * Wipe saved password/passphrase when hostname changes * Don't commit prefs updates * Don't call listFiles excessively * Finish activity after saving configuration * Make ConnectionMode and Protocol enum classes * Change SSH key passphrase key, don't wipe on host change * Reimplement BaseGitActivity.updateUrl (was updateHostname) * Use SharedPreferences.edit KTX extension * Disable inapplicable connection modes depending on scheme * BaseGitActivity: annotate onDestroy with CallSuper We'll leak the identityBuilder connection otherwise * Move input hack for AlertDialog into an extension function We re-use this in many places * Fix protocol/mode toggle issue and consistenly name options * Fix a crash when opening GitServerConfigActivity without a repo * Fix OpenKeychain callbacks by moving onActivityResult to BaseGitActivity * Run spotlessApply Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Fabian Henneke <fabian@henneke.me>
Diffstat (limited to 'app/src/main/res/layout/git_passphrase_layout.xml')
-rw-r--r--app/src/main/res/layout/git_passphrase_layout.xml36
1 files changed, 18 insertions, 18 deletions
diff --git a/app/src/main/res/layout/git_passphrase_layout.xml b/app/src/main/res/layout/git_passphrase_layout.xml
index 814f4e40..c0922471 100644
--- a/app/src/main/res/layout/git_passphrase_layout.xml
+++ b/app/src/main/res/layout/git_passphrase_layout.xml
@@ -2,31 +2,31 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:padding="16dp">
- <EditText
- android:id="@+id/sshkey_passphrase"
- android:layout_width="0dp"
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/git_auth_passphrase_layout"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginEnd="16dp"
- android:layout_marginStart="16dp"
- android:layout_marginTop="8dp"
- android:ems="10"
- android:inputType="textPassword"
- android:importantForAccessibility="no"
+ app:hintEnabled="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent">
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/git_auth_passphrase"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/ssh_keygen_passphrase"
+ android:inputType="textPassword" />
+ </com.google.android.material.textfield.TextInputLayout>
- <CheckBox
- android:id="@+id/sshkey_remember_passphrase"
- android:layout_width="0dp"
+ <com.google.android.material.checkbox.MaterialCheckBox
+ android:id="@+id/git_auth_remember_passphrase"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginEnd="16dp"
- android:layout_marginStart="16dp"
- android:layout_marginTop="8dp"
android:text="@string/remember_the_passphrase"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/sshkey_passphrase" />
+ app:layout_constraintTop_toBottomOf="@+id/git_auth_passphrase_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>