From be0d89958ad0ee18d3bba79db8d21666148d52ce Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 6 Nov 2019 19:42:39 +0530 Subject: treewide: Reformat with latest ktlint Signed-off-by: Harsh Shandilya --- .../java/com/zeapo/pwdstore/DecryptTest.kt | 19 +++++++------- .../java/com/zeapo/pwdstore/EncryptTest.kt | 10 ++++---- .../java/com/zeapo/pwdstore/OtpTest.java | 5 +++- .../java/com/zeapo/pwdstore/PasswordEntryTest.java | 30 ++++++++++++++++------ .../main/java/com/zeapo/pwdstore/PasswordEntry.kt | 1 - .../main/java/com/zeapo/pwdstore/UserPreference.kt | 4 +-- .../zeapo/pwdstore/autofill/AutofillActivity.kt | 2 +- .../com/zeapo/pwdstore/autofill/AutofillService.kt | 10 ++++---- .../java/com/zeapo/pwdstore/crypto/PgpActivity.kt | 10 ++++---- .../com/zeapo/pwdstore/git/BreakOutOfDetached.kt | 2 +- .../java/com/zeapo/pwdstore/git/CloneOperation.kt | 2 +- .../java/com/zeapo/pwdstore/git/GitActivity.kt | 4 +-- .../java/com/zeapo/pwdstore/git/GitOperation.kt | 2 +- .../java/com/zeapo/pwdstore/git/PullOperation.kt | 2 +- .../java/com/zeapo/pwdstore/git/PushOperation.kt | 2 +- .../zeapo/pwdstore/git/ResetToRemoteOperation.kt | 2 +- .../java/com/zeapo/pwdstore/git/SyncOperation.kt | 2 +- .../com/zeapo/pwdstore/pwgen/PasswordGenerator.kt | 1 - .../pwdstore/ui/adapters/FolderRecyclerAdapter.kt | 2 -- .../ui/adapters/PasswordRecyclerAdapter.kt | 2 -- .../com/zeapo/pwdstore/utils/PasswordRepository.kt | 6 ++--- app/src/main/res/drawable/divider.xml | 2 +- .../main/res/drawable/password_row_background.xml | 2 +- app/src/main/res/drawable/red_rectangle.xml | 2 +- app/src/main/res/layout/autofill_instructions.xml | 2 +- app/src/main/res/layout/autofill_recycler_view.xml | 2 +- app/src/main/res/layout/autofill_row_layout.xml | 2 +- app/src/main/res/layout/encrypt_layout.xml | 2 +- app/src/main/res/layout/fragment_autofill.xml | 2 +- app/src/main/res/layout/fragment_show_ssh_key.xml | 2 +- app/src/main/res/layout/fragment_ssh_keygen.xml | 2 +- app/src/main/res/layout/git_passphrase_layout.xml | 2 +- app/src/main/res/layout/otp_confirm_layout.xml | 2 +- app/src/main/res/layout/select_folder_layout.xml | 2 +- app/src/main/res/menu/autofill_preference.xml | 2 +- app/src/main/res/menu/context_pass.xml | 1 - app/src/main/res/menu/main_menu.xml | 1 - .../main/res/menu/pgp_handler_select_folder.xml | 2 +- app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 2 +- .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 2 +- app/src/main/res/values-cs/strings.xml | 2 +- app/src/main/res/values-v21/dimens.xml | 2 +- app/src/main/res/values/arrays.xml | 2 +- app/src/main/res/values/attrs.xml | 2 +- app/src/main/res/xml/autofill_config.xml | 2 +- 45 files changed, 87 insertions(+), 79 deletions(-) (limited to 'app') diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt index 448edc00..290f7a98 100644 --- a/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt +++ b/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright © 2014-2019 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ package com.zeapo.pwdstore import android.annotation.SuppressLint @@ -11,6 +15,10 @@ import androidx.test.filters.LargeTest import androidx.test.platform.app.InstrumentationRegistry import androidx.test.rule.ActivityTestRule import com.zeapo.pwdstore.crypto.PgpActivity +import java.io.File +import java.io.FileOutputStream +import java.io.IOException +import java.nio.charset.StandardCharsets import kotlinx.android.synthetic.main.decrypt_layout.crypto_extra_show import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_category_decrypt import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_file @@ -23,11 +31,6 @@ import org.junit.Assert.assertNotNull import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import java.io.File -import java.io.FileOutputStream -import java.io.IOException -import java.nio.charset.StandardCharsets - @RunWith(AndroidJUnit4::class) @LargeTest @@ -121,7 +124,7 @@ class DecryptTest { SystemClock.sleep(4000) // The clipboard should be cleared!! - for(i in 0..clipboard.primaryClip.itemCount) { + for (i in 0..clipboard.primaryClip.itemCount) { assertEquals("", clipboard.primaryClip.getItemAt(i).text) } @@ -161,8 +164,4 @@ class DecryptTest { } } } - } - - - diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt index 1b164c63..a4bc2c04 100644 --- a/app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt +++ b/app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright © 2014-2019 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ package com.zeapo.pwdstore import android.annotation.SuppressLint @@ -15,13 +19,12 @@ import androidx.test.filters.LargeTest import androidx.test.platform.app.InstrumentationRegistry import androidx.test.rule.ActivityTestRule import com.zeapo.pwdstore.crypto.PgpActivity +import java.io.File import org.apache.commons.io.FileUtils import org.apache.commons.io.IOUtils import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import java.io.File - @RunWith(AndroidJUnit4::class) @LargeTest @@ -80,6 +83,3 @@ class EncryptTest { assert(File("$path/$name.gpg").exists()) } } - - - diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java b/app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java index 2cb04d2e..ec694167 100644 --- a/app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java +++ b/app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java @@ -1,7 +1,10 @@ +/* + * Copyright © 2014-2019 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ package com.zeapo.pwdstore; import com.zeapo.pwdstore.utils.Otp; - import junit.framework.TestCase; public class OtpTest extends TestCase { diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.java b/app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.java index 3763d1ab..7817c074 100644 --- a/app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.java +++ b/app/src/androidTest/java/com/zeapo/pwdstore/PasswordEntryTest.java @@ -1,3 +1,7 @@ +/* + * Copyright © 2014-2019 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ package com.zeapo.pwdstore; import junit.framework.TestCase; @@ -27,9 +31,14 @@ public class PasswordEntryTest extends TestCase { } public void testGetUsername() { - assertEquals("username", new PasswordEntry("secret\nextra\nlogin: username\ncontent\n").getUsername()); - assertEquals("username", new PasswordEntry("\nextra\nusername: username\ncontent\n").getUsername()); - assertEquals("username", new PasswordEntry("\nUSERNaMe: username\ncontent\n").getUsername()); + assertEquals( + "username", + new PasswordEntry("secret\nextra\nlogin: username\ncontent\n").getUsername()); + assertEquals( + "username", + new PasswordEntry("\nextra\nusername: username\ncontent\n").getUsername()); + assertEquals( + "username", new PasswordEntry("\nUSERNaMe: username\ncontent\n").getUsername()); assertEquals("username", new PasswordEntry("\nLOGiN:username").getUsername()); assertNull(new PasswordEntry("secret\nextra\ncontent\n").getUsername()); } @@ -55,7 +64,9 @@ public class PasswordEntryTest extends TestCase { } public void testTotpUriInContent() { - PasswordEntry entry = new PasswordEntry("secret\nusername: test\notpauth://totp/test?secret=JBSWY3DPEHPK3PXP"); + PasswordEntry entry = + new PasswordEntry( + "secret\nusername: test\notpauth://totp/test?secret=JBSWY3DPEHPK3PXP"); assertTrue(entry.hasTotp()); assertEquals("JBSWY3DPEHPK3PXP", entry.getTotpSecret()); } @@ -68,16 +79,19 @@ public class PasswordEntryTest extends TestCase { } public void testHotpUriInPassword() { - PasswordEntry entry = new PasswordEntry("otpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25"); + PasswordEntry entry = + new PasswordEntry("otpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25"); assertTrue(entry.hasHotp()); assertEquals("JBSWY3DPEHPK3PXP", entry.getHotpSecret()); - assertEquals(new Long(25 ), entry.getHotpCounter()); + assertEquals(new Long(25), entry.getHotpCounter()); } public void testHotpUriInContent() { - PasswordEntry entry = new PasswordEntry("secret\nusername: test\notpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25"); + PasswordEntry entry = + new PasswordEntry( + "secret\nusername: test\notpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25"); assertTrue(entry.hasHotp()); assertEquals("JBSWY3DPEHPK3PXP", entry.getHotpSecret()); assertEquals(new Long(25), entry.getHotpCounter()); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt b/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt index 07bdb67c..44f8ffe1 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt @@ -5,7 +5,6 @@ package com.zeapo.pwdstore import android.net.Uri - import java.io.ByteArrayOutputStream import java.io.UnsupportedEncodingException diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt index d770c2aa..e4728123 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt @@ -35,8 +35,6 @@ import com.zeapo.pwdstore.git.GitActivity import com.zeapo.pwdstore.utils.PasswordRepository import com.zeapo.pwdstore.utils.auth.AuthenticationResult import com.zeapo.pwdstore.utils.auth.Authenticator -import org.apache.commons.io.FileUtils -import org.openintents.openpgp.util.OpenPgpUtils import java.io.File import java.io.IOException import java.time.LocalDateTime @@ -44,6 +42,8 @@ import java.time.format.DateTimeFormatter import java.util.Calendar import java.util.HashSet import java.util.TimeZone +import org.apache.commons.io.FileUtils +import org.openintents.openpgp.util.OpenPgpUtils typealias ClickListener = Preference.OnPreferenceClickListener typealias ChangeListener = Preference.OnPreferenceChangeListener diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.kt index f98057ab..d4625a54 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.kt @@ -14,9 +14,9 @@ import android.util.Log import androidx.appcompat.app.AppCompatActivity import com.zeapo.pwdstore.PasswordStore import com.zeapo.pwdstore.utils.splitLines -import org.eclipse.jgit.util.StringUtils import java.util.ArrayList import java.util.Arrays +import org.eclipse.jgit.util.StringUtils // blank activity started by service for calling startIntentSenderForResult class AutofillActivity : AppCompatActivity() { diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt index f3bb76b9..cf81fb9e 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt @@ -30,11 +30,6 @@ import com.zeapo.pwdstore.PasswordEntry import com.zeapo.pwdstore.R import com.zeapo.pwdstore.utils.PasswordRepository import com.zeapo.pwdstore.utils.splitLines -import org.apache.commons.io.FileUtils -import org.openintents.openpgp.IOpenPgpService2 -import org.openintents.openpgp.OpenPgpError -import org.openintents.openpgp.util.OpenPgpApi -import org.openintents.openpgp.util.OpenPgpServiceConnection import java.io.ByteArrayOutputStream import java.io.File import java.io.IOException @@ -44,6 +39,11 @@ import java.net.MalformedURLException import java.net.URL import java.util.ArrayList import java.util.Locale +import org.apache.commons.io.FileUtils +import org.openintents.openpgp.IOpenPgpService2 +import org.openintents.openpgp.OpenPgpError +import org.openintents.openpgp.util.OpenPgpApi +import org.openintents.openpgp.util.OpenPgpServiceConnection class AutofillService : AccessibilityService() { private var serviceConnection: OpenPgpServiceConnection? = null diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt index 7d6eb102..e06d67d0 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt @@ -40,6 +40,11 @@ import com.zeapo.pwdstore.PasswordGeneratorDialogFragment import com.zeapo.pwdstore.R import com.zeapo.pwdstore.UserPreference import com.zeapo.pwdstore.utils.Otp +import java.io.ByteArrayInputStream +import java.io.ByteArrayOutputStream +import java.io.File +import java.nio.charset.Charset +import java.util.Date import kotlinx.android.synthetic.main.decrypt_layout.* import kotlinx.android.synthetic.main.encrypt_layout.crypto_extra_edit import kotlinx.android.synthetic.main.encrypt_layout.crypto_password_category @@ -59,11 +64,6 @@ import org.openintents.openpgp.util.OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQU import org.openintents.openpgp.util.OpenPgpApi.RESULT_ERROR import org.openintents.openpgp.util.OpenPgpApi.RESULT_INTENT import org.openintents.openpgp.util.OpenPgpServiceConnection -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 { private val clipboard: ClipboardManager by lazy { diff --git a/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt b/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt index 3d35a524..edd719e2 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt @@ -7,11 +7,11 @@ package com.zeapo.pwdstore.git import android.app.Activity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.R +import java.io.File import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.GitCommand import org.eclipse.jgit.api.PushCommand import org.eclipse.jgit.api.RebaseCommand -import java.io.File class BreakOutOfDetached(fileDir: File, callingActivity: Activity) : GitOperation(fileDir, callingActivity) { private lateinit var commands: List> diff --git a/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt index cb805abe..b713f6cb 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt @@ -7,9 +7,9 @@ package com.zeapo.pwdstore.git import android.app.Activity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.R +import java.io.File import org.eclipse.jgit.api.CloneCommand import org.eclipse.jgit.api.Git -import java.io.File /** * Creates a new clone operation diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt index 53ed3461..a30afe00 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt @@ -27,11 +27,11 @@ import com.zeapo.pwdstore.R import com.zeapo.pwdstore.UserPreference import com.zeapo.pwdstore.git.config.SshApiSessionFactory import com.zeapo.pwdstore.utils.PasswordRepository -import org.apache.commons.io.FileUtils -import org.eclipse.jgit.lib.Constants import java.io.File import java.io.IOException import java.util.regex.Pattern +import org.apache.commons.io.FileUtils +import org.eclipse.jgit.lib.Constants open class GitActivity : AppCompatActivity() { private lateinit var context: Context diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt index 3b3c6f22..ef73fbb4 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt @@ -24,11 +24,11 @@ import com.zeapo.pwdstore.git.config.GitConfigSessionFactory import com.zeapo.pwdstore.git.config.SshApiSessionFactory import com.zeapo.pwdstore.git.config.SshConfigSessionFactory import com.zeapo.pwdstore.utils.PasswordRepository +import java.io.File import org.eclipse.jgit.api.GitCommand import org.eclipse.jgit.lib.Repository import org.eclipse.jgit.transport.SshSessionFactory import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider -import java.io.File /** * Creates a new git operation diff --git a/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt index aaf53b99..a763eacc 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt @@ -7,9 +7,9 @@ package com.zeapo.pwdstore.git import android.app.Activity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.R +import java.io.File import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.PullCommand -import java.io.File /** * Creates a new git operation diff --git a/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt index 0b3782b5..a48946ce 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt @@ -7,9 +7,9 @@ package com.zeapo.pwdstore.git import android.app.Activity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.R +import java.io.File import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.PushCommand -import java.io.File /** * Creates a new git operation diff --git a/app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt index 53238bb1..69d07473 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt @@ -7,11 +7,11 @@ package com.zeapo.pwdstore.git import android.app.Activity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.R +import java.io.File import org.eclipse.jgit.api.AddCommand import org.eclipse.jgit.api.FetchCommand import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.ResetCommand -import java.io.File /** * Creates a new git operation diff --git a/app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt index 5518be19..795bdeae 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt @@ -7,13 +7,13 @@ package com.zeapo.pwdstore.git import android.app.Activity import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.R +import java.io.File import org.eclipse.jgit.api.AddCommand import org.eclipse.jgit.api.CommitCommand import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.PullCommand import org.eclipse.jgit.api.PushCommand import org.eclipse.jgit.api.StatusCommand -import java.io.File /** * Creates a new git operation diff --git a/app/src/main/java/com/zeapo/pwdstore/pwgen/PasswordGenerator.kt b/app/src/main/java/com/zeapo/pwdstore/pwgen/PasswordGenerator.kt index 1085b1da..6d81f10a 100644 --- a/app/src/main/java/com/zeapo/pwdstore/pwgen/PasswordGenerator.kt +++ b/app/src/main/java/com/zeapo/pwdstore/pwgen/PasswordGenerator.kt @@ -6,7 +6,6 @@ package com.zeapo.pwdstore.pwgen import android.content.Context import com.zeapo.pwdstore.R - import java.util.ArrayList object PasswordGenerator { diff --git a/app/src/main/java/com/zeapo/pwdstore/ui/adapters/FolderRecyclerAdapter.kt b/app/src/main/java/com/zeapo/pwdstore/ui/adapters/FolderRecyclerAdapter.kt index 4bdda154..dd42dddc 100644 --- a/app/src/main/java/com/zeapo/pwdstore/ui/adapters/FolderRecyclerAdapter.kt +++ b/app/src/main/java/com/zeapo/pwdstore/ui/adapters/FolderRecyclerAdapter.kt @@ -5,10 +5,8 @@ package com.zeapo.pwdstore.ui.adapters import android.view.View - import com.zeapo.pwdstore.SelectFolderFragment import com.zeapo.pwdstore.utils.PasswordItem - import java.util.ArrayList class FolderRecyclerAdapter( diff --git a/app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordRecyclerAdapter.kt b/app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordRecyclerAdapter.kt index 445f502d..2deec3d8 100644 --- a/app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordRecyclerAdapter.kt +++ b/app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordRecyclerAdapter.kt @@ -8,12 +8,10 @@ import android.view.Menu import android.view.MenuItem import android.view.View import androidx.appcompat.view.ActionMode - import com.zeapo.pwdstore.PasswordFragment import com.zeapo.pwdstore.PasswordStore import com.zeapo.pwdstore.R import com.zeapo.pwdstore.utils.PasswordItem - import java.util.ArrayList import java.util.TreeSet diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt index 97e506f5..22d9046f 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt @@ -7,6 +7,9 @@ package com.zeapo.pwdstore.utils import android.content.Context import android.content.SharedPreferences 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.eclipse.jgit.api.Git import org.eclipse.jgit.lib.Repository @@ -14,9 +17,6 @@ import org.eclipse.jgit.storage.file.FileRepositoryBuilder import org.eclipse.jgit.transport.RefSpec import org.eclipse.jgit.transport.RemoteConfig import org.eclipse.jgit.transport.URIish -import java.io.File -import java.io.FileFilter -import java.util.Comparator open class PasswordRepository protected constructor() { diff --git a/app/src/main/res/drawable/divider.xml b/app/src/main/res/drawable/divider.xml index 23a88317..463d1746 100644 --- a/app/src/main/res/drawable/divider.xml +++ b/app/src/main/res/drawable/divider.xml @@ -3,4 +3,4 @@ android:shape="rectangle"> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/password_row_background.xml b/app/src/main/res/drawable/password_row_background.xml index 6806b12f..20b8540f 100644 --- a/app/src/main/res/drawable/password_row_background.xml +++ b/app/src/main/res/drawable/password_row_background.xml @@ -9,4 +9,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/red_rectangle.xml b/app/src/main/res/drawable/red_rectangle.xml index 8213a7e3..bec893f2 100644 --- a/app/src/main/res/drawable/red_rectangle.xml +++ b/app/src/main/res/drawable/red_rectangle.xml @@ -21,4 +21,4 @@ android:top="8dp" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/autofill_instructions.xml b/app/src/main/res/layout/autofill_instructions.xml index d75320d3..8ce0a793 100644 --- a/app/src/main/res/layout/autofill_instructions.xml +++ b/app/src/main/res/layout/autofill_instructions.xml @@ -58,4 +58,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/autofill_recycler_view.xml b/app/src/main/res/layout/autofill_recycler_view.xml index 30b72c04..7a987e5f 100644 --- a/app/src/main/res/layout/autofill_recycler_view.xml +++ b/app/src/main/res/layout/autofill_recycler_view.xml @@ -33,4 +33,4 @@ android:layout_margin="@dimen/fab_compat_margin" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true"/> - \ No newline at end of file + diff --git a/app/src/main/res/layout/autofill_row_layout.xml b/app/src/main/res/layout/autofill_row_layout.xml index 12354077..acdeed6b 100644 --- a/app/src/main/res/layout/autofill_row_layout.xml +++ b/app/src/main/res/layout/autofill_row_layout.xml @@ -34,4 +34,4 @@ android:textColor="?android:attr/textColor" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml index 41fa78ee..a54c45b4 100644 --- a/app/src/main/res/layout/encrypt_layout.xml +++ b/app/src/main/res/layout/encrypt_layout.xml @@ -84,4 +84,4 @@ android:layout_height="wrap_content"/> - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_autofill.xml b/app/src/main/res/layout/fragment_autofill.xml index d780e6f6..e1a18696 100644 --- a/app/src/main/res/layout/fragment_autofill.xml +++ b/app/src/main/res/layout/fragment_autofill.xml @@ -80,4 +80,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_show_ssh_key.xml b/app/src/main/res/layout/fragment_show_ssh_key.xml index 78ece084..eff30360 100644 --- a/app/src/main/res/layout/fragment_show_ssh_key.xml +++ b/app/src/main/res/layout/fragment_show_ssh_key.xml @@ -25,4 +25,4 @@ android:textSize="16sp" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_ssh_keygen.xml b/app/src/main/res/layout/fragment_ssh_keygen.xml index adfeb5e0..6b9e1013 100644 --- a/app/src/main/res/layout/fragment_ssh_keygen.xml +++ b/app/src/main/res/layout/fragment_ssh_keygen.xml @@ -70,4 +70,4 @@ android:text="@string/ssh_keygen_generate" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/git_passphrase_layout.xml b/app/src/main/res/layout/git_passphrase_layout.xml index 6fb4ee13..814f4e40 100644 --- a/app/src/main/res/layout/git_passphrase_layout.xml +++ b/app/src/main/res/layout/git_passphrase_layout.xml @@ -29,4 +29,4 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/sshkey_passphrase" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/otp_confirm_layout.xml b/app/src/main/res/layout/otp_confirm_layout.xml index 261875bf..4e6e777a 100644 --- a/app/src/main/res/layout/otp_confirm_layout.xml +++ b/app/src/main/res/layout/otp_confirm_layout.xml @@ -16,4 +16,4 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/select_folder_layout.xml b/app/src/main/res/layout/select_folder_layout.xml index 142093ec..1fd32853 100644 --- a/app/src/main/res/layout/select_folder_layout.xml +++ b/app/src/main/res/layout/select_folder_layout.xml @@ -8,4 +8,4 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"/> - \ No newline at end of file + diff --git a/app/src/main/res/menu/autofill_preference.xml b/app/src/main/res/menu/autofill_preference.xml index 08736bf9..ff184adc 100644 --- a/app/src/main/res/menu/autofill_preference.xml +++ b/app/src/main/res/menu/autofill_preference.xml @@ -9,4 +9,4 @@ pwstore:actionViewClass="androidx.appcompat.widget.SearchView" pwstore:showAsAction="ifRoom|collapseActionView"/> - \ No newline at end of file + diff --git a/app/src/main/res/menu/context_pass.xml b/app/src/main/res/menu/context_pass.xml index cb1e9ee9..d6b8e01b 100644 --- a/app/src/main/res/menu/context_pass.xml +++ b/app/src/main/res/menu/context_pass.xml @@ -22,4 +22,3 @@ app:showAsAction="ifRoom" /> - diff --git a/app/src/main/res/menu/main_menu.xml b/app/src/main/res/menu/main_menu.xml index f099913b..85a2219f 100644 --- a/app/src/main/res/menu/main_menu.xml +++ b/app/src/main/res/menu/main_menu.xml @@ -28,4 +28,3 @@ android:title="@string/action_settings" android:orderInCategory="100"/> - diff --git a/app/src/main/res/menu/pgp_handler_select_folder.xml b/app/src/main/res/menu/pgp_handler_select_folder.xml index c9855ecd..a09c6b56 100644 --- a/app/src/main/res/menu/pgp_handler_select_folder.xml +++ b/app/src/main/res/menu/pgp_handler_select_folder.xml @@ -8,4 +8,4 @@ pwstore:showAsAction="ifRoom" android:id="@+id/crypto_select" /> - \ No newline at end of file + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7353dbd1..5ed0a2df 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 7353dbd1..5ed0a2df 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 04504ee4..40b9e316 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -148,4 +148,4 @@ Odeslat heslo jako plaintext za použití… Pokaż hasło Failed to get last changed date - \ No newline at end of file + diff --git a/app/src/main/res/values-v21/dimens.xml b/app/src/main/res/values-v21/dimens.xml index daaecce2..3a8d4266 100644 --- a/app/src/main/res/values-v21/dimens.xml +++ b/app/src/main/res/values-v21/dimens.xml @@ -1,4 +1,4 @@ 16dp - \ No newline at end of file + diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 77b93647..e3b7a68f 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -19,4 +19,4 @@ FILE_FIRST INDEPENDENT - \ No newline at end of file + diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 1a044c40..aa02723f 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/xml/autofill_config.xml b/app/src/main/res/xml/autofill_config.xml index a9d4cb19..7816ef4f 100644 --- a/app/src/main/res/xml/autofill_config.xml +++ b/app/src/main/res/xml/autofill_config.xml @@ -6,4 +6,4 @@ android:accessibilityFeedbackType="feedbackGeneric" android:notificationTimeout="100" android:canRetrieveWindowContent="true" - /> \ No newline at end of file + /> -- cgit v1.2.3