Treewide codestyle cleanup (#765)

- Updated gitignore and checked in the IDE's codestyle config
- Removed spotless as the underlying ktlint backend has failed to resolve the super frustrating import order bug[1] in nearly a year
- Reformat the entire codebase based on the previously committed code style configuration.

1: https://github.com/pinterest/ktlint/issues/527
This commit is contained in:
Harsh Shandilya 2020-05-10 19:21:39 +05:30 committed by GitHub
parent 94dc92f8d7
commit 041cf00510
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
136 changed files with 1603 additions and 1255 deletions

View file

@ -20,7 +20,7 @@
## :pencil: Checklist ## :pencil: Checklist
<!--- Put an `x` in the boxes that apply --> <!--- Put an `x` in the boxes that apply -->
- [ ] I ran `./gradlew spotlessApply` before submitting the PR - [ ] I formatted the code with the IDE's reformat action (Ctrl + Shift + L/Cmd + Shift + L)
- [ ] I reviewed submitted code - [ ] I reviewed submitted code

View file

@ -28,9 +28,6 @@ jobs:
- name: Download gradle dependencies - name: Download gradle dependencies
run: ./gradlew dependencies run: ./gradlew dependencies
- name: Validate codestyle with Spotless
run: ./gradlew spotlessCheck
- name: Build release app - name: Build release app
run: ./gradlew :app:assembleRelease run: ./gradlew :app:assembleRelease
env: env:

View file

@ -52,7 +52,7 @@ jobs:
${{ runner.os }}-gradlebuildcache- ${{ runner.os }}-gradlebuildcache-
- name: Run unit tests - name: Run unit tests
run: ./gradlew spotlessCheck test${{ matrix.variant }} lint${{ matrix.variant}} -Dpre-dex=false run: ./gradlew test${{ matrix.variant }} lint${{ matrix.variant}} -Dpre-dex=false
- name: Run instrumentation tests - name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2 uses: reactivecircus/android-emulator-runner@v2

173
.gitignore vendored
View file

@ -1,42 +1,153 @@
#Android specific
bin
gen
obj
lint.xml
local.properties
release.properties
ant.properties
*.class
*.apk
!app-release.apk
!app-debug.apk
#Gradle # Created by https://www.gitignore.io/api/androidstudio,gradle
# Edit at https://www.gitignore.io/?templates=androidstudio,gradle
### Gradle ###
.gradle .gradle
build build/
.DS_Store
#Maven # Ignore Gradle GUI config
target gradle-app.setting
pom.xml.*
#Eclipse # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
.project !gradle-wrapper.jar
.classpath
.settings
.metadata
#Eclipse/Gradle integration # Cache of project
libs .gradletasknamecache
project.properties
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
### Gradle Patch ###
**/build/
### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
# Signing files
.signing/
keystore.*
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
captures/
.navigation/
*.ipr
*~
*.swp
# Android Patch
gen-external-apklibs
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# NDK
obj/
# IntelliJ IDEA # IntelliJ IDEA
.idea
*.iml *.iml
*.iws
/out/
# Visual Studio Code # User-specific configurations
.vscode/ .idea/caches/
.idea/libraries/
.idea/shelf/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/assetWizardSettings.xml
captures/ # OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
keystore.* # Legacy Eclipse project files
.classpath
.project
.cproject
.settings/
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.war
*.ear
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*
## Plugin-specific files:
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Mongo Explorer plugin
.idea/mongoSettings.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### AndroidStudio Patch ###
!/gradle/wrapper/gradle-wrapper.jar
# End of https://www.gitignore.io/api/androidstudio,gradle

168
.idea/codeStyles/Project.xml generated Normal file
View file

@ -0,0 +1,168 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="AUTODETECT_INDENTS" value="false" />
<option name="LINE_SEPARATOR" value="&#10;" />
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
<option name="FORMATTER_TAGS_ENABLED" value="true" />
<option name="SOFT_MARGINS" value="100" />
<JavaCodeStyleSettings>
<option name="DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION" value="true" />
</JavaCodeStyleSettings>
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value />
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
<option name="CONTINUATION_INDENT_IN_PARAMETER_LISTS" value="true" />
<option name="CONTINUATION_INDENT_IN_ARGUMENT_LISTS" value="true" />
<option name="CONTINUATION_INDENT_FOR_EXPRESSION_BODIES" value="true" />
<option name="CONTINUATION_INDENT_FOR_CHAINED_CALLS" value="true" />
<option name="CONTINUATION_INDENT_IN_SUPERTYPE_LISTS" value="true" />
<option name="CONTINUATION_INDENT_IN_IF_CONDITIONS" value="true" />
<option name="CONTINUATION_INDENT_IN_ELVIS" value="true" />
<option name="WRAP_EXPRESSION_BODY_FUNCTIONS" value="0" />
<option name="IF_RPAREN_ON_NEW_LINE" value="false" />
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="METHOD_ANNOTATION_WRAP" value="0" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
<option name="RIGHT_MARGIN" value="100" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="CALL_PARAMETERS_WRAP" value="0" />
<option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="false" />
<option name="CALL_PARAMETERS_RPAREN_ON_NEXT_LINE" value="false" />
<option name="METHOD_PARAMETERS_WRAP" value="0" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="false" />
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="false" />
<option name="EXTENDS_LIST_WRAP" value="0" />
<option name="METHOD_CALL_CHAIN_WRAP" value="0" />
<option name="ASSIGNMENT_WRAP" value="0" />
<option name="METHOD_ANNOTATION_WRAP" value="0" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
<option name="WRAP_ON_TYPING" value="0" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View file

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

6
.idea/copyright/APS.xml generated Normal file
View file

@ -0,0 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="/*&#10; * Copyright © 2014-&amp;#36;today.year The Android Password Store Authors. All Rights Reserved.&#10; * SPDX-License-Identifier: GPL-3.0-only&#10; */&#10;" />
<option name="myName" value="APS" />
</copyright>
</component>

22
.idea/gradle.xml generated Normal file
View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$USER_HOME$/.sdkman/candidates/gradle/current" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>

12
.idea/runConfigurations.xml generated Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

View file

@ -4,11 +4,11 @@
*/ */
package com.zeapo.pwdstore package com.zeapo.pwdstore
import org.junit.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertFalse import kotlin.test.assertFalse
import kotlin.test.assertNull import kotlin.test.assertNull
import kotlin.test.assertTrue import kotlin.test.assertTrue
import org.junit.Test
class PasswordEntryTest { class PasswordEntryTest {
@Test fun testGetPassword() { @Test fun testGetPassword() {

View file

@ -4,10 +4,10 @@
*/ */
package com.zeapo.pwdstore package com.zeapo.pwdstore
import org.junit.Test
import kotlin.test.assertFalse import kotlin.test.assertFalse
import kotlin.test.assertNull import kotlin.test.assertNull
import kotlin.test.assertTrue import kotlin.test.assertTrue
import org.junit.Test
private infix fun String.matchedForDomain(domain: String) = private infix fun String.matchedForDomain(domain: String) =
SearchableRepositoryViewModel.generateStrictDomainRegex(domain)?.containsMatchIn(this) == true SearchableRepositoryViewModel.generateStrictDomainRegex(domain)?.containsMatchIn(this) == true

View file

@ -3,23 +3,24 @@
android:height="108dp" android:height="108dp"
android:viewportWidth="110.34687" android:viewportWidth="110.34687"
android:viewportHeight="110.34687"> android:viewportHeight="110.34687">
<group android:translateX="24.828047" <group
android:translateX="24.828047"
android:translateY="24.828047"> android:translateY="24.828047">
<path <path
android:fillColor="#00000000"
android:pathData="m18.8,30.2129v-11.546c0,-6.4144 5.1315,-11.546 11.546,-11.546 6.4144,0 11.546,5.1315 11.546,11.546v11.546" android:pathData="m18.8,30.2129v-11.546c0,-6.4144 5.1315,-11.546 11.546,-11.546 6.4144,0 11.546,5.1315 11.546,11.546v11.546"
android:strokeWidth="5.349" android:strokeWidth="5.349"
android:fillColor="#00000000"
android:strokeColor="#013e5b" /> android:strokeColor="#013e5b" />
<path <path
android:pathData="M15.4099,21.8429L45.2811,21.8429A2.2639,2.2639 0,0 1,47.545 24.1068L47.545,53.977A2.2639,2.2639 0,0 1,45.2811 56.2409L15.4099,56.2409A2.2639,2.2639 0,0 1,13.146 53.977L13.146,24.1068A2.2639,2.2639 0,0 1,15.4099 21.8429z" android:fillColor="#c74c00"
android:fillColor="#c74c00"/> android:pathData="M15.4099,21.8429L45.2811,21.8429A2.2639,2.2639 0,0 1,47.545 24.1068L47.545,53.977A2.2639,2.2639 0,0 1,45.2811 56.2409L15.4099,56.2409A2.2639,2.2639 0,0 1,13.146 53.977L13.146,24.1068A2.2639,2.2639 0,0 1,15.4099 21.8429z" />
<path <path
android:fillColor="#fff"
android:pathData="m44.8267,37.6961 l-13.1408,-13.1393c-0.7569,-0.7566 -1.9838,-0.7566 -2.7408,0l-13.08,13.0785c-0.7567,0.7573 -0.7567,1.9846 0,2.7419l13.1415,13.14c0.7572,0.7567 1.9842,0.7567 2.7414,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421" android:pathData="m44.8267,37.6961 l-13.1408,-13.1393c-0.7569,-0.7566 -1.9838,-0.7566 -2.7408,0l-13.08,13.0785c-0.7567,0.7573 -0.7567,1.9846 0,2.7419l13.1415,13.14c0.7572,0.7567 1.9842,0.7567 2.7414,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421"
android:strokeWidth=".35344" android:strokeWidth=".35344" />
android:fillColor="#fff"/>
<path <path
android:fillColor="#f47a68"
android:pathData="m30.3156,23.9881c-0.496,0 -0.992,0.1893 -1.3705,0.5676l-2.7282,2.7288 3.4612,3.4606c0.8044,-0.2715 1.727,-0.0892 2.368,0.5517 0.6237,0.624 0.8361,1.5493 0.5471,2.3828l3.3357,3.3357c0.8076,-0.2777 1.738,-0.098 2.3828,0.5476 0.9008,0.9005 0.9008,2.361 0,3.2615 -1.7823,1.7848 -4.7253,-0.1767 -3.7641,-2.5087l-3.1111,-3.1106c-2.2315,0.5285 -3.8934,-1.2655 -3.149,-3.1674l-0.6863,-0.6863l0,15.9165l5.4913,0l0,-5.8608c-0.0315,-0.7566 1.1201,-0.7566 1.0886,0l0,6.4043c0.0005,0.3013 -0.2438,0.5457 -0.545,0.5455l-6.5804,0c-0.3015,0.0005 -0.546,-0.2441 -0.5456,-0.5455l0,-17.4333c-0.0005,-0.0363 0.0029,-0.0728 0.0097,-0.1085l-1.6444,-1.6444 -9.0106,9.0084c-0.7567,0.7573 -0.7567,1.9848 0,2.7421l13.1415,13.14c0.7572,0.7567 1.9844,0.7567 2.7416,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421l-13.14,-13.1393c-0.3785,-0.3783 -0.8746,-0.5676 -1.3705,-0.5676zM29.9512,39.1825c0.1001,0 0.1808,0.0381 0.2426,0.1146 0.0648,0.0736 0.1326,0.1975 0.2032,0.371 0.0705,0.1706 0.1089,0.2615 0.1146,0.2733 0.0059,-0.0119 0.0424,-0.1026 0.11,-0.2733 0.0707,-0.1705 0.1401,-0.2946 0.2078,-0.371 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2103 0.1592,0.3485 0,0.0676 -0.0179,0.1368 -0.0532,0.2073 -0.0323,0.0707 -0.0777,0.1444 -0.1366,0.2211 -0.056,0.0734 -0.1164,0.1571 -0.1812,0.2513 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0354 0.3004,-0.0354 0.0969,0 0.1762,0.0224 0.238,0.0666 0.0648,0.0442 0.1118,0.1042 0.1413,0.1807 0.0294,0.0734 0.044,0.1544 0.044,0.2426 0,0.1384 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1372 -0.3219,0.1372 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.0386 -0.3045,-0.0446 0.1531,0.2177 0.2534,0.3652 0.3004,0.4417 0.047,0.0736 0.0706,0.1544 0.0706,0.2426 0,0.1412 -0.0533,0.2556 -0.1592,0.3439 -0.1028,0.0853 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0366 -0.2559,-0.11 -0.0646,-0.0767 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0235 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1646 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.11 -0.2513,0.11 -0.15,0 -0.2779,-0.0427 -0.3838,-0.1279 -0.1059,-0.0883 -0.1587,-0.2027 -0.1587,-0.3439 0,-0.0618 0.0156,-0.1263 0.0481,-0.194 0.0323,-0.0707 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1532 0.2206,-0.3091 -0.0736,0.0059 -0.1751,0.021 -0.3045,0.0446 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.046 -0.3311,-0.1372 -0.0707,-0.0941 -0.1059,-0.2101 -0.1059,-0.3485 0,-0.1411 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0107 0.2687,0.0312 0.1059,0.0206 0.2062,0.038 0.3004,0.0527 -0.0824,-0.1177 -0.1648,-0.2366 -0.2472,-0.3572 -0.0824,-0.1206 -0.1233,-0.2282 -0.1233,-0.3224 0,-0.1382 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412zM29.9512,43.2235c0.1001,0 0.1808,0.0383 0.2426,0.1146 0.0648,0.0735 0.1326,0.197 0.2032,0.3705 0.0705,0.1707 0.1089,0.262 0.1146,0.2738 0.0059,-0.0119 0.0424,-0.1031 0.11,-0.2738 0.0707,-0.1705 0.1401,-0.2941 0.2078,-0.3705 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2102 0.1592,0.3485 0,0.0675 -0.0179,0.1366 -0.0532,0.2073 -0.0323,0.0705 -0.0777,0.1441 -0.1366,0.2206 -0.056,0.0735 -0.1164,0.1576 -0.1812,0.2518 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0353 0.3004,-0.0353 0.0969,0 0.1762,0.0219 0.238,0.0661 0.0648,0.0442 0.1118,0.1047 0.1413,0.1812 0.0294,0.0736 0.044,0.1542 0.044,0.2426 0,0.1382 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1366 -0.3219,0.1366 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.038 -0.3045,-0.044 0.1531,0.2177 0.2534,0.3647 0.3004,0.4411 0.047,0.0736 0.0706,0.1549 0.0706,0.2431 0,0.1411 -0.0533,0.2558 -0.1592,0.3439 -0.1028,0.0854 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0371 -0.2559,-0.1105 -0.0646,-0.0765 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0236 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1648 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.1105 -0.2513,0.1105 -0.15,0 -0.2779,-0.0425 -0.3838,-0.1279 -0.1059,-0.0881 -0.1587,-0.2028 -0.1587,-0.3439 0,-0.0617 0.0156,-0.1268 0.0481,-0.1945 0.0323,-0.0705 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1527 0.2206,-0.3086 -0.0736,0.0059 -0.1751,0.0205 -0.3045,0.044 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.0454 -0.3311,-0.1366 -0.0707,-0.0941 -0.1059,-0.2103 -0.1059,-0.3485 0,-0.1412 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0101 0.2687,0.0307 0.1059,0.0204 0.2062,0.0384 0.3004,0.0532 -0.0824,-0.1177 -0.1648,-0.2371 -0.2472,-0.3577 -0.0824,-0.1206 -0.1233,-0.2278 -0.1233,-0.3219 0,-0.1384 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412z" android:pathData="m30.3156,23.9881c-0.496,0 -0.992,0.1893 -1.3705,0.5676l-2.7282,2.7288 3.4612,3.4606c0.8044,-0.2715 1.727,-0.0892 2.368,0.5517 0.6237,0.624 0.8361,1.5493 0.5471,2.3828l3.3357,3.3357c0.8076,-0.2777 1.738,-0.098 2.3828,0.5476 0.9008,0.9005 0.9008,2.361 0,3.2615 -1.7823,1.7848 -4.7253,-0.1767 -3.7641,-2.5087l-3.1111,-3.1106c-2.2315,0.5285 -3.8934,-1.2655 -3.149,-3.1674l-0.6863,-0.6863l0,15.9165l5.4913,0l0,-5.8608c-0.0315,-0.7566 1.1201,-0.7566 1.0886,0l0,6.4043c0.0005,0.3013 -0.2438,0.5457 -0.545,0.5455l-6.5804,0c-0.3015,0.0005 -0.546,-0.2441 -0.5456,-0.5455l0,-17.4333c-0.0005,-0.0363 0.0029,-0.0728 0.0097,-0.1085l-1.6444,-1.6444 -9.0106,9.0084c-0.7567,0.7573 -0.7567,1.9848 0,2.7421l13.1415,13.14c0.7572,0.7567 1.9844,0.7567 2.7416,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421l-13.14,-13.1393c-0.3785,-0.3783 -0.8746,-0.5676 -1.3705,-0.5676zM29.9512,39.1825c0.1001,0 0.1808,0.0381 0.2426,0.1146 0.0648,0.0736 0.1326,0.1975 0.2032,0.371 0.0705,0.1706 0.1089,0.2615 0.1146,0.2733 0.0059,-0.0119 0.0424,-0.1026 0.11,-0.2733 0.0707,-0.1705 0.1401,-0.2946 0.2078,-0.371 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2103 0.1592,0.3485 0,0.0676 -0.0179,0.1368 -0.0532,0.2073 -0.0323,0.0707 -0.0777,0.1444 -0.1366,0.2211 -0.056,0.0734 -0.1164,0.1571 -0.1812,0.2513 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0354 0.3004,-0.0354 0.0969,0 0.1762,0.0224 0.238,0.0666 0.0648,0.0442 0.1118,0.1042 0.1413,0.1807 0.0294,0.0734 0.044,0.1544 0.044,0.2426 0,0.1384 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1372 -0.3219,0.1372 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.0386 -0.3045,-0.0446 0.1531,0.2177 0.2534,0.3652 0.3004,0.4417 0.047,0.0736 0.0706,0.1544 0.0706,0.2426 0,0.1412 -0.0533,0.2556 -0.1592,0.3439 -0.1028,0.0853 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0366 -0.2559,-0.11 -0.0646,-0.0767 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0235 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1646 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.11 -0.2513,0.11 -0.15,0 -0.2779,-0.0427 -0.3838,-0.1279 -0.1059,-0.0883 -0.1587,-0.2027 -0.1587,-0.3439 0,-0.0618 0.0156,-0.1263 0.0481,-0.194 0.0323,-0.0707 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1532 0.2206,-0.3091 -0.0736,0.0059 -0.1751,0.021 -0.3045,0.0446 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.046 -0.3311,-0.1372 -0.0707,-0.0941 -0.1059,-0.2101 -0.1059,-0.3485 0,-0.1411 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0107 0.2687,0.0312 0.1059,0.0206 0.2062,0.038 0.3004,0.0527 -0.0824,-0.1177 -0.1648,-0.2366 -0.2472,-0.3572 -0.0824,-0.1206 -0.1233,-0.2282 -0.1233,-0.3224 0,-0.1382 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412zM29.9512,43.2235c0.1001,0 0.1808,0.0383 0.2426,0.1146 0.0648,0.0735 0.1326,0.197 0.2032,0.3705 0.0705,0.1707 0.1089,0.262 0.1146,0.2738 0.0059,-0.0119 0.0424,-0.1031 0.11,-0.2738 0.0707,-0.1705 0.1401,-0.2941 0.2078,-0.3705 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2102 0.1592,0.3485 0,0.0675 -0.0179,0.1366 -0.0532,0.2073 -0.0323,0.0705 -0.0777,0.1441 -0.1366,0.2206 -0.056,0.0735 -0.1164,0.1576 -0.1812,0.2518 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0353 0.3004,-0.0353 0.0969,0 0.1762,0.0219 0.238,0.0661 0.0648,0.0442 0.1118,0.1047 0.1413,0.1812 0.0294,0.0736 0.044,0.1542 0.044,0.2426 0,0.1382 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1366 -0.3219,0.1366 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.038 -0.3045,-0.044 0.1531,0.2177 0.2534,0.3647 0.3004,0.4411 0.047,0.0736 0.0706,0.1549 0.0706,0.2431 0,0.1411 -0.0533,0.2558 -0.1592,0.3439 -0.1028,0.0854 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0371 -0.2559,-0.1105 -0.0646,-0.0765 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0236 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1648 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.1105 -0.2513,0.1105 -0.15,0 -0.2779,-0.0425 -0.3838,-0.1279 -0.1059,-0.0881 -0.1587,-0.2028 -0.1587,-0.3439 0,-0.0617 0.0156,-0.1268 0.0481,-0.1945 0.0323,-0.0705 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1527 0.2206,-0.3086 -0.0736,0.0059 -0.1751,0.0205 -0.3045,0.044 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.0454 -0.3311,-0.1366 -0.0707,-0.0941 -0.1059,-0.2103 -0.1059,-0.3485 0,-0.1412 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0101 0.2687,0.0307 0.1059,0.0204 0.2062,0.0384 0.3004,0.0532 -0.0824,-0.1177 -0.1648,-0.2371 -0.2472,-0.3577 -0.0824,-0.1206 -0.1233,-0.2278 -0.1233,-0.3219 0,-0.1384 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412z"
android:strokeWidth="1.3358" android:strokeWidth="1.3358" />
android:fillColor="#f47a68"/>
</group> </group>
</vector> </vector>

View file

@ -21,9 +21,9 @@
android:allowBackup="false" android:allowBackup="false"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:requestLegacyExternalStorage="true"
tools:ignore="GoogleAppIndexingWarning"> tools:ignore="GoogleAppIndexingWarning">
<activity <activity
@ -31,30 +31,35 @@
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity android:name=".LaunchActivity" <activity
android:label="@string/app_name" android:name=".LaunchActivity"
android:configChanges="orientation|screenSize"> android:configChanges="orientation|screenSize"
android:label="@string/app_name">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".git.GitOperationActivity" <activity
android:name=".git.GitOperationActivity"
android:theme="@style/NoBackgroundTheme" /> android:theme="@style/NoBackgroundTheme" />
<activity android:name=".git.GitServerConfigActivity" <activity
android:windowSoftInputMode="adjustResize" android:name=".git.GitServerConfigActivity"
android:label="@string/title_activity_git_clone" /> android:label="@string/title_activity_git_clone"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".git.GitConfigActivity" <activity
android:windowSoftInputMode="adjustResize" android:name=".git.GitConfigActivity"
android:label="@string/title_activity_git_config" /> android:label="@string/title_activity_git_config"
android:windowSoftInputMode="adjustResize" />
<activity <activity
android:name=".UserPreference" android:name=".UserPreference"
android:parentActivityName=".PasswordStore" android:label="@string/action_settings"
android:label="@string/action_settings" /> android:parentActivityName=".PasswordStore" />
<service <service
android:name=".autofill.AutofillService" android:name=".autofill.AutofillService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"> android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
@ -68,12 +73,15 @@
<service <service
android:name=".ClipboardService" android:name=".ClipboardService"
android:process=":clipboard_service_process" /> android:process=":clipboard_service_process" />
<service android:name=".autofill.oreo.OreoAutofillService" <service
android:name=".autofill.oreo.OreoAutofillService"
android:permission="android.permission.BIND_AUTOFILL_SERVICE"> android:permission="android.permission.BIND_AUTOFILL_SERVICE">
<intent-filter> <intent-filter>
<action android:name="android.service.autofill.AutofillService" /> <action android:name="android.service.autofill.AutofillService" />
</intent-filter> </intent-filter>
<meta-data android:name="android.autofill" android:resource="@xml/oreo_autofill_service" /> <meta-data
android:name="android.autofill"
android:resource="@xml/oreo_autofill_service" />
</service> </service>
<activity <activity
@ -87,13 +95,13 @@
<activity <activity
android:name=".crypto.PgpActivity" android:name=".crypto.PgpActivity"
android:configChanges="orientation|screenSize"
android:parentActivityName=".PasswordStore" android:parentActivityName=".PasswordStore"
android:windowSoftInputMode="adjustResize" android:windowSoftInputMode="adjustResize" />
android:configChanges="orientation|screenSize" />
<activity android:name=".SelectFolderActivity" /> <activity android:name=".SelectFolderActivity" />
<activity <activity
android:label="@string/pref_ssh_keygen_title"
android:name=".sshkeygen.SshKeyGenActivity" android:name=".sshkeygen.SshKeyGenActivity"
android:label="@string/pref_ssh_keygen_title"
android:windowSoftInputMode="adjustResize" /> android:windowSoftInputMode="adjustResize" />
<activity <activity
android:name=".autofill.oreo.ui.AutofillDecryptActivity" android:name=".autofill.oreo.ui.AutofillDecryptActivity"
@ -101,16 +109,16 @@
<activity <activity
android:name=".autofill.oreo.ui.AutofillFilterView" android:name=".autofill.oreo.ui.AutofillFilterView"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustNothing" android:theme="@style/DialogLikeTheme"
android:theme="@style/DialogLikeTheme" /> android:windowSoftInputMode="adjustNothing" />
<activity <activity
android:name=".autofill.oreo.ui.AutofillSaveActivity" android:name=".autofill.oreo.ui.AutofillSaveActivity"
android:theme="@style/NoBackgroundTheme" /> android:theme="@style/NoBackgroundTheme" />
<activity <activity
android:name=".autofill.oreo.ui.AutofillPublisherChangedActivity" android:name=".autofill.oreo.ui.AutofillPublisherChangedActivity"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustNothing" android:theme="@style/DialogLikeTheme"
android:theme="@style/DialogLikeTheme" /> android:windowSoftInputMode="adjustNothing" />
</application> </application>
</manifest> </manifest>

View file

@ -17,6 +17,7 @@ import com.haroldadmin.whatthestack.WhatTheStack
@Suppress("Unused") @Suppress("Unused")
class Application : android.app.Application(), SharedPreferences.OnSharedPreferenceChangeListener { class Application : android.app.Application(), SharedPreferences.OnSharedPreferenceChangeListener {
private var prefs: SharedPreferences? = null private var prefs: SharedPreferences? = null
override fun onCreate() { override fun onCreate() {

View file

@ -14,6 +14,7 @@ import java.io.UnsupportedEncodingException
* A single entry in password store. * A single entry in password store.
*/ */
class PasswordEntry(private val content: String) { class PasswordEntry(private val content: String) {
val password: String val password: String
val username: String? val username: String?
val digits: String val digits: String

View file

@ -33,9 +33,9 @@ import com.zeapo.pwdstore.ui.adapters.PasswordItemRecyclerAdapter
import com.zeapo.pwdstore.ui.dialogs.ItemCreationBottomSheet import com.zeapo.pwdstore.ui.dialogs.ItemCreationBottomSheet
import com.zeapo.pwdstore.utils.PasswordItem import com.zeapo.pwdstore.utils.PasswordItem
import com.zeapo.pwdstore.utils.PasswordRepository import com.zeapo.pwdstore.utils.PasswordRepository
import me.zhanghai.android.fastscroll.FastScrollerBuilder
import java.io.File import java.io.File
import java.util.Stack import java.util.Stack
import me.zhanghai.android.fastscroll.FastScrollerBuilder
class PasswordFragment : Fragment() { class PasswordFragment : Fragment() {
private lateinit var recyclerAdapter: PasswordItemRecyclerAdapter private lateinit var recyclerAdapter: PasswordItemRecyclerAdapter

View file

@ -65,14 +65,14 @@ import com.zeapo.pwdstore.utils.PasswordRepository.Companion.getRepositoryDirect
import com.zeapo.pwdstore.utils.PasswordRepository.Companion.initialize import com.zeapo.pwdstore.utils.PasswordRepository.Companion.initialize
import com.zeapo.pwdstore.utils.PasswordRepository.Companion.isInitialized import com.zeapo.pwdstore.utils.PasswordRepository.Companion.isInitialized
import com.zeapo.pwdstore.utils.PasswordRepository.PasswordSortOrder.Companion.getSortOrder import com.zeapo.pwdstore.utils.PasswordRepository.PasswordSortOrder.Companion.getSortOrder
import java.io.File
import java.lang.Character.UnicodeBlock
import java.util.Stack
import org.apache.commons.io.FileUtils import org.apache.commons.io.FileUtils
import org.apache.commons.io.FilenameUtils import org.apache.commons.io.FilenameUtils
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.errors.GitAPIException import org.eclipse.jgit.api.errors.GitAPIException
import org.eclipse.jgit.revwalk.RevCommit import org.eclipse.jgit.revwalk.RevCommit
import java.io.File
import java.lang.Character.UnicodeBlock
import java.util.Stack
class PasswordStore : AppCompatActivity() { class PasswordStore : AppCompatActivity() {

View file

@ -30,10 +30,6 @@ import com.zeapo.pwdstore.autofill.oreo.AutofillPreferences
import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure
import com.zeapo.pwdstore.utils.PasswordItem import com.zeapo.pwdstore.utils.PasswordItem
import com.zeapo.pwdstore.utils.PasswordRepository import com.zeapo.pwdstore.utils.PasswordRepository
import java.io.File
import java.text.Collator
import java.util.Locale
import java.util.Stack
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.FlowPreview
@ -48,6 +44,10 @@ import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.toList import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.yield import kotlinx.coroutines.yield
import me.zhanghai.android.fastscroll.PopupTextProvider import me.zhanghai.android.fastscroll.PopupTextProvider
import java.io.File
import java.text.Collator
import java.util.Locale
import java.util.Stack
private fun File.toPasswordItem(root: File) = if (isFile) private fun File.toPasswordItem(root: File) = if (isFile)
PasswordItem.newPassword(name, this, root) PasswordItem.newPassword(name, this, root)

View file

@ -18,8 +18,8 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.floatingactionbutton.FloatingActionButton import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.zeapo.pwdstore.ui.adapters.PasswordItemRecyclerAdapter import com.zeapo.pwdstore.ui.adapters.PasswordItemRecyclerAdapter
import com.zeapo.pwdstore.utils.PasswordItem import com.zeapo.pwdstore.utils.PasswordItem
import java.io.File
import me.zhanghai.android.fastscroll.FastScrollerBuilder import me.zhanghai.android.fastscroll.FastScrollerBuilder
import java.io.File
class SelectFolderFragment : Fragment() { class SelectFolderFragment : Fragment() {
private lateinit var recyclerAdapter: PasswordItemRecyclerAdapter private lateinit var recyclerAdapter: PasswordItemRecyclerAdapter

View file

@ -50,6 +50,8 @@ import com.zeapo.pwdstore.utils.BiometricAuthenticator
import com.zeapo.pwdstore.utils.PasswordRepository import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.autofillManager import com.zeapo.pwdstore.utils.autofillManager
import com.zeapo.pwdstore.utils.getEncryptedPrefs import com.zeapo.pwdstore.utils.getEncryptedPrefs
import me.msfjarvis.openpgpktx.util.OpenPgpUtils
import org.apache.commons.io.FileUtils
import java.io.File import java.io.File
import java.io.IOException import java.io.IOException
import java.time.LocalDateTime import java.time.LocalDateTime
@ -57,8 +59,6 @@ import java.time.format.DateTimeFormatter
import java.util.Calendar import java.util.Calendar
import java.util.HashSet import java.util.HashSet
import java.util.TimeZone import java.util.TimeZone
import me.msfjarvis.openpgpktx.util.OpenPgpUtils
import org.apache.commons.io.FileUtils
typealias ClickListener = Preference.OnPreferenceClickListener typealias ClickListener = Preference.OnPreferenceClickListener
typealias ChangeListener = Preference.OnPreferenceChangeListener typealias ChangeListener = Preference.OnPreferenceChangeListener

View file

@ -19,9 +19,9 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.floatingactionbutton.FloatingActionButton import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import me.zhanghai.android.fastscroll.FastScrollerBuilder
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
import java.util.ArrayList import java.util.ArrayList
import me.zhanghai.android.fastscroll.FastScrollerBuilder
class AutofillPreferenceActivity : AppCompatActivity() { class AutofillPreferenceActivity : AppCompatActivity() {

View file

@ -18,9 +18,9 @@ import androidx.recyclerview.widget.SortedList
import androidx.recyclerview.widget.SortedListAdapterCallback import androidx.recyclerview.widget.SortedListAdapterCallback
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.splitLines import com.zeapo.pwdstore.utils.splitLines
import me.zhanghai.android.fastscroll.PopupTextProvider
import java.util.ArrayList import java.util.ArrayList
import java.util.Locale import java.util.Locale
import me.zhanghai.android.fastscroll.PopupTextProvider
internal class AutofillRecyclerAdapter( internal class AutofillRecyclerAdapter(
allApps: List<AppInfo>, allApps: List<AppInfo>,

View file

@ -32,15 +32,6 @@ import com.zeapo.pwdstore.PasswordEntry
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.PasswordRepository import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.splitLines import com.zeapo.pwdstore.utils.splitLines
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.IOException
import java.io.InputStream
import java.io.UnsupportedEncodingException
import java.net.MalformedURLException
import java.net.URL
import java.util.ArrayList
import java.util.Locale
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancel import kotlinx.coroutines.cancel
@ -51,6 +42,15 @@ import me.msfjarvis.openpgpktx.util.OpenPgpServiceConnection
import org.apache.commons.io.FileUtils import org.apache.commons.io.FileUtils
import org.openintents.openpgp.IOpenPgpService2 import org.openintents.openpgp.IOpenPgpService2
import org.openintents.openpgp.OpenPgpError import org.openintents.openpgp.OpenPgpError
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.IOException
import java.io.InputStream
import java.io.UnsupportedEncodingException
import java.net.MalformedURLException
import java.net.URL
import java.util.ArrayList
import java.util.Locale
class AutofillService : AccessibilityService(), CoroutineScope by CoroutineScope(Dispatchers.Default) { class AutofillService : AccessibilityService(), CoroutineScope by CoroutineScope(Dispatchers.Default) {
private var serviceConnection: OpenPgpServiceConnection? = null private var serviceConnection: OpenPgpServiceConnection? = null

View file

@ -31,6 +31,7 @@ private fun Context.matchPreferences(formOrigin: FormOrigin): SharedPreferences
class AutofillPublisherChangedException(val formOrigin: FormOrigin) : class AutofillPublisherChangedException(val formOrigin: FormOrigin) :
Exception("The publisher of '${formOrigin.identifier}' changed since an entry was first matched with this app") { Exception("The publisher of '${formOrigin.identifier}' changed since an entry was first matched with this app") {
init { init {
require(formOrigin is FormOrigin.App) require(formOrigin is FormOrigin.App)
} }
@ -40,6 +41,7 @@ class AutofillPublisherChangedException(val formOrigin: FormOrigin) :
* Manages "matches", i.e., associations between apps or websites and Password Store entries. * Manages "matches", i.e., associations between apps or websites and Password Store entries.
*/ */
class AutofillMatcher { class AutofillMatcher {
companion object { companion object {
private const val MAX_NUM_MATCHES = 10 private const val MAX_NUM_MATCHES = 10

View file

@ -130,6 +130,7 @@ data class ClassifiedAutofillScenario<T : Any>(
val currentPassword: List<T>, val currentPassword: List<T>,
val newPassword: List<T> val newPassword: List<T>
) : AutofillScenario<T>() { ) : AutofillScenario<T>() {
override val allPasswordFields override val allPasswordFields
get() = currentPassword + newPassword get() = currentPassword + newPassword
override val passwordFieldsToFillOnMatch override val passwordFieldsToFillOnMatch
@ -148,6 +149,7 @@ data class GenericAutofillScenario<T : Any>(
override val fillUsername: Boolean, override val fillUsername: Boolean,
val genericPassword: List<T> val genericPassword: List<T>
) : AutofillScenario<T>() { ) : AutofillScenario<T>() {
override val allPasswordFields override val allPasswordFields
get() = genericPassword get() = genericPassword
override val passwordFieldsToFillOnMatch override val passwordFieldsToFillOnMatch

View file

@ -14,10 +14,12 @@ annotation class AutofillDsl
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
interface FieldMatcher { interface FieldMatcher {
fun match(fields: List<FormField>, alreadyMatched: List<FormField>): List<FormField>? fun match(fields: List<FormField>, alreadyMatched: List<FormField>): List<FormField>?
@AutofillDsl @AutofillDsl
class Builder { class Builder {
private var takeSingle: (FormField.(List<FormField>) -> Boolean)? = null private var takeSingle: (FormField.(List<FormField>) -> Boolean)? = null
private val tieBreakersSingle: MutableList<FormField.(List<FormField>) -> Boolean> = private val tieBreakersSingle: MutableList<FormField.(List<FormField>) -> Boolean> =
mutableListOf() mutableListOf()
@ -68,6 +70,7 @@ class SingleFieldMatcher(
@AutofillDsl @AutofillDsl
class Builder { class Builder {
private var takeSingle: (FormField.(List<FormField>) -> Boolean)? = null private var takeSingle: (FormField.(List<FormField>) -> Boolean)? = null
private val tieBreakersSingle: MutableList<FormField.(List<FormField>) -> Boolean> = private val tieBreakersSingle: MutableList<FormField.(List<FormField>) -> Boolean> =
mutableListOf() mutableListOf()
@ -169,6 +172,7 @@ class AutofillRule private constructor(
private val applyInSingleOriginMode: Boolean, private val applyInSingleOriginMode: Boolean,
private val applyOnManualRequestOnly: Boolean private val applyOnManualRequestOnly: Boolean
) { ) {
companion object { companion object {
private var ruleId = 1 private var ruleId = 1
} }
@ -304,6 +308,7 @@ class AutofillStrategy private constructor(private val rules: List<AutofillRule>
@AutofillDsl @AutofillDsl
class Builder { class Builder {
private val rules: MutableList<AutofillRule> = mutableListOf() private val rules: MutableList<AutofillRule> = mutableListOf()
fun rule( fun rule(

View file

@ -31,6 +31,7 @@ import java.io.File
* A unique identifier for either an Android app (package name) or a website (origin minus port). * A unique identifier for either an Android app (package name) or a website (origin minus port).
*/ */
sealed class FormOrigin(open val identifier: String) { sealed class FormOrigin(open val identifier: String) {
data class Web(override val identifier: String) : FormOrigin(identifier) data class Web(override val identifier: String) : FormOrigin(identifier)
data class App(override val identifier: String) : FormOrigin(identifier) data class App(override val identifier: String) : FormOrigin(identifier)
@ -198,6 +199,7 @@ class FillableForm private constructor(
private val ignoredIds: List<AutofillId>, private val ignoredIds: List<AutofillId>,
private val saveFlags: Int? private val saveFlags: Int?
) { ) {
companion object { companion object {
fun makeFillInDataset( fun makeFillInDataset(
context: Context, context: Context,

View file

@ -22,16 +22,6 @@ import com.zeapo.pwdstore.autofill.oreo.AutofillPreferences
import com.zeapo.pwdstore.autofill.oreo.Credentials import com.zeapo.pwdstore.autofill.oreo.Credentials
import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure
import com.zeapo.pwdstore.autofill.oreo.FillableForm import com.zeapo.pwdstore.autofill.oreo.FillableForm
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.FileNotFoundException
import java.io.InputStream
import java.io.OutputStream
import java.io.UnsupportedEncodingException
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.SupervisorJob
@ -42,6 +32,16 @@ import me.msfjarvis.openpgpktx.util.OpenPgpApi
import me.msfjarvis.openpgpktx.util.OpenPgpServiceConnection import me.msfjarvis.openpgpktx.util.OpenPgpServiceConnection
import org.openintents.openpgp.IOpenPgpService2 import org.openintents.openpgp.IOpenPgpService2
import org.openintents.openpgp.OpenPgpError import org.openintents.openpgp.OpenPgpError
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.FileNotFoundException
import java.io.InputStream
import java.io.OutputStream
import java.io.UnsupportedEncodingException
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
class AutofillDecryptActivity : Activity(), CoroutineScope { class AutofillDecryptActivity : Activity(), CoroutineScope {

View file

@ -52,13 +52,28 @@ import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure
import com.zeapo.pwdstore.ui.dialogs.PasswordGeneratorDialogFragment import com.zeapo.pwdstore.ui.dialogs.PasswordGeneratorDialogFragment
import com.zeapo.pwdstore.ui.dialogs.XkPasswordGeneratorDialogFragment import com.zeapo.pwdstore.ui.dialogs.XkPasswordGeneratorDialogFragment
import com.zeapo.pwdstore.utils.Otp import com.zeapo.pwdstore.utils.Otp
import java.io.ByteArrayInputStream import kotlinx.android.synthetic.main.decrypt_layout.crypto_container_decrypt
import java.io.ByteArrayOutputStream import kotlinx.android.synthetic.main.decrypt_layout.crypto_copy_otp
import java.io.File import kotlinx.android.synthetic.main.decrypt_layout.crypto_copy_username
import java.nio.charset.Charset import kotlinx.android.synthetic.main.decrypt_layout.crypto_extra_show
import java.util.Date import kotlinx.android.synthetic.main.decrypt_layout.crypto_extra_show_layout
import kotlinx.android.synthetic.main.decrypt_layout.* import kotlinx.android.synthetic.main.decrypt_layout.crypto_extra_toggle_show
import kotlinx.android.synthetic.main.encrypt_layout.* import kotlinx.android.synthetic.main.decrypt_layout.crypto_otp_show
import kotlinx.android.synthetic.main.decrypt_layout.crypto_otp_show_label
import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_category_decrypt
import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_file
import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_last_changed
import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_show
import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_show_label
import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_toggle_show
import kotlinx.android.synthetic.main.decrypt_layout.crypto_username_show
import kotlinx.android.synthetic.main.decrypt_layout.crypto_username_show_label
import kotlinx.android.synthetic.main.encrypt_layout.crypto_extra_edit
import kotlinx.android.synthetic.main.encrypt_layout.crypto_password_category
import kotlinx.android.synthetic.main.encrypt_layout.crypto_password_edit
import kotlinx.android.synthetic.main.encrypt_layout.crypto_password_file_edit
import kotlinx.android.synthetic.main.encrypt_layout.encrypt_username
import kotlinx.android.synthetic.main.encrypt_layout.generate_password
import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import me.msfjarvis.openpgpktx.util.OpenPgpApi import me.msfjarvis.openpgpktx.util.OpenPgpApi
@ -74,6 +89,11 @@ import org.apache.commons.io.FileUtils
import org.apache.commons.io.FilenameUtils import org.apache.commons.io.FilenameUtils
import org.openintents.openpgp.IOpenPgpService2 import org.openintents.openpgp.IOpenPgpService2
import org.openintents.openpgp.OpenPgpError import org.openintents.openpgp.OpenPgpError
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.File
import java.nio.charset.Charset
import java.util.Date
class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
private val clipboard by lazy { getSystemService<ClipboardManager>() } private val clipboard by lazy { getSystemService<ClipboardManager>() }
@ -778,6 +798,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
@SuppressLint("ClickableViewAccessibility") @SuppressLint("ClickableViewAccessibility")
private inner class HoldToShowPasswordTransformation constructor(button: Button, private val onToggle: Runnable) : private inner class HoldToShowPasswordTransformation constructor(button: Button, private val onToggle: Runnable) :
PasswordTransformationMethod(), View.OnTouchListener { PasswordTransformationMethod(), View.OnTouchListener {
private var shown = false private var shown = false
init { init {

View file

@ -31,6 +31,7 @@ import java.net.URI
* tasks and makes sense to be held here. * tasks and makes sense to be held here.
*/ */
abstract class BaseGitActivity : AppCompatActivity() { abstract class BaseGitActivity : AppCompatActivity() {
lateinit var protocol: Protocol lateinit var protocol: Protocol
lateinit var connectionMode: ConnectionMode lateinit var connectionMode: ConnectionMode
var url: String? = null var url: String? = null

View file

@ -7,11 +7,11 @@ package com.zeapo.pwdstore.git
import android.app.Activity import android.app.Activity
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import java.io.File
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.GitCommand import org.eclipse.jgit.api.GitCommand
import org.eclipse.jgit.api.PushCommand import org.eclipse.jgit.api.PushCommand
import org.eclipse.jgit.api.RebaseCommand import org.eclipse.jgit.api.RebaseCommand
import java.io.File
class BreakOutOfDetached(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) { class BreakOutOfDetached(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) {
private lateinit var commands: List<GitCommand<out Any>> private lateinit var commands: List<GitCommand<out Any>>

View file

@ -8,9 +8,9 @@ import android.app.Activity
import android.content.Intent import android.content.Intent
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import java.io.File
import org.eclipse.jgit.api.CloneCommand import org.eclipse.jgit.api.CloneCommand
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import java.io.File
/** /**
* Creates a new clone operation * Creates a new clone operation

View file

@ -8,9 +8,10 @@ import android.app.Activity;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.Intent; import android.content.Intent;
import android.os.AsyncTask; import android.os.AsyncTask;
import com.zeapo.pwdstore.PasswordStore; import com.zeapo.pwdstore.PasswordStore;
import com.zeapo.pwdstore.R; import com.zeapo.pwdstore.R;
import java.lang.ref.WeakReference;
import org.eclipse.jgit.api.CommitCommand; import org.eclipse.jgit.api.CommitCommand;
import org.eclipse.jgit.api.GitCommand; import org.eclipse.jgit.api.GitCommand;
import org.eclipse.jgit.api.PullCommand; import org.eclipse.jgit.api.PullCommand;
@ -21,6 +22,8 @@ import org.eclipse.jgit.api.StatusCommand;
import org.eclipse.jgit.transport.PushResult; import org.eclipse.jgit.transport.PushResult;
import org.eclipse.jgit.transport.RemoteRefUpdate; import org.eclipse.jgit.transport.RemoteRefUpdate;
import java.lang.ref.WeakReference;
public class GitAsyncTask extends AsyncTask<GitCommand, Integer, String> { public class GitAsyncTask extends AsyncTask<GitCommand, Integer, String> {
private WeakReference<Activity> activityWeakReference; private WeakReference<Activity> activityWeakReference;
private boolean refreshListOnEnd; private boolean refreshListOnEnd;

View file

@ -25,11 +25,11 @@ import com.zeapo.pwdstore.git.config.SshConfigSessionFactory
import com.zeapo.pwdstore.utils.PasswordRepository import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.getEncryptedPrefs import com.zeapo.pwdstore.utils.getEncryptedPrefs
import com.zeapo.pwdstore.utils.requestInputFocusOnView import com.zeapo.pwdstore.utils.requestInputFocusOnView
import java.io.File
import org.eclipse.jgit.api.GitCommand import org.eclipse.jgit.api.GitCommand
import org.eclipse.jgit.lib.Repository import org.eclipse.jgit.lib.Repository
import org.eclipse.jgit.transport.SshSessionFactory import org.eclipse.jgit.transport.SshSessionFactory
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider
import java.io.File
/** /**
* Creates a new git operation * Creates a new git operation

View file

@ -8,9 +8,9 @@ import android.app.Activity
import android.content.Intent import android.content.Intent
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import java.io.File
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.PullCommand import org.eclipse.jgit.api.PullCommand
import java.io.File
/** /**
* Creates a new git operation * Creates a new git operation

View file

@ -8,9 +8,9 @@ import android.app.Activity
import android.content.Intent import android.content.Intent
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import java.io.File
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.PushCommand import org.eclipse.jgit.api.PushCommand
import java.io.File
/** /**
* Creates a new git operation * Creates a new git operation

View file

@ -8,11 +8,11 @@ import android.app.Activity
import android.content.Intent import android.content.Intent
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import java.io.File
import org.eclipse.jgit.api.AddCommand import org.eclipse.jgit.api.AddCommand
import org.eclipse.jgit.api.FetchCommand import org.eclipse.jgit.api.FetchCommand
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.ResetCommand import org.eclipse.jgit.api.ResetCommand
import java.io.File
/** /**
* Creates a new git operation * Creates a new git operation
@ -21,6 +21,7 @@ import org.eclipse.jgit.api.ResetCommand
* @param callingActivity the calling activity * @param callingActivity the calling activity
*/ */
class ResetToRemoteOperation(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) { class ResetToRemoteOperation(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) {
private var addCommand: AddCommand? = null private var addCommand: AddCommand? = null
private var fetchCommand: FetchCommand? = null private var fetchCommand: FetchCommand? = null
private var resetCommand: ResetCommand? = null private var resetCommand: ResetCommand? = null

View file

@ -8,13 +8,13 @@ import android.app.Activity
import android.content.Intent import android.content.Intent
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import java.io.File
import org.eclipse.jgit.api.AddCommand import org.eclipse.jgit.api.AddCommand
import org.eclipse.jgit.api.CommitCommand import org.eclipse.jgit.api.CommitCommand
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.PullCommand import org.eclipse.jgit.api.PullCommand
import org.eclipse.jgit.api.PushCommand import org.eclipse.jgit.api.PushCommand
import org.eclipse.jgit.api.StatusCommand import org.eclipse.jgit.api.StatusCommand
import java.io.File
/** /**
* Creates a new git operation * Creates a new git operation
@ -23,6 +23,7 @@ import org.eclipse.jgit.api.StatusCommand
* @param callingActivity the calling activity * @param callingActivity the calling activity
*/ */
class SyncOperation(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) { class SyncOperation(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) {
private var addCommand: AddCommand? = null private var addCommand: AddCommand? = null
private var statusCommand: StatusCommand? = null private var statusCommand: StatusCommand? = null
private var commitCommand: CommitCommand? = null private var commitCommand: CommitCommand? = null

View file

@ -9,8 +9,10 @@ import android.app.PendingIntent;
import android.content.Intent; import android.content.Intent;
import android.content.IntentSender; import android.content.IntentSender;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.preference.PreferenceManager; import androidx.preference.PreferenceManager;
import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.jcraft.jsch.Identity; import com.jcraft.jsch.Identity;
import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSch;
@ -19,8 +21,7 @@ import com.jcraft.jsch.Session;
import com.jcraft.jsch.UserInfo; import com.jcraft.jsch.UserInfo;
import com.zeapo.pwdstore.R; import com.zeapo.pwdstore.R;
import com.zeapo.pwdstore.git.BaseGitActivity; import com.zeapo.pwdstore.git.BaseGitActivity;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import org.eclipse.jgit.errors.UnsupportedCredentialItem; import org.eclipse.jgit.errors.UnsupportedCredentialItem;
import org.eclipse.jgit.transport.CredentialItem; import org.eclipse.jgit.transport.CredentialItem;
import org.eclipse.jgit.transport.CredentialsProvider; import org.eclipse.jgit.transport.CredentialsProvider;
@ -39,6 +40,9 @@ import org.openintents.ssh.authentication.request.SigningRequest;
import org.openintents.ssh.authentication.request.SshPublicKeyRequest; import org.openintents.ssh.authentication.request.SshPublicKeyRequest;
import org.openintents.ssh.authentication.util.SshAuthenticationApiUtils; import org.openintents.ssh.authentication.util.SshAuthenticationApiUtils;
import java.util.List;
import java.util.concurrent.CountDownLatch;
public class SshApiSessionFactory extends GitConfigSessionFactory { public class SshApiSessionFactory extends GitConfigSessionFactory {
/** /**
* Intent request code indicating a completed signature that should be posted to an outstanding * Intent request code indicating a completed signature that should be posted to an outstanding
@ -135,7 +139,9 @@ public class SshApiSessionFactory extends GitConfigSessionFactory {
keyId = settings.getString("ssh_openkeystore_keyid", null); keyId = settings.getString("ssh_openkeystore_keyid", null);
} }
/** Free any resources associated with this IdentityBuilder */ /**
* Free any resources associated with this IdentityBuilder
*/
public void close() { public void close() {
if (connection != null && connection.isConnected()) connection.disconnect(); if (connection != null && connection.isConnected()) connection.disconnect();
} }
@ -273,7 +279,9 @@ public class SshApiSessionFactory extends GitConfigSessionFactory {
} }
} }
/** A Jsch identity that delegates key operations via the OpenKeychain SSH API */ /**
* A Jsch identity that delegates key operations via the OpenKeychain SSH API
*/
public static class ApiIdentity implements Identity { public static class ApiIdentity implements Identity {
private String keyId, description, alg; private String keyId, description, alg;
private byte[] publicKey; private byte[] publicKey;
@ -399,6 +407,7 @@ public class SshApiSessionFactory extends GitConfigSessionFactory {
} }
@Override @Override
public void clear() {} public void clear() {
}
} }
} }

View file

@ -127,7 +127,8 @@ class PasswordBuilder(ctx: Context) {
CapsType.TitleCase -> { CapsType.TitleCase -> {
s = capitalize(s) s = capitalize(s)
} }
CapsType.lowercase, CapsType.As_iS -> {} CapsType.lowercase, CapsType.As_iS -> {
}
} }
} }
password.append(s) password.append(s)

View file

@ -16,9 +16,9 @@ import androidx.core.content.getSystemService
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import org.apache.commons.io.FileUtils
import java.io.File import java.io.File
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets
import org.apache.commons.io.FileUtils
class ShowSshKeyFragment : DialogFragment() { class ShowSshKeyFragment : DialogFragment() {
@ -41,7 +41,8 @@ class ShowSshKeyFragment : DialogFragment() {
ad.setOnShowListener { ad.setOnShowListener {
val b = ad.getButton(AlertDialog.BUTTON_NEUTRAL) val b = ad.getButton(AlertDialog.BUTTON_NEUTRAL)
b.setOnClickListener { b.setOnClickListener {
val clipboard = activity.getSystemService<ClipboardManager>() ?: return@setOnClickListener val clipboard = activity.getSystemService<ClipboardManager>()
?: return@setOnClickListener
val clip = ClipData.newPlainText("public key", publicKey.text.toString()) val clip = ClipData.newPlainText("public key", publicKey.text.toString())
clipboard.setPrimaryClip(clip) clipboard.setPrimaryClip(clip)
} }

View file

@ -19,11 +19,11 @@ import com.jcraft.jsch.JSch
import com.jcraft.jsch.KeyPair import com.jcraft.jsch.KeyPair
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.FragmentSshKeygenBinding import com.zeapo.pwdstore.databinding.FragmentSshKeygenBinding
import java.io.File
import java.io.FileOutputStream
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import java.io.File
import java.io.FileOutputStream
class SshKeyGenFragment : Fragment() { class SshKeyGenFragment : Fragment() {

View file

@ -80,6 +80,7 @@ open class PasswordItemRecyclerAdapter :
class PasswordItemDetailsLookup(private val recyclerView: RecyclerView) : class PasswordItemDetailsLookup(private val recyclerView: RecyclerView) :
ItemDetailsLookup<String>() { ItemDetailsLookup<String>() {
override fun getItemDetails(event: MotionEvent): ItemDetails<String>? { override fun getItemDetails(event: MotionEvent): ItemDetails<String>? {
val view = recyclerView.findChildViewUnder(event.x, event.y) ?: return null val view = recyclerView.findChildViewUnder(event.x, event.y) ?: return null
return (recyclerView.getChildViewHolder(view) as PasswordItemViewHolder).itemDetails return (recyclerView.getChildViewHolder(view) as PasswordItemViewHolder).itemDetails

View file

@ -23,6 +23,7 @@ import com.zeapo.pwdstore.pwgen.PasswordGenerator.setPrefs
/** A placeholder fragment containing a simple view. */ /** A placeholder fragment containing a simple view. */
class PasswordGeneratorDialogFragment : DialogFragment() { class PasswordGeneratorDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val builder = MaterialAlertDialogBuilder(requireContext()) val builder = MaterialAlertDialogBuilder(requireContext())
val callingActivity = requireActivity() val callingActivity = requireActivity()

View file

@ -4,21 +4,25 @@
*/ */
package com.zeapo.pwdstore.utils; package com.zeapo.pwdstore.utils;
import org.apache.commons.codec.binary.Base32;
import java.math.BigInteger; import java.math.BigInteger;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.security.InvalidKeyException; import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.Arrays; import java.util.Arrays;
import javax.crypto.Mac; import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec; import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base32;
import timber.log.Timber; import timber.log.Timber;
public class Otp { public class Otp {
private static final Base32 BASE_32 = new Base32(); private static final Base32 BASE_32 = new Base32();
private Otp() {} private Otp() {
}
public static String calculateCode( public static String calculateCode(
String secret, long counter, String algorithm, String digits) { String secret, long counter, String algorithm, String digits) {

View file

@ -14,6 +14,7 @@ data class PasswordItem(
val file: File, val file: File,
val rootDir: File val rootDir: File
) : Comparable<PasswordItem> { ) : Comparable<PasswordItem> {
val fullPathToParent = file.absolutePath val fullPathToParent = file.absolutePath
.replace(rootDir.absolutePath, "") .replace(rootDir.absolutePath, "")
.replace(file.name, "") .replace(file.name, "")

View file

@ -8,9 +8,6 @@ import android.content.Context
import android.content.SharedPreferences import android.content.SharedPreferences
import androidx.core.content.edit import androidx.core.content.edit
import androidx.preference.PreferenceManager import androidx.preference.PreferenceManager
import java.io.File
import java.io.FileFilter
import java.util.Comparator
import org.apache.commons.io.filefilter.FileFilterUtils import org.apache.commons.io.filefilter.FileFilterUtils
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import org.eclipse.jgit.lib.Repository import org.eclipse.jgit.lib.Repository
@ -18,6 +15,9 @@ import org.eclipse.jgit.storage.file.FileRepositoryBuilder
import org.eclipse.jgit.transport.RefSpec import org.eclipse.jgit.transport.RefSpec
import org.eclipse.jgit.transport.RemoteConfig import org.eclipse.jgit.transport.RemoteConfig
import org.eclipse.jgit.transport.URIish import org.eclipse.jgit.transport.URIish
import java.io.File
import java.io.FileFilter
import java.util.Comparator
open class PasswordRepository protected constructor() { open class PasswordRepository protected constructor() {

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false" <item android:color="#00FFFFFF" android:state_checked="false" />
android:color="#00FFFFFF" />
<item android:color="@color/button_color" /> <item android:color="@color/button_color" />
</selector> </selector>

View file

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:tint="?attr/colorOnPrimary"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24" android:viewportHeight="24">
android:tint="?attr/colorOnPrimary">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="#FFFFFFFF"
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2L9,8L9,6zM18,20L6,20L6,10h12v10zM12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z" /> android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2L9,8L9,6zM18,20L6,20L6,10h12v10zM12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z" />

View file

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:tint="?attr/colorOnPrimary"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24" android:viewportHeight="24">
android:tint="?attr/colorOnPrimary">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="#FFFFFFFF"
android:pathData="M8.59,16.59L13.17,12 8.59,7.41 10,6l6,6 -6,6 -1.41,-1.41z" /> android:pathData="M8.59,16.59L13.17,12 8.59,7.41 10,6l6,6 -6,6 -1.41,-1.41z" />

View file

@ -3,23 +3,24 @@
android:height="108dp" android:height="108dp"
android:viewportWidth="110.34687" android:viewportWidth="110.34687"
android:viewportHeight="110.34687"> android:viewportHeight="110.34687">
<group android:translateX="24.828047" <group
android:translateX="24.828047"
android:translateY="24.828047"> android:translateY="24.828047">
<path <path
android:fillColor="#00000000"
android:pathData="m18.8,30.2129v-11.546c0,-6.4144 5.1315,-11.546 11.546,-11.546 6.4144,0 11.546,5.1315 11.546,11.546v11.546" android:pathData="m18.8,30.2129v-11.546c0,-6.4144 5.1315,-11.546 11.546,-11.546 6.4144,0 11.546,5.1315 11.546,11.546v11.546"
android:strokeWidth="5.349" android:strokeWidth="5.349"
android:fillColor="#00000000"
android:strokeColor="#013e5b" /> android:strokeColor="#013e5b" />
<path <path
android:pathData="M15.4099,21.8429L45.2811,21.8429A2.2639,2.2639 0,0 1,47.545 24.1068L47.545,53.977A2.2639,2.2639 0,0 1,45.2811 56.2409L15.4099,56.2409A2.2639,2.2639 0,0 1,13.146 53.977L13.146,24.1068A2.2639,2.2639 0,0 1,15.4099 21.8429z" android:fillColor="#00c7a0"
android:fillColor="#00c7a0"/> android:pathData="M15.4099,21.8429L45.2811,21.8429A2.2639,2.2639 0,0 1,47.545 24.1068L47.545,53.977A2.2639,2.2639 0,0 1,45.2811 56.2409L15.4099,56.2409A2.2639,2.2639 0,0 1,13.146 53.977L13.146,24.1068A2.2639,2.2639 0,0 1,15.4099 21.8429z" />
<path <path
android:fillColor="#fff"
android:pathData="m44.8267,37.6961 l-13.1408,-13.1393c-0.7569,-0.7566 -1.9838,-0.7566 -2.7408,0l-13.08,13.0785c-0.7567,0.7573 -0.7567,1.9846 0,2.7419l13.1415,13.14c0.7572,0.7567 1.9842,0.7567 2.7414,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421" android:pathData="m44.8267,37.6961 l-13.1408,-13.1393c-0.7569,-0.7566 -1.9838,-0.7566 -2.7408,0l-13.08,13.0785c-0.7567,0.7573 -0.7567,1.9846 0,2.7419l13.1415,13.14c0.7572,0.7567 1.9842,0.7567 2.7414,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421"
android:strokeWidth=".35344" android:strokeWidth=".35344" />
android:fillColor="#fff"/>
<path <path
android:fillColor="#3bdbbc"
android:pathData="m30.3156,23.9881c-0.496,0 -0.992,0.1893 -1.3705,0.5676l-2.7282,2.7288 3.4612,3.4606c0.8044,-0.2715 1.727,-0.0892 2.368,0.5517 0.6237,0.624 0.8361,1.5493 0.5471,2.3828l3.3357,3.3357c0.8076,-0.2777 1.738,-0.098 2.3828,0.5476 0.9008,0.9005 0.9008,2.361 0,3.2615 -1.7823,1.7848 -4.7253,-0.1767 -3.7641,-2.5087l-3.1111,-3.1106c-2.2315,0.5285 -3.8934,-1.2655 -3.149,-3.1674l-0.6863,-0.6863l0,15.9165l5.4913,0l0,-5.8608c-0.0315,-0.7566 1.1201,-0.7566 1.0886,0l0,6.4043c0.0005,0.3013 -0.2438,0.5457 -0.545,0.5455l-6.5804,0c-0.3015,0.0005 -0.546,-0.2441 -0.5456,-0.5455l0,-17.4333c-0.0005,-0.0363 0.0029,-0.0728 0.0097,-0.1085l-1.6444,-1.6444 -9.0106,9.0084c-0.7567,0.7573 -0.7567,1.9848 0,2.7421l13.1415,13.14c0.7572,0.7567 1.9844,0.7567 2.7416,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421l-13.14,-13.1393c-0.3785,-0.3783 -0.8746,-0.5676 -1.3705,-0.5676zM29.9512,39.1825c0.1001,0 0.1808,0.0381 0.2426,0.1146 0.0648,0.0736 0.1326,0.1975 0.2032,0.371 0.0705,0.1706 0.1089,0.2615 0.1146,0.2733 0.0059,-0.0119 0.0424,-0.1026 0.11,-0.2733 0.0707,-0.1705 0.1401,-0.2946 0.2078,-0.371 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2103 0.1592,0.3485 0,0.0676 -0.0179,0.1368 -0.0532,0.2073 -0.0323,0.0707 -0.0777,0.1444 -0.1366,0.2211 -0.056,0.0734 -0.1164,0.1571 -0.1812,0.2513 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0354 0.3004,-0.0354 0.0969,0 0.1762,0.0224 0.238,0.0666 0.0648,0.0442 0.1118,0.1042 0.1413,0.1807 0.0294,0.0734 0.044,0.1544 0.044,0.2426 0,0.1384 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1372 -0.3219,0.1372 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.0386 -0.3045,-0.0446 0.1531,0.2177 0.2534,0.3652 0.3004,0.4417 0.047,0.0736 0.0706,0.1544 0.0706,0.2426 0,0.1412 -0.0533,0.2556 -0.1592,0.3439 -0.1028,0.0853 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0366 -0.2559,-0.11 -0.0646,-0.0767 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0235 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1646 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.11 -0.2513,0.11 -0.15,0 -0.2779,-0.0427 -0.3838,-0.1279 -0.1059,-0.0883 -0.1587,-0.2027 -0.1587,-0.3439 0,-0.0618 0.0156,-0.1263 0.0481,-0.194 0.0323,-0.0707 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1532 0.2206,-0.3091 -0.0736,0.0059 -0.1751,0.021 -0.3045,0.0446 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.046 -0.3311,-0.1372 -0.0707,-0.0941 -0.1059,-0.2101 -0.1059,-0.3485 0,-0.1411 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0107 0.2687,0.0312 0.1059,0.0206 0.2062,0.038 0.3004,0.0527 -0.0824,-0.1177 -0.1648,-0.2366 -0.2472,-0.3572 -0.0824,-0.1206 -0.1233,-0.2282 -0.1233,-0.3224 0,-0.1382 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412zM29.9512,43.2235c0.1001,0 0.1808,0.0383 0.2426,0.1146 0.0648,0.0735 0.1326,0.197 0.2032,0.3705 0.0705,0.1707 0.1089,0.262 0.1146,0.2738 0.0059,-0.0119 0.0424,-0.1031 0.11,-0.2738 0.0707,-0.1705 0.1401,-0.2941 0.2078,-0.3705 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2102 0.1592,0.3485 0,0.0675 -0.0179,0.1366 -0.0532,0.2073 -0.0323,0.0705 -0.0777,0.1441 -0.1366,0.2206 -0.056,0.0735 -0.1164,0.1576 -0.1812,0.2518 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0353 0.3004,-0.0353 0.0969,0 0.1762,0.0219 0.238,0.0661 0.0648,0.0442 0.1118,0.1047 0.1413,0.1812 0.0294,0.0736 0.044,0.1542 0.044,0.2426 0,0.1382 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1366 -0.3219,0.1366 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.038 -0.3045,-0.044 0.1531,0.2177 0.2534,0.3647 0.3004,0.4411 0.047,0.0736 0.0706,0.1549 0.0706,0.2431 0,0.1411 -0.0533,0.2558 -0.1592,0.3439 -0.1028,0.0854 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0371 -0.2559,-0.1105 -0.0646,-0.0765 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0236 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1648 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.1105 -0.2513,0.1105 -0.15,0 -0.2779,-0.0425 -0.3838,-0.1279 -0.1059,-0.0881 -0.1587,-0.2028 -0.1587,-0.3439 0,-0.0617 0.0156,-0.1268 0.0481,-0.1945 0.0323,-0.0705 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1527 0.2206,-0.3086 -0.0736,0.0059 -0.1751,0.0205 -0.3045,0.044 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.0454 -0.3311,-0.1366 -0.0707,-0.0941 -0.1059,-0.2103 -0.1059,-0.3485 0,-0.1412 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0101 0.2687,0.0307 0.1059,0.0204 0.2062,0.0384 0.3004,0.0532 -0.0824,-0.1177 -0.1648,-0.2371 -0.2472,-0.3577 -0.0824,-0.1206 -0.1233,-0.2278 -0.1233,-0.3219 0,-0.1384 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412z" android:pathData="m30.3156,23.9881c-0.496,0 -0.992,0.1893 -1.3705,0.5676l-2.7282,2.7288 3.4612,3.4606c0.8044,-0.2715 1.727,-0.0892 2.368,0.5517 0.6237,0.624 0.8361,1.5493 0.5471,2.3828l3.3357,3.3357c0.8076,-0.2777 1.738,-0.098 2.3828,0.5476 0.9008,0.9005 0.9008,2.361 0,3.2615 -1.7823,1.7848 -4.7253,-0.1767 -3.7641,-2.5087l-3.1111,-3.1106c-2.2315,0.5285 -3.8934,-1.2655 -3.149,-3.1674l-0.6863,-0.6863l0,15.9165l5.4913,0l0,-5.8608c-0.0315,-0.7566 1.1201,-0.7566 1.0886,0l0,6.4043c0.0005,0.3013 -0.2438,0.5457 -0.545,0.5455l-6.5804,0c-0.3015,0.0005 -0.546,-0.2441 -0.5456,-0.5455l0,-17.4333c-0.0005,-0.0363 0.0029,-0.0728 0.0097,-0.1085l-1.6444,-1.6444 -9.0106,9.0084c-0.7567,0.7573 -0.7567,1.9848 0,2.7421l13.1415,13.14c0.7572,0.7567 1.9844,0.7567 2.7416,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421l-13.14,-13.1393c-0.3785,-0.3783 -0.8746,-0.5676 -1.3705,-0.5676zM29.9512,39.1825c0.1001,0 0.1808,0.0381 0.2426,0.1146 0.0648,0.0736 0.1326,0.1975 0.2032,0.371 0.0705,0.1706 0.1089,0.2615 0.1146,0.2733 0.0059,-0.0119 0.0424,-0.1026 0.11,-0.2733 0.0707,-0.1705 0.1401,-0.2946 0.2078,-0.371 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2103 0.1592,0.3485 0,0.0676 -0.0179,0.1368 -0.0532,0.2073 -0.0323,0.0707 -0.0777,0.1444 -0.1366,0.2211 -0.056,0.0734 -0.1164,0.1571 -0.1812,0.2513 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0354 0.3004,-0.0354 0.0969,0 0.1762,0.0224 0.238,0.0666 0.0648,0.0442 0.1118,0.1042 0.1413,0.1807 0.0294,0.0734 0.044,0.1544 0.044,0.2426 0,0.1384 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1372 -0.3219,0.1372 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.0386 -0.3045,-0.0446 0.1531,0.2177 0.2534,0.3652 0.3004,0.4417 0.047,0.0736 0.0706,0.1544 0.0706,0.2426 0,0.1412 -0.0533,0.2556 -0.1592,0.3439 -0.1028,0.0853 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0366 -0.2559,-0.11 -0.0646,-0.0767 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0235 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1646 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.11 -0.2513,0.11 -0.15,0 -0.2779,-0.0427 -0.3838,-0.1279 -0.1059,-0.0883 -0.1587,-0.2027 -0.1587,-0.3439 0,-0.0618 0.0156,-0.1263 0.0481,-0.194 0.0323,-0.0707 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1532 0.2206,-0.3091 -0.0736,0.0059 -0.1751,0.021 -0.3045,0.0446 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.046 -0.3311,-0.1372 -0.0707,-0.0941 -0.1059,-0.2101 -0.1059,-0.3485 0,-0.1411 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0107 0.2687,0.0312 0.1059,0.0206 0.2062,0.038 0.3004,0.0527 -0.0824,-0.1177 -0.1648,-0.2366 -0.2472,-0.3572 -0.0824,-0.1206 -0.1233,-0.2282 -0.1233,-0.3224 0,-0.1382 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412zM29.9512,43.2235c0.1001,0 0.1808,0.0383 0.2426,0.1146 0.0648,0.0735 0.1326,0.197 0.2032,0.3705 0.0705,0.1707 0.1089,0.262 0.1146,0.2738 0.0059,-0.0119 0.0424,-0.1031 0.11,-0.2738 0.0707,-0.1705 0.1401,-0.2941 0.2078,-0.3705 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2102 0.1592,0.3485 0,0.0675 -0.0179,0.1366 -0.0532,0.2073 -0.0323,0.0705 -0.0777,0.1441 -0.1366,0.2206 -0.056,0.0735 -0.1164,0.1576 -0.1812,0.2518 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0353 0.3004,-0.0353 0.0969,0 0.1762,0.0219 0.238,0.0661 0.0648,0.0442 0.1118,0.1047 0.1413,0.1812 0.0294,0.0736 0.044,0.1542 0.044,0.2426 0,0.1382 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1366 -0.3219,0.1366 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.038 -0.3045,-0.044 0.1531,0.2177 0.2534,0.3647 0.3004,0.4411 0.047,0.0736 0.0706,0.1549 0.0706,0.2431 0,0.1411 -0.0533,0.2558 -0.1592,0.3439 -0.1028,0.0854 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0371 -0.2559,-0.1105 -0.0646,-0.0765 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0236 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1648 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.1105 -0.2513,0.1105 -0.15,0 -0.2779,-0.0425 -0.3838,-0.1279 -0.1059,-0.0881 -0.1587,-0.2028 -0.1587,-0.3439 0,-0.0617 0.0156,-0.1268 0.0481,-0.1945 0.0323,-0.0705 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1527 0.2206,-0.3086 -0.0736,0.0059 -0.1751,0.0205 -0.3045,0.044 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.0454 -0.3311,-0.1366 -0.0707,-0.0941 -0.1059,-0.2103 -0.1059,-0.3485 0,-0.1412 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0101 0.2687,0.0307 0.1059,0.0204 0.2062,0.0384 0.3004,0.0532 -0.0824,-0.1177 -0.1648,-0.2371 -0.2472,-0.3577 -0.0824,-0.1206 -0.1233,-0.2278 -0.1233,-0.3219 0,-0.1384 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412z"
android:strokeWidth="1.3358" android:strokeWidth="1.3358" />
android:fillColor="#3bdbbc"/>
</group> </group>
</vector> </vector>

View file

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:tint="?colorOnPrimary"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24" android:viewportHeight="24">
android:tint="?colorOnPrimary">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="#FFFFFFFF"
android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM15,5L8,5c-1.1,0 -1.99,0.9 -1.99,2L6,21c0,1.1 0.89,2 1.99,2L19,23c1.1,0 2,-0.9 2,-2L21,11l-6,-6zM8,21L8,7h6v5h5v9L8,21z" /> android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM15,5L8,5c-1.1,0 -1.99,0.9 -1.99,2L6,21c0,1.1 0.89,2 1.99,2L19,23c1.1,0 2,-0.9 2,-2L21,11l-6,-6zM8,21L8,7h6v5h5v9L8,21z" />

View file

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
<!--
Requires a layer-list since attributes cannot be resolved in selectors, see: Requires a layer-list since attributes cannot be resolved in selectors, see:
https://stackoverflow.com/a/36424426/297261 https://stackoverflow.com/a/36424426/297261
--> -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item>
<selector> <selector>
<item android:drawable="@color/list_multiselect_background" android:state_selected="true" /> <item
android:drawable="@color/list_multiselect_background"
android:state_selected="true" />
<item android:drawable="@android:color/transparent" /> <item android:drawable="@android:color/transparent" />
</selector> </selector>
</item> </item>

View file

@ -3,44 +3,44 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:padding="@dimen/activity_horizontal_margin" android:padding="@dimen/activity_horizontal_margin"
tools:context="com.zeapo.pwdstore.git.GitOperationActivity" tools:context="com.zeapo.pwdstore.git.GitOperationActivity">
android:background="?android:attr/windowBackground">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
style="@style/TextAppearance.MaterialComponents.Headline5"
android:id="@+id/server_label" android:id="@+id/server_label"
android:textStyle="bold" style="@style/TextAppearance.MaterialComponents.Headline5"
android:textSize="24sp"
android:text="@string/server_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:text="@string/server_name"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
style="@style/TextAppearance.MaterialComponents.Headline6"
android:id="@+id/label_server_protocol" android:id="@+id/label_server_protocol"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/server_protocol"
android:layout_margin="8dp" android:layout_margin="8dp"
app:layout_constraintTop_toBottomOf="@id/server_label" android:text="@string/server_protocol"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/server_label" />
<com.google.android.material.button.MaterialButtonToggleGroup <com.google.android.material.button.MaterialButtonToggleGroup
style="@style/TextAppearance.MaterialComponents.Headline1"
android:id="@+id/clone_protocol_group" android:id="@+id/clone_protocol_group"
style="@style/TextAppearance.MaterialComponents.Headline1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
app:layout_constraintTop_toBottomOf="@id/label_server_protocol"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_server_protocol"
app:selectionRequired="true" app:selectionRequired="true"
app:singleSelection="true"> app:singleSelection="true">
@ -61,11 +61,12 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/server_user_layout" android:id="@+id/server_user_layout"
android:hint="@string/server_user"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:hint="@string/server_user"
app:layout_constraintTop_toBottomOf="@id/clone_protocol_group"> app:layout_constraintTop_toBottomOf="@id/clone_protocol_group">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/server_user" android:id="@+id/server_user"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -79,14 +80,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:hint="@string/server_url" android:hint="@string/server_url"
app:layout_constraintTop_toBottomOf="@id/server_user_layout" app:layout_constraintEnd_toStartOf="@id/label_server_port"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/label_server_port"> app:layout_constraintTop_toBottomOf="@id/server_user_layout">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/server_url"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/server_url"
android:inputType="textWebEmailAddress" /> android:inputType="textWebEmailAddress" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -97,10 +98,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:hint="@string/server_port_hint" android:hint="@string/server_port_hint"
app:layout_constraintStart_toEndOf="@id/label_server_url" app:layout_constraintDimensionRatio="1:0.8"
app:layout_constraintTop_toBottomOf="@id/server_user_layout"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintDimensionRatio="1:0.8"> app:layout_constraintStart_toEndOf="@id/label_server_url"
app:layout_constraintTop_toBottomOf="@id/server_user_layout">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/server_port" android:id="@+id/server_port"
@ -128,14 +129,14 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
style="@style/TextAppearance.MaterialComponents.Headline6"
android:id="@+id/label_connection_mode" android:id="@+id/label_connection_mode"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/connection_mode"
android:layout_margin="8dp" android:layout_margin="8dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:text="@string/connection_mode"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_server_path" /> app:layout_constraintTop_toBottomOf="@id/label_server_path" />
@ -144,8 +145,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/label_connection_mode" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintTop_toBottomOf="@id/label_connection_mode">
<RadioButton <RadioButton
android:id="@+id/connection_mode_ssh_key" android:id="@+id/connection_mode_ssh_key"
@ -179,11 +180,11 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/save_button" android:id="@+id/save_button"
android:text="@string/crypto_save"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@id/connection_mode_group" android:text="@string/crypto_save"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/connection_mode_group" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>

View file

@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="@dimen/activity_horizontal_margin"
android:background="?android:attr/windowBackground" android:background="?android:attr/windowBackground"
android:padding="@dimen/activity_horizontal_margin"
tools:context="com.zeapo.pwdstore.git.GitConfigActivity" tools:context="com.zeapo.pwdstore.git.GitConfigActivity"
tools:layout_editor_absoluteX="0dp" tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="81dp"> tools:layout_editor_absoluteY="81dp">
@ -15,8 +15,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:hint="@string/git_user_name_hint" android:hint="@string/git_user_name_hint"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteY="64dp"> tools:layout_editor_absoluteY="64dp">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
@ -33,8 +33,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:hint="@string/git_user_email" android:hint="@string/git_user_email"
app:layout_constraintTop_toBottomOf="@id/username_input_layout" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintTop_toBottomOf="@id/username_input_layout">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/git_user_email" android:id="@+id/git_user_email"
@ -50,20 +50,20 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:text="@string/crypto_save" android:text="@string/crypto_save"
app:layout_constraintTop_toBottomOf="@id/email_input_layout" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintTop_toBottomOf="@id/email_input_layout" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
style="@style/TextAppearance.MaterialComponents.Headline5"
android:textStyle="bold"
android:textSize="24sp"
android:id="@+id/git_tools_title" android:id="@+id/git_tools_title"
style="@style/TextAppearance.MaterialComponents.Headline5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:text="@string/hackish_tools" android:text="@string/hackish_tools"
app:layout_constraintTop_toBottomOf="@id/save_button" android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent" /> android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/save_button" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/commit_hash_label" android:id="@+id/commit_hash_label"
@ -71,8 +71,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:text="@string/commit_hash" android:text="@string/commit_hash"
app:layout_constraintTop_toBottomOf="@id/git_tools_title" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent"/> app:layout_constraintTop_toBottomOf="@id/git_tools_title" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/git_commit_hash" android:id="@+id/git_commit_hash"
@ -80,8 +80,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/git_tools_title"
app:layout_constraintStart_toEndOf="@id/commit_hash_label" app:layout_constraintStart_toEndOf="@id/commit_hash_label"
app:layout_constraintTop_toBottomOf="@id/git_tools_title"
tools:text="HASH" /> tools:text="HASH" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton

View file

@ -42,15 +42,16 @@
android:inputType="text" android:inputType="text"
tools:text="example.com" /> tools:text="example.com" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<ViewSwitcher <ViewSwitcher
android:id="@+id/rvPasswordSwitcher" android:id="@+id/rvPasswordSwitcher"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginTop="@dimen/activity_vertical_margin"
app:layout_constraintBottom_toTopOf="@id/strictDomainSearch" app:layout_constraintBottom_toTopOf="@id/strictDomainSearch"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/searchLayout" app:layout_constraintTop_toBottomOf="@id/searchLayout">
android:layout_height="0dp">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvPassword" android:id="@+id/rvPassword"

View file

@ -2,8 +2,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".PasswordStore" android:orientation="vertical"
android:orientation="vertical"> tools:context=".PasswordStore">
<LinearLayout <LinearLayout
android:id="@+id/main_layout" android:id="@+id/main_layout"

View file

@ -7,10 +7,10 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="24dp" android:paddingLeft="24dp"
android:paddingTop="20dp"
android:paddingRight="24dp" android:paddingRight="24dp"
android:paddingTop="20dp"> android:paddingBottom="20dp">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -21,19 +21,19 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:src="@drawable/autofill_ins_1" android:contentDescription="@string/autofill_ins_1_hint"
android:contentDescription="@string/autofill_ins_1_hint" /> android:src="@drawable/autofill_ins_1" />
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:src="@drawable/autofill_ins_2" android:contentDescription="@string/autofill_ins_2_hint"
android:contentDescription="@string/autofill_ins_2_hint" /> android:src="@drawable/autofill_ins_2" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -44,10 +44,10 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="114dp" android:layout_height="114dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:src="@drawable/autofill_ins_3" android:layout_marginBottom="8dp"
android:contentDescription="@string/autofill_ins_3_hint" /> android:contentDescription="@string/autofill_ins_3_hint"
android:src="@drawable/autofill_ins_3" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -10,8 +10,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scrollbars="none" android:scrollbars="none"
tools:listitem="@layout/autofill_row_layout" tools:itemCount="20"
tools:itemCount="20"/> tools:listitem="@layout/autofill_row_layout" />
<ProgressBar <ProgressBar
android:id="@+id/progress_bar" android:id="@+id/progress_bar"
@ -24,16 +24,16 @@
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab" android:id="@+id/fab"
android:src="@drawable/ic_add_white_48dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_compat_margin"
android:src="@drawable/ic_add_white_48dp"
app:backgroundTint="?attr/colorSecondary"
app:borderWidth="0dp"
app:elevation="6dp" app:elevation="6dp"
app:pressedTranslationZ="12dp" app:pressedTranslationZ="12dp"
app:backgroundTint="?attr/colorSecondary" app:rippleColor="?attr/colorSecondary" />
app:rippleColor="?attr/colorSecondary"
app:borderWidth="0dp"
android:layout_margin="@dimen/fab_compat_margin"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"/>
</RelativeLayout> </RelativeLayout>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_width="match_parent" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="64dp" android:layout_height="64dp"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin">
xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/app_icon" android:id="@+id/app_icon"

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?android:attr/windowBackground" android:background="?android:attr/windowBackground"
android:orientation="vertical" android:orientation="vertical"
tools:context="com.zeapo.pwdstore.crypto.PgpActivity"> tools:context="com.zeapo.pwdstore.crypto.PgpActivity">
@ -58,8 +58,8 @@
android:id="@+id/divider" android:id="@+id/divider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:src="@drawable/divider" android:src="@drawable/divider"
app:layout_constraintTop_toBottomOf="@id/crypto_password_last_changed" app:layout_constraintTop_toBottomOf="@id/crypto_password_last_changed"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
@ -70,8 +70,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginTop="@dimen/activity_vertical_margin"
android:visibility="invisible" android:visibility="invisible"
tools:visibility="visible" app:layout_constraintTop_toBottomOf="@id/divider"
app:layout_constraintTop_toBottomOf="@id/divider"> tools:visibility="visible">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/crypto_password_show_label" android:id="@+id/crypto_password_show_label"
@ -79,9 +79,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/password" android:text="@string/password"
android:textColor="?android:attr/textColor" android:textColor="?android:attr/textColor"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/crypto_password_show" android:id="@+id/crypto_password_show"
@ -90,16 +90,16 @@
android:layout_gravity="fill" android:layout_gravity="fill"
android:gravity="bottom" android:gravity="bottom"
android:textColor="?android:attr/textColor" android:textColor="?android:attr/textColor"
app:layout_constraintStart_toEndOf="@id/crypto_password_show_label" android:typeface="monospace"
app:layout_constraintBaseline_toBaselineOf="@id/crypto_password_show_label" app:layout_constraintBaseline_toBaselineOf="@id/crypto_password_show_label"
android:typeface="monospace" /> app:layout_constraintStart_toEndOf="@id/crypto_password_show_label" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/crypto_password_toggle_show" android:id="@+id/crypto_password_toggle_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/show_password"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="@string/show_password"
app:layout_constraintTop_toBottomOf="@id/crypto_password_show_label" /> app:layout_constraintTop_toBottomOf="@id/crypto_password_show_label" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
@ -116,14 +116,14 @@
android:id="@+id/crypto_copy_username" android:id="@+id/crypto_copy_username"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:background="?android:attr/windowBackground" android:background="?android:attr/windowBackground"
android:contentDescription="@string/copy_username" android:contentDescription="@string/copy_username"
android:src="@drawable/ic_content_copy" android:src="@drawable/ic_content_copy"
android:visibility="invisible" android:visibility="invisible"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" /> tools:visibility="visible" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
@ -145,78 +145,78 @@
android:id="@+id/crypto_username_show" android:id="@+id/crypto_username_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="@id/crypto_username_show_label" android:layout_below="@id/crypto_username_show_label"
android:layout_alignParentStart="true"
android:layout_toStartOf="@id/crypto_copy_username" android:layout_toStartOf="@id/crypto_copy_username"
android:textColor="?android:attr/textColor" android:textColor="?android:attr/textColor"
android:textIsSelectable="true" android:textIsSelectable="true"
android:typeface="monospace" android:typeface="monospace"
android:visibility="invisible" android:visibility="invisible"
app:layout_constraintTop_toBottomOf="@id/crypto_username_show_label"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/crypto_username_show_label"
tools:visibility="visible" /> tools:visibility="visible" />
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/crypto_copy_otp" android:id="@+id/crypto_copy_otp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_below="@id/crypto_username_show" android:layout_below="@id/crypto_username_show"
android:layout_alignParentEnd="true"
android:background="?android:attr/windowBackground" android:background="?android:attr/windowBackground"
android:contentDescription="@string/copy_otp" android:contentDescription="@string/copy_otp"
android:src="@drawable/ic_content_copy" android:src="@drawable/ic_content_copy"
android:visibility="invisible" android:visibility="invisible"
app:layout_constraintTop_toTopOf="@id/crypto_otp_show_label"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/crypto_otp_show_label"
tools:visibility="visible" /> tools:visibility="visible" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/crypto_otp_show_label" android:id="@+id/crypto_otp_show_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="@id/crypto_username_show" android:layout_below="@id/crypto_username_show"
android:layout_alignParentStart="true"
android:layout_toStartOf="@id/crypto_copy_otp" android:layout_toStartOf="@id/crypto_copy_otp"
android:text="@string/otp" android:text="@string/otp"
android:textColor="?android:attr/textColor" android:textColor="?android:attr/textColor"
app:layout_constraintTop_toBottomOf="@id/crypto_username_show" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:textStyle="bold" /> app:layout_constraintTop_toBottomOf="@id/crypto_username_show" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/crypto_otp_show" android:id="@+id/crypto_otp_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="@id/crypto_otp_show_label" android:layout_below="@id/crypto_otp_show_label"
android:layout_alignParentStart="true"
android:layout_toStartOf="@id/crypto_copy_otp" android:layout_toStartOf="@id/crypto_copy_otp"
android:textColor="?android:attr/textColor" android:textColor="?android:attr/textColor"
android:textIsSelectable="true" android:textIsSelectable="true"
app:layout_constraintTop_toBottomOf="@id/crypto_otp_show_label" android:typeface="monospace"
android:typeface="monospace" /> app:layout_constraintTop_toBottomOf="@id/crypto_otp_show_label" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/crypto_extra_show_label" android:id="@+id/crypto_extra_show_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="@id/crypto_otp_show" android:layout_below="@id/crypto_otp_show"
android:layout_alignParentStart="true"
android:text="@string/extra_content" android:text="@string/extra_content"
android:textColor="?android:attr/textColor" android:textColor="?android:attr/textColor"
app:layout_constraintTop_toBottomOf="@id/crypto_otp_show" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:textStyle="bold" /> app:layout_constraintTop_toBottomOf="@id/crypto_otp_show" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/crypto_extra_show" android:id="@+id/crypto_extra_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="@id/crypto_extra_show_label" android:layout_below="@id/crypto_extra_show_label"
android:layout_alignParentStart="true"
android:textColor="?android:attr/textColor" android:textColor="?android:attr/textColor"
android:textIsSelectable="true" android:textIsSelectable="true"
app:layout_constraintTop_toBottomOf="@id/crypto_extra_show_label" android:typeface="monospace"
android:typeface="monospace" /> app:layout_constraintTop_toBottomOf="@id/crypto_extra_show_label" />
<ToggleButton <ToggleButton
android:id="@+id/crypto_extra_toggle_show" android:id="@+id/crypto_extra_toggle_show"
@ -225,13 +225,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/crypto_extra_show" android:layout_below="@id/crypto_extra_show"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:backgroundTint="?attr/colorSecondary"
android:checked="false" android:checked="false"
android:paddingTop="8dp" android:paddingTop="8dp"
android:textColor="?android:attr/windowBackground" android:textColor="?android:attr/windowBackground"
android:textOff="@string/show_extra" android:textOff="@string/show_extra"
android:textOn="@string/hide_extra" android:textOn="@string/hide_extra"
app:layout_constraintTop_toBottomOf="@id/crypto_extra_show" app:layout_constraintTop_toBottomOf="@id/crypto_extra_show" />
android:backgroundTint="?attr/colorSecondary"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?android:attr/windowBackground" android:background="?android:attr/windowBackground"
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/activity_horizontal_margin" android:padding="@dimen/activity_horizontal_margin"
@ -14,8 +14,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:textColor="?android:attr/textColor"
android:enabled="false" android:enabled="false"
android:textColor="?android:attr/textColor"
android:textSize="18sp" android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -23,13 +23,14 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_input_layout" android:id="@+id/name_input_layout"
android:layout_gravity="center_vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="8dp" android:layout_margin="8dp"
android:hint="@string/crypto_name_hint" android:hint="@string/crypto_name_hint"
app:layout_constraintTop_toBottomOf="@id/crypto_password_category" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintTop_toBottomOf="@id/crypto_password_category">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/crypto_password_file_edit" android:id="@+id/crypto_password_file_edit"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -43,13 +44,14 @@
android:layout_margin="8dp" android:layout_margin="8dp"
android:hint="@string/crypto_pass_label" android:hint="@string/crypto_pass_label"
app:endIconMode="password_toggle" app:endIconMode="password_toggle"
app:layout_constraintTop_toBottomOf="@id/name_input_layout" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintTop_toBottomOf="@id/name_input_layout">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/crypto_password_edit" android:id="@+id/crypto_password_edit"
android:inputType="textVisiblePassword"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:inputType="textVisiblePassword" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
@ -58,8 +60,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:text="@string/pwd_generate_button" android:text="@string/pwd_generate_button"
app:layout_constraintTop_toBottomOf="@id/password_input_layout" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintTop_toBottomOf="@id/password_input_layout" />
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/extra_input_layout" android:id="@+id/extra_input_layout"
@ -67,14 +69,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:hint="@string/crypto_extra_label" android:hint="@string/crypto_extra_label"
app:layout_constraintTop_toBottomOf="@id/generate_password" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintTop_toBottomOf="@id/generate_password">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/crypto_extra_edit" android:id="@+id/crypto_extra_edit"
android:inputType="textMultiLine|textVisiblePassword"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:inputType="textMultiLine|textVisiblePassword" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"

View file

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="24dp" android:paddingLeft="24dp"
android:paddingTop="20dp"
android:paddingRight="24dp" android:paddingRight="24dp"
android:paddingTop="20dp"> android:paddingBottom="20dp">
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="URL"> android:hint="URL">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/webURL" android:id="@+id/webURL"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -59,11 +59,11 @@
android:layout_weight="1" /> android:layout_weight="1" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/matchButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="+"
android:id="@+id/matchButton"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:text="+"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<RadioButton <RadioButton

View file

@ -7,10 +7,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="24dp" android:paddingLeft="24dp"
android:paddingRight="24dp"
android:paddingTop="20dp" android:paddingTop="20dp"
android:paddingRight="24dp"
android:paddingBottom="20dp"
tools:context=".MainActivityFragment"> tools:context=".MainActivityFragment">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView

View file

@ -7,10 +7,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="24dp" android:paddingLeft="24dp"
android:paddingTop="20dp"
android:paddingRight="24dp" android:paddingRight="24dp"
android:paddingTop="20dp"> android:paddingBottom="20dp">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/public_key" android:id="@+id/public_key"

View file

@ -18,18 +18,20 @@
android:text="@string/ssh_keygen_length" /> android:text="@string/ssh_keygen_length" />
<com.google.android.material.button.MaterialButtonToggleGroup <com.google.android.material.button.MaterialButtonToggleGroup
style="@style/TextAppearance.MaterialComponents.Headline1"
android:id="@+id/key_length_group" android:id="@+id/key_length_group"
style="@style/TextAppearance.MaterialComponents.Headline1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:selectionRequired="true" app:selectionRequired="true"
app:singleSelection="true"> app:singleSelection="true">
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/key_length_2048" android:id="@+id/key_length_2048"
style="?attr/materialButtonOutlinedStyle" style="?attr/materialButtonOutlinedStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/key_length_2048" /> android:text="@string/key_length_2048" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/key_length_4096" android:id="@+id/key_length_4096"
style="?attr/materialButtonOutlinedStyle" style="?attr/materialButtonOutlinedStyle"
@ -49,8 +51,8 @@
android:id="@+id/passphrase" android:id="@+id/passphrase"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:importantForAccessibility="no"
android:fontFamily="@font/sourcecodepro" android:fontFamily="@font/sourcecodepro"
android:importantForAccessibility="no"
android:inputType="textPassword" /> android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -1,8 +1,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
android:orientation="vertical"> android:orientation="vertical">
@ -11,37 +10,37 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:src="@mipmap/ic_launcher"
android:contentDescription="@string/app_icon_hint" android:contentDescription="@string/app_icon_hint"
app:layout_constraintTop_toTopOf="parent" android:src="@mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/app_name" android:id="@+id/app_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/app_name"
android:layout_below="@+id/app_icon" android:layout_below="@+id/app_icon"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/app_icon" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintTop_toBottomOf="@+id/app_icon" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.TextButton" style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:onClick="openSettings"
android:text="@string/action_settings"
android:textColor="@android:color/white"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:onClick="openSettings"
android:text="@string/action_settings"
android:textColor="@android:color/white"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -49,13 +48,13 @@
android:id="@+id/use_local_directory" android:id="@+id/use_local_directory"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:onClick="createNewRepository" android:onClick="createNewRepository"
android:text="@string/initialize" android:text="@string/initialize"
android:textSize="12sp" android:textSize="12sp"
android:layout_marginTop="48dp" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_name"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintTop_toBottomOf="@id/app_name" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -63,8 +62,8 @@
android:onClick="cloneExistingRepository" android:onClick="cloneExistingRepository"
android:text="@string/clone" android:text="@string/clone"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@id/use_local_directory" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintTop_toBottomOf="@id/use_local_directory" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -49,19 +49,19 @@
<CheckBox <CheckBox
android:id="@+id/xknumerals" android:id="@+id/xknumerals"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/xkpwgen_numbers" android:text="@string/xkpwgen_numbers" />
android:layout_height="wrap_content" />
<Spinner <Spinner
android:id="@+id/xk_numbers_count" android:id="@+id/xk_numbers_count"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:minWidth="40dp"
android:dropDownWidth="40dp"
android:gravity="center_vertical"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:dropDownWidth="40dp"
android:entries="@array/xk_range_1_10" android:entries="@array/xk_range_1_10"
android:entryValues="@array/xk_range_1_10" android:entryValues="@array/xk_range_1_10"
android:gravity="center_vertical"
android:minWidth="40dp"
android:spinnerMode="dropdown" /> android:spinnerMode="dropdown" />
</LinearLayout> </LinearLayout>
@ -73,19 +73,19 @@
<CheckBox <CheckBox
android:id="@+id/xksymbols" android:id="@+id/xksymbols"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/xkpwgen_symbols" android:text="@string/xkpwgen_symbols" />
android:layout_height="wrap_content"/>
<Spinner <Spinner
android:id="@+id/xk_symbols_count" android:id="@+id/xk_symbols_count"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minWidth="40dp"
android:dropDownWidth="40dp" android:dropDownWidth="40dp"
android:entries="@array/xk_range_1_10" android:entries="@array/xk_range_1_10"
android:entryValues="@array/xk_range_1_10" android:entryValues="@array/xk_range_1_10"
android:gravity="center_vertical"
android:minWidth="40dp"
android:spinnerMode="dropdown" /> android:spinnerMode="dropdown" />
</LinearLayout> </LinearLayout>
@ -116,9 +116,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:maxLength="2"
android:ems="10" android:ems="10"
android:inputType="number" /> android:inputType="number"
android:maxLength="2" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -132,8 +132,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:ems="10"
android:autofillHints="" android:autofillHints=""
android:ems="10"
android:hint="@string/xkpwgen_separator_character" android:hint="@string/xkpwgen_separator_character"
android:inputType="text" /> android:inputType="text" />
</LinearLayout> </LinearLayout>

View file

@ -13,6 +13,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/git_auth_passphrase" android:id="@+id/git_auth_passphrase"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -1,39 +1,38 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.TextButton"
android:id="@+id/create_folder" android:id="@+id/create_folder"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_item_height" android:layout_height="@dimen/bottom_sheet_item_height"
android:layout_margin="@dimen/normal_margin"
android:text="@string/bottom_sheet_create_new_folder" android:text="@string/bottom_sheet_create_new_folder"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textColor="?attr/colorOnSurface" android:textColor="?attr/colorOnSurface"
android:layout_margin="@dimen/normal_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:icon="@drawable/ic_action_new_folder" app:icon="@drawable/ic_action_new_folder"
app:iconPadding="@dimen/normal_margin" app:iconPadding="@dimen/normal_margin"
app:iconTint="?attr/colorSecondary" app:iconTint="?attr/colorSecondary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:rippleColor="?attr/colorSecondary" /> app:rippleColor="?attr/colorSecondary" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.TextButton"
android:id="@+id/create_password" android:id="@+id/create_password"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_item_height" android:layout_height="@dimen/bottom_sheet_item_height"
android:layout_margin="@dimen/normal_margin"
android:text="@string/bottom_sheet_create_new_password" android:text="@string/bottom_sheet_create_new_password"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textColor="?attr/colorOnSurface" android:textColor="?attr/colorOnSurface"
android:layout_margin="@dimen/normal_margin"
app:layout_constraintTop_toBottomOf="@id/create_folder"
app:icon="@drawable/ic_action_new_password" app:icon="@drawable/ic_action_new_password"
app:iconPadding="@dimen/normal_margin" app:iconPadding="@dimen/normal_margin"
app:iconTint="?attr/colorSecondary" app:iconTint="?attr/colorSecondary"
app:layout_constraintTop_toBottomOf="@id/create_folder"
app:rippleColor="?attr/colorSecondary" /> app:rippleColor="?attr/colorSecondary" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -12,13 +12,13 @@
<ImageView <ImageView
android:id="@+id/icon" android:id="@+id/icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:tint="@color/secondary_color"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:maxWidth="20dp" android:maxWidth="20dp"
android:maxHeight="20dp" android:maxHeight="20dp"
android:tint="@color/secondary_color"
tools:src="@mipmap/ic_launcher" /> tools:src="@mipmap/ic_launcher" />
<LinearLayout <LinearLayout

View file

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="24dp" android:paddingLeft="24dp"
android:paddingTop="20dp"
android:paddingRight="24dp" android:paddingRight="24dp"
android:paddingTop="20dp"> android:paddingBottom="20dp">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/intro_text" android:id="@+id/intro_text"
@ -32,15 +32,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginTop="@dimen/activity_vertical_margin"
android:text="@string/oreo_autofill_enable_dialog_installed_browsers" android:text="@string/oreo_autofill_enable_dialog_installed_browsers"
android:textStyle="bold" android:textSize="16sp"
android:textSize="16sp" /> android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/supportedBrowsers" android:id="@+id/supportedBrowsers"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="Firefox: Fill and save credentials" android:textSize="16sp"
android:textSize="16sp" /> tools:text="Firefox: Fill and save credentials" />
</LinearLayout> </LinearLayout>

View file

@ -8,9 +8,9 @@
android:id="@+id/hotp_remember_checkbox" android:id="@+id/hotp_remember_checkbox"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/dialog_update_check" android:text="@string/dialog_update_check"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View file

@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:clipChildren="false" android:clipChildren="false"
android:clipToPadding="false" android:clipToPadding="false"
android:orientation="vertical"
tools:context="com.zeapo.pwdstore.PasswordFragment"> tools:context="com.zeapo.pwdstore.PasswordFragment">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
@ -26,13 +25,13 @@
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab" android:id="@+id/fab"
android:src="@drawable/ic_add_white_48dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_compat_margin" android:layout_margin="@dimen/fab_compat_margin"
android:layout_alignParentBottom="true" android:src="@drawable/ic_add_white_48dp"
android:layout_alignParentEnd="true"
app:backgroundTint="?attr/colorSecondary" app:backgroundTint="?attr/colorSecondary"
app:rippleColor="?attr/colorSecondary" /> app:rippleColor="?attr/colorSecondary" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/password_row_background" android:background="@drawable/password_row_background"
@ -15,9 +15,9 @@
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:alpha="0.5" android:alpha="0.5"
android:contentDescription="@string/folder_icon_hint" android:contentDescription="@string/folder_icon_hint"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
tools:src="@drawable/ic_multiple_files_24dp" /> tools:src="@drawable/ic_multiple_files_24dp" />
<TextView <TextView
@ -35,11 +35,11 @@
android:id="@+id/child_count" android:id="@+id/child_count"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:textSize="18sp" android:textSize="18sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/folder_indicator" app:layout_constraintEnd_toStartOf="@id/folder_indicator"
android:layout_marginEnd="12dp" app:layout_constraintTop_toTopOf="parent"
tools:text="12" /> tools:text="12" />
<ImageView <ImageView
@ -48,8 +48,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:src="@drawable/ic_keyboard_arrow_right_24dp" android:src="@drawable/ic_keyboard_arrow_right_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/pgp_handler_linearlayout" android:id="@+id/pgp_handler_linearlayout"

View file

@ -1,9 +1,10 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:pwstore="http://schemas.android.com/apk/res-auto" xmlns:pwstore="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.zeapo.pwdstore.git.GitServerConfigActivity"> tools:context="com.zeapo.pwdstore.git.GitServerConfigActivity">
<item android:id="@+id/user_pref" <item
android:title="@string/action_settings" android:id="@+id/user_pref"
android:orderInCategory="100" android:orderInCategory="100"
android:title="@string/action_settings"
pwstore:showAsAction="never" /> pwstore:showAsAction="never" />
</menu> </menu>

View file

@ -1,26 +1,31 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_search" <item
android:title="@string/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp" android:icon="@drawable/ic_search_white_24dp"
app:showAsAction="always|collapseActionView" android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView" /> app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView" />
<item android:id="@+id/git_sync" <item
android:id="@+id/git_sync"
android:title="@string/git_sync" /> android:title="@string/git_sync" />
<item android:id="@+id/git_pull" <item
android:id="@+id/git_pull"
android:title="@string/git_pull" /> android:title="@string/git_pull" />
<item android:id="@+id/git_push" <item
android:id="@+id/git_push"
android:title="@string/git_push" /> android:title="@string/git_push" />
<item android:id="@+id/refresh" <item
android:id="@+id/refresh"
android:title="@string/refresh_list" /> android:title="@string/refresh_list" />
<item android:id="@+id/user_pref" <item
android:title="@string/action_settings" android:id="@+id/user_pref"
android:orderInCategory="100" /> android:orderInCategory="100"
android:title="@string/action_settings" />
</menu> </menu>

View file

@ -1,20 +1,23 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_search" <item
android:title="@string/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp" android:icon="@drawable/ic_search_white_24dp"
app:showAsAction="always|collapseActionView" android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView" /> app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView" />
<item android:id="@+id/git_pull" <item
android:id="@+id/git_pull"
android:title="@string/git_pull" /> android:title="@string/git_pull" />
<item android:id="@+id/refresh" <item
android:id="@+id/refresh"
android:title="@string/refresh_list" /> android:title="@string/refresh_list" />
<item android:id="@+id/user_pref" <item
android:title="@string/action_settings" android:id="@+id/user_pref"
android:orderInCategory="100" /> android:orderInCategory="100"
android:title="@string/action_settings" />
</menu> </menu>

View file

@ -1,17 +1,19 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_search" <item
android:title="@string/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp" android:icon="@drawable/ic_search_white_24dp"
app:showAsAction="always|collapseActionView" android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView" /> app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView" />
<item android:id="@+id/refresh" <item
android:id="@+id/refresh"
android:title="@string/refresh_list" /> android:title="@string/refresh_list" />
<item android:id="@+id/user_pref" <item
android:title="@string/action_settings" android:id="@+id/user_pref"
android:orderInCategory="100" /> android:orderInCategory="100"
android:title="@string/action_settings" />
</menu> </menu>

View file

@ -1,20 +1,20 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:pwstore="http://schemas.android.com/apk/res-auto" xmlns:pwstore="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.zeapo.pwdstore.crypto.PgpActivity"> tools:context="com.zeapo.pwdstore.crypto.PgpActivity">
<item android:title="@string/share_as_plaintext" <item
android:icon="@drawable/ic_share_white_24dp"
pwstore:showAsAction="ifRoom"
android:id="@+id/share_password_as_plaintext" android:id="@+id/share_password_as_plaintext"
/> android:icon="@drawable/ic_share_white_24dp"
<item android:title="@string/copy_password" android:title="@string/share_as_plaintext"
android:icon="@drawable/ic_content_copy_white_24dp" pwstore:showAsAction="ifRoom" />
pwstore:showAsAction="ifRoom" <item
android:id="@+id/copy_password" android:id="@+id/copy_password"
/> android:icon="@drawable/ic_content_copy_white_24dp"
<item android:title="@string/edit_password" android:title="@string/copy_password"
android:icon="@drawable/ic_edit_white_24dp" pwstore:showAsAction="ifRoom" />
pwstore:showAsAction="ifRoom" <item
android:id="@+id/edit_password" android:id="@+id/edit_password"
/> android:icon="@drawable/ic_edit_white_24dp"
android:title="@string/edit_password"
pwstore:showAsAction="ifRoom" />
</menu> </menu>

View file

@ -1,20 +1,20 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:pwstore="http://schemas.android.com/apk/res-auto" xmlns:pwstore="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.zeapo.pwdstore.crypto.PgpActivity"> tools:context="com.zeapo.pwdstore.crypto.PgpActivity">
<item android:title="@string/crypto_cancel" <item
android:icon="@drawable/ic_clear_white_24dp"
pwstore:showAsAction="ifRoom"
android:id="@+id/crypto_cancel_add" android:id="@+id/crypto_cancel_add"
/> android:icon="@drawable/ic_clear_white_24dp"
<item android:title="@string/crypto_save" android:title="@string/crypto_cancel"
android:icon="@drawable/ic_save_white_24dp" pwstore:showAsAction="ifRoom" />
pwstore:showAsAction="ifRoom" <item
android:id="@+id/crypto_confirm_add" android:id="@+id/crypto_confirm_add"
/> android:icon="@drawable/ic_save_white_24dp"
<item android:title="@string/crypto_save_and_copy" android:title="@string/crypto_save"
android:icon="@drawable/ic_save_copy_white_24dp" pwstore:showAsAction="ifRoom" />
pwstore:showAsAction="ifRoom" <item
android:id="@+id/crypto_confirm_add_and_copy" android:id="@+id/crypto_confirm_add_and_copy"
/> android:icon="@drawable/ic_save_copy_white_24dp"
android:title="@string/crypto_save_and_copy"
pwstore:showAsAction="ifRoom" />
</menu> </menu>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:pwstore="http://schemas.android.com/apk/res-auto" xmlns:pwstore="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.zeapo.pwdstore.SelectFolderActivity"> tools:context="com.zeapo.pwdstore.SelectFolderActivity">
<item android:title="@string/crypto_select" <item
android:icon="@drawable/ic_done_white_24dp"
pwstore:showAsAction="ifRoom"
android:id="@+id/crypto_select" android:id="@+id/crypto_select"
/> android:icon="@drawable/ic_done_white_24dp"
android:title="@string/crypto_select"
pwstore:showAsAction="ifRoom" />
</menu> </menu>

View file

@ -83,7 +83,9 @@
<item name="boxStrokeColor">@color/secondary_color</item> <item name="boxStrokeColor">@color/secondary_color</item>
<item name="hintTextColor">@color/color_control_normal</item> <item name="hintTextColor">@color/color_control_normal</item>
<item name="hintEnabled">true</item> <item name="hintEnabled">true</item>
<item name="materialThemeOverlay">@style/ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox</item> <item name="materialThemeOverlay">
@style/ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox
</item>
</style> </style>
<style name="DialogLikeTheme" parent="AppTheme"> <style name="DialogLikeTheme" parent="AppTheme">

View file

@ -1,9 +1,8 @@
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" <accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/autofill_description"
android:summary="@string/autofill_description"
android:accessibilityEventTypes="typeViewFocused|typeViewClicked|typeWindowStateChanged|typeWindowContentChanged" android:accessibilityEventTypes="typeViewFocused|typeViewClicked|typeWindowStateChanged|typeWindowContentChanged"
android:accessibilityFlags="flagDefault|flagRetrieveInteractiveWindows|flagReportViewIds"
android:accessibilityFeedbackType="feedbackGeneric" android:accessibilityFeedbackType="feedbackGeneric"
android:notificationTimeout="100" android:accessibilityFlags="flagDefault|flagRetrieveInteractiveWindows|flagReportViewIds"
android:canRetrieveWindowContent="true" android:canRetrieveWindowContent="true"
/> android:description="@string/autofill_description"
android:notificationTimeout="100"
android:summary="@string/autofill_description" />

View file

@ -80,41 +80,41 @@
<PreferenceCategory app:title="@string/password_generator_category_title"> <PreferenceCategory app:title="@string/password_generator_category_title">
<ListPreference <ListPreference
app:key="pref_key_pwgen_type"
app:title="@string/xkpwgen_pref_gentype_title"
app:defaultValue="classic" app:defaultValue="classic"
app:entries="@array/pwgen_provider_labels" app:entries="@array/pwgen_provider_labels"
app:entryValues="@array/pwgen_provider_values" app:entryValues="@array/pwgen_provider_values"
app:useSimpleSummaryProvider="true" app:key="pref_key_pwgen_type"
app:persistent="true" /> app:persistent="true"
app:title="@string/xkpwgen_pref_gentype_title"
app:useSimpleSummaryProvider="true" />
<CheckBoxPreference <CheckBoxPreference
app:key="pref_key_is_custom_dict" app:key="pref_key_is_custom_dict"
app:title="@string/xkpwgen_pref_custom_dict_title" app:summaryOff="@string/xkpwgen_pref_custom_dict_summary_off"
app:summaryOn="@string/xkpwgen_pref_custom_dict_summary_on" app:summaryOn="@string/xkpwgen_pref_custom_dict_summary_on"
app:summaryOff="@string/xkpwgen_pref_custom_dict_summary_off"/> app:title="@string/xkpwgen_pref_custom_dict_title" />
<Preference <Preference
app:dependency="pref_key_is_custom_dict"
app:key="pref_key_custom_dict" app:key="pref_key_custom_dict"
app:title="@string/xkpwgen_pref_custom_dict_picker_title"
app:summary="@string/xkpwgen_pref_custom_dict_picker_summary" app:summary="@string/xkpwgen_pref_custom_dict_picker_summary"
app:dependency="pref_key_is_custom_dict"/> app:title="@string/xkpwgen_pref_custom_dict_picker_title" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory app:title="@string/pref_category_general_title"> <PreferenceCategory app:title="@string/pref_category_general_title">
<ListPreference <ListPreference
android:defaultValue="@string/app_theme_def" android:defaultValue="@string/app_theme_def"
android:key="app_theme"
android:entries="@array/app_theme_options" android:entries="@array/app_theme_options"
android:entryValues="@array/app_theme_values" android:entryValues="@array/app_theme_values"
android:key="app_theme"
android:summary="%s" android:summary="%s"
android:title="@string/theme_title" /> android:title="@string/theme_title" />
<ListPreference <ListPreference
app:title="@string/pref_sort_order_title"
app:defaultValue="FOLDER_FIRST" app:defaultValue="FOLDER_FIRST"
app:key="sort_order"
app:entries="@array/sort_order_entries" app:entries="@array/sort_order_entries"
app:entryValues="@array/sort_order_values" app:entryValues="@array/sort_order_values"
app:key="sort_order"
app:persistent="true" app:persistent="true"
app:summary="%s" /> app:summary="%s"
app:title="@string/pref_sort_order_title" />
<CheckBoxPreference <CheckBoxPreference
app:defaultValue="true" app:defaultValue="true"
app:key="filter_recursively" app:key="filter_recursively"
@ -126,15 +126,15 @@
app:summary="@string/pref_search_on_start_hint" app:summary="@string/pref_search_on_start_hint"
app:title="@string/pref_search_on_start" /> app:title="@string/pref_search_on_start" />
<CheckBoxPreference <CheckBoxPreference
app:title="@string/pref_show_hidden_title"
app:summary="@string/pref_show_hidden_summary"
app:key="show_hidden_folders"
app:defaultValue="false" app:defaultValue="false"
app:persistent="true" /> app:key="show_hidden_folders"
app:persistent="true"
app:summary="@string/pref_show_hidden_summary"
app:title="@string/pref_show_hidden_title" />
<CheckBoxPreference <CheckBoxPreference
app:key="biometric_auth" app:key="biometric_auth"
app:title="@string/biometric_auth_title" app:summary="@string/biometric_auth_summary"
app:summary="@string/biometric_auth_summary" /> app:title="@string/biometric_auth_title" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory app:title="@string/pref_category_title_passwords"> <PreferenceCategory app:title="@string/pref_category_title_passwords">
<EditTextPreference <EditTextPreference
@ -145,14 +145,14 @@
app:title="@string/pref_clipboard_timeout_title" /> app:title="@string/pref_clipboard_timeout_title" />
<CheckBoxPreference <CheckBoxPreference
app:defaultValue="true" app:defaultValue="true"
app:title="@string/show_password_pref_title" app:key="show_password"
app:summary="@string/show_password_pref_summary" app:summary="@string/show_password_pref_summary"
app:key="show_password" /> app:title="@string/show_password_pref_title" />
<CheckBoxPreference <CheckBoxPreference
app:defaultValue="true" app:defaultValue="true"
app:title="@string/show_extra_content_pref_title" app:key="show_extra_content"
app:summary="@string/show_extra_content_pref_summary" app:summary="@string/show_extra_content_pref_summary"
app:key="show_extra_content" /> app:title="@string/show_extra_content_pref_title" />
<CheckBoxPreference <CheckBoxPreference
app:defaultValue="true" app:defaultValue="true"
app:dialogTitle="@string/pref_copy_dialog_title" app:dialogTitle="@string/pref_copy_dialog_title"
@ -164,8 +164,8 @@
<PreferenceCategory app:title="@string/pref_misc_title"> <PreferenceCategory app:title="@string/pref_misc_title">
<Preference <Preference
app:key="export_passwords" app:key="export_passwords"
app:title="@string/prefs_export_passwords_title" app:summary="@string/prefs_export_passwords_summary"
app:summary="@string/prefs_export_passwords_summary"/> app:title="@string/prefs_export_passwords_title" />
<CheckBoxPreference <CheckBoxPreference
app:defaultValue="false" app:defaultValue="false"

View file

@ -11,7 +11,6 @@ buildscript {
dependencies { dependencies {
classpath deps.gradle_plugin.android classpath deps.gradle_plugin.android
classpath deps.gradle_plugin.kotlin classpath deps.gradle_plugin.kotlin
classpath deps.gradle_plugin.spotless
} }
} }
@ -21,7 +20,6 @@ plugins {
subprojects { subprojects {
apply from: rootProject.file('dependencies.gradle') apply from: rootProject.file('dependencies.gradle')
apply from: rootProject.file('spotless.gradle')
repositories { repositories {
google() google()
jcenter() jcenter()
@ -67,8 +65,6 @@ subprojects {
} }
} }
apply from: rootProject.file('spotless.root.gradle')
tasks { tasks {
wrapper { wrapper {
distributionType = Wrapper.DistributionType.ALL distributionType = Wrapper.DistributionType.ALL

View file

@ -14,7 +14,6 @@ ext.deps = [
gradle_plugin: [ gradle_plugin: [
android: 'com.android.tools.build:gradle:3.6.3', android: 'com.android.tools.build:gradle:3.6.3',
kotlin: 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72', kotlin: 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72',
spotless: 'com.diffplug.spotless:spotless-plugin-gradle:3.28.1'
], ],
kotlin: [ kotlin: [

View file

@ -1,32 +0,0 @@
/*
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
format 'xml', {
target '**/src/**/*.xml'
indentWithSpaces(4)
trimTrailingWhitespace()
endWithNewline()
}
java {
target '**/src/**/com/zeapo/pwdstore/*.java'
trimTrailingWhitespace()
licenseHeaderFile rootProject.file('spotless.license')
removeUnusedImports()
googleJavaFormat().aosp()
endWithNewline()
}
kotlin {
target '**/src/**/*.kt'
ktlint('0.35.0').userData(['indent_size': '4', 'continuation_indent_size': '8'])
licenseHeaderFile rootProject.file('spotless.license')
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}

View file

@ -1,4 +0,0 @@
/*
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/

View file

@ -1,15 +0,0 @@
/*
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
groovyGradle {
target '**/*.gradle', '*.gradle'
licenseHeaderFile 'spotless.license', 'import|tasks|apply|plugins|include|buildscript|ext|android'
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}