mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2025-09-07 16:09:38 +02:00
treewide: Reformat with latest ktlint
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
parent
b2d352e3ea
commit
be0d89958a
|
@ -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
|
package com.zeapo.pwdstore
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
@ -11,6 +15,10 @@ import androidx.test.filters.LargeTest
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
import androidx.test.rule.ActivityTestRule
|
import androidx.test.rule.ActivityTestRule
|
||||||
import com.zeapo.pwdstore.crypto.PgpActivity
|
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_extra_show
|
||||||
import kotlinx.android.synthetic.main.decrypt_layout.crypto_password_category_decrypt
|
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_file
|
||||||
|
@ -23,11 +31,6 @@ import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
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)
|
@RunWith(AndroidJUnit4::class)
|
||||||
@LargeTest
|
@LargeTest
|
||||||
|
@ -121,7 +124,7 @@ class DecryptTest {
|
||||||
SystemClock.sleep(4000)
|
SystemClock.sleep(4000)
|
||||||
|
|
||||||
// The clipboard should be cleared!!
|
// 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)
|
assertEquals("", clipboard.primaryClip.getItemAt(i).text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,8 +164,4 @@ class DecryptTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
package com.zeapo.pwdstore
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
@ -15,13 +19,12 @@ import androidx.test.filters.LargeTest
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
import androidx.test.rule.ActivityTestRule
|
import androidx.test.rule.ActivityTestRule
|
||||||
import com.zeapo.pwdstore.crypto.PgpActivity
|
import com.zeapo.pwdstore.crypto.PgpActivity
|
||||||
|
import java.io.File
|
||||||
import org.apache.commons.io.FileUtils
|
import org.apache.commons.io.FileUtils
|
||||||
import org.apache.commons.io.IOUtils
|
import org.apache.commons.io.IOUtils
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
|
|
||||||
@RunWith(AndroidJUnit4::class)
|
@RunWith(AndroidJUnit4::class)
|
||||||
@LargeTest
|
@LargeTest
|
||||||
|
@ -80,6 +83,3 @@ class EncryptTest {
|
||||||
assert(File("$path/$name.gpg").exists())
|
assert(File("$path/$name.gpg").exists())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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;
|
package com.zeapo.pwdstore;
|
||||||
|
|
||||||
import com.zeapo.pwdstore.utils.Otp;
|
import com.zeapo.pwdstore.utils.Otp;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
public class OtpTest extends TestCase {
|
public class OtpTest extends TestCase {
|
||||||
|
|
|
@ -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;
|
package com.zeapo.pwdstore;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
@ -27,9 +31,14 @@ public class PasswordEntryTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetUsername() {
|
public void testGetUsername() {
|
||||||
assertEquals("username", new PasswordEntry("secret\nextra\nlogin: username\ncontent\n").getUsername());
|
assertEquals(
|
||||||
assertEquals("username", new PasswordEntry("\nextra\nusername: username\ncontent\n").getUsername());
|
"username",
|
||||||
assertEquals("username", new PasswordEntry("\nUSERNaMe: username\ncontent\n").getUsername());
|
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());
|
assertEquals("username", new PasswordEntry("\nLOGiN:username").getUsername());
|
||||||
assertNull(new PasswordEntry("secret\nextra\ncontent\n").getUsername());
|
assertNull(new PasswordEntry("secret\nextra\ncontent\n").getUsername());
|
||||||
}
|
}
|
||||||
|
@ -55,7 +64,9 @@ public class PasswordEntryTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testTotpUriInContent() {
|
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());
|
assertTrue(entry.hasTotp());
|
||||||
assertEquals("JBSWY3DPEHPK3PXP", entry.getTotpSecret());
|
assertEquals("JBSWY3DPEHPK3PXP", entry.getTotpSecret());
|
||||||
}
|
}
|
||||||
|
@ -68,16 +79,19 @@ public class PasswordEntryTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHotpUriInPassword() {
|
public void testHotpUriInPassword() {
|
||||||
PasswordEntry entry = new PasswordEntry("otpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25");
|
PasswordEntry entry =
|
||||||
assertTrue(entry.hasHotp());
|
new PasswordEntry("otpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25");
|
||||||
assertEquals("JBSWY3DPEHPK3PXP", entry.getHotpSecret());
|
|
||||||
assertEquals(new Long(25 ), entry.getHotpCounter());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testHotpUriInContent() {
|
|
||||||
PasswordEntry entry = new PasswordEntry("secret\nusername: test\notpauth://hotp/test?secret=JBSWY3DPEHPK3PXP&counter=25");
|
|
||||||
assertTrue(entry.hasHotp());
|
assertTrue(entry.hasHotp());
|
||||||
assertEquals("JBSWY3DPEHPK3PXP", entry.getHotpSecret());
|
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");
|
||||||
|
assertTrue(entry.hasHotp());
|
||||||
|
assertEquals("JBSWY3DPEHPK3PXP", entry.getHotpSecret());
|
||||||
|
assertEquals(new Long(25), entry.getHotpCounter());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
package com.zeapo.pwdstore
|
package com.zeapo.pwdstore
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
import java.io.UnsupportedEncodingException
|
import java.io.UnsupportedEncodingException
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,6 @@ import com.zeapo.pwdstore.git.GitActivity
|
||||||
import com.zeapo.pwdstore.utils.PasswordRepository
|
import com.zeapo.pwdstore.utils.PasswordRepository
|
||||||
import com.zeapo.pwdstore.utils.auth.AuthenticationResult
|
import com.zeapo.pwdstore.utils.auth.AuthenticationResult
|
||||||
import com.zeapo.pwdstore.utils.auth.Authenticator
|
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.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
|
@ -44,6 +42,8 @@ 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 org.apache.commons.io.FileUtils
|
||||||
|
import org.openintents.openpgp.util.OpenPgpUtils
|
||||||
|
|
||||||
typealias ClickListener = Preference.OnPreferenceClickListener
|
typealias ClickListener = Preference.OnPreferenceClickListener
|
||||||
typealias ChangeListener = Preference.OnPreferenceChangeListener
|
typealias ChangeListener = Preference.OnPreferenceChangeListener
|
||||||
|
|
|
@ -14,9 +14,9 @@ import android.util.Log
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.zeapo.pwdstore.PasswordStore
|
import com.zeapo.pwdstore.PasswordStore
|
||||||
import com.zeapo.pwdstore.utils.splitLines
|
import com.zeapo.pwdstore.utils.splitLines
|
||||||
import org.eclipse.jgit.util.StringUtils
|
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
import java.util.Arrays
|
import java.util.Arrays
|
||||||
|
import org.eclipse.jgit.util.StringUtils
|
||||||
|
|
||||||
// blank activity started by service for calling startIntentSenderForResult
|
// blank activity started by service for calling startIntentSenderForResult
|
||||||
class AutofillActivity : AppCompatActivity() {
|
class AutofillActivity : AppCompatActivity() {
|
||||||
|
|
|
@ -30,11 +30,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 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.ByteArrayOutputStream
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
@ -44,6 +39,11 @@ import java.net.MalformedURLException
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
import java.util.Locale
|
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() {
|
class AutofillService : AccessibilityService() {
|
||||||
private var serviceConnection: OpenPgpServiceConnection? = null
|
private var serviceConnection: OpenPgpServiceConnection? = null
|
||||||
|
|
|
@ -40,6 +40,11 @@ import com.zeapo.pwdstore.PasswordGeneratorDialogFragment
|
||||||
import com.zeapo.pwdstore.R
|
import com.zeapo.pwdstore.R
|
||||||
import com.zeapo.pwdstore.UserPreference
|
import com.zeapo.pwdstore.UserPreference
|
||||||
import com.zeapo.pwdstore.utils.Otp
|
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.decrypt_layout.*
|
||||||
import kotlinx.android.synthetic.main.encrypt_layout.crypto_extra_edit
|
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_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_ERROR
|
||||||
import org.openintents.openpgp.util.OpenPgpApi.RESULT_INTENT
|
import org.openintents.openpgp.util.OpenPgpApi.RESULT_INTENT
|
||||||
import org.openintents.openpgp.util.OpenPgpServiceConnection
|
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 {
|
class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
|
||||||
private val clipboard: ClipboardManager by lazy {
|
private val clipboard: ClipboardManager by lazy {
|
||||||
|
|
|
@ -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>>
|
||||||
|
|
|
@ -7,9 +7,9 @@ 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.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
|
||||||
|
|
|
@ -27,11 +27,11 @@ import com.zeapo.pwdstore.R
|
||||||
import com.zeapo.pwdstore.UserPreference
|
import com.zeapo.pwdstore.UserPreference
|
||||||
import com.zeapo.pwdstore.git.config.SshApiSessionFactory
|
import com.zeapo.pwdstore.git.config.SshApiSessionFactory
|
||||||
import com.zeapo.pwdstore.utils.PasswordRepository
|
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.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
import org.apache.commons.io.FileUtils
|
||||||
|
import org.eclipse.jgit.lib.Constants
|
||||||
|
|
||||||
open class GitActivity : AppCompatActivity() {
|
open class GitActivity : AppCompatActivity() {
|
||||||
private lateinit var context: Context
|
private lateinit var context: Context
|
||||||
|
|
|
@ -24,11 +24,11 @@ import com.zeapo.pwdstore.git.config.GitConfigSessionFactory
|
||||||
import com.zeapo.pwdstore.git.config.SshApiSessionFactory
|
import com.zeapo.pwdstore.git.config.SshApiSessionFactory
|
||||||
import com.zeapo.pwdstore.git.config.SshConfigSessionFactory
|
import com.zeapo.pwdstore.git.config.SshConfigSessionFactory
|
||||||
import com.zeapo.pwdstore.utils.PasswordRepository
|
import com.zeapo.pwdstore.utils.PasswordRepository
|
||||||
|
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
|
||||||
|
|
|
@ -7,9 +7,9 @@ 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.PullCommand
|
import org.eclipse.jgit.api.PullCommand
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new git operation
|
* Creates a new git operation
|
||||||
|
|
|
@ -7,9 +7,9 @@ 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.PushCommand
|
import org.eclipse.jgit.api.PushCommand
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new git operation
|
* Creates a new git operation
|
||||||
|
|
|
@ -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.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
|
||||||
|
|
|
@ -7,13 +7,13 @@ 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.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
|
||||||
|
|
|
@ -6,7 +6,6 @@ package com.zeapo.pwdstore.pwgen
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import com.zeapo.pwdstore.R
|
import com.zeapo.pwdstore.R
|
||||||
|
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
|
|
||||||
object PasswordGenerator {
|
object PasswordGenerator {
|
||||||
|
|
|
@ -5,10 +5,8 @@
|
||||||
package com.zeapo.pwdstore.ui.adapters
|
package com.zeapo.pwdstore.ui.adapters
|
||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
|
||||||
import com.zeapo.pwdstore.SelectFolderFragment
|
import com.zeapo.pwdstore.SelectFolderFragment
|
||||||
import com.zeapo.pwdstore.utils.PasswordItem
|
import com.zeapo.pwdstore.utils.PasswordItem
|
||||||
|
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
|
|
||||||
class FolderRecyclerAdapter(
|
class FolderRecyclerAdapter(
|
||||||
|
|
|
@ -8,12 +8,10 @@ import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.appcompat.view.ActionMode
|
import androidx.appcompat.view.ActionMode
|
||||||
|
|
||||||
import com.zeapo.pwdstore.PasswordFragment
|
import com.zeapo.pwdstore.PasswordFragment
|
||||||
import com.zeapo.pwdstore.PasswordStore
|
import com.zeapo.pwdstore.PasswordStore
|
||||||
import com.zeapo.pwdstore.R
|
import com.zeapo.pwdstore.R
|
||||||
import com.zeapo.pwdstore.utils.PasswordItem
|
import com.zeapo.pwdstore.utils.PasswordItem
|
||||||
|
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
import java.util.TreeSet
|
import java.util.TreeSet
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@ package com.zeapo.pwdstore.utils
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
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
|
||||||
|
@ -14,9 +17,6 @@ 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() {
|
||||||
|
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<size android:height="1dp" />
|
<size android:height="1dp" />
|
||||||
<solid android:color="?attr/colorPrimaryDark" />
|
<solid android:color="?attr/colorPrimaryDark" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
</selector>
|
</selector>
|
||||||
</item>
|
</item>
|
||||||
<item android:drawable="?attr/selectableItemBackground" />
|
<item android:drawable="?attr/selectableItemBackground" />
|
||||||
</layer-list>
|
</layer-list>
|
||||||
|
|
|
@ -21,4 +21,4 @@
|
||||||
android:top="8dp" />
|
android:top="8dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
|
|
|
@ -58,4 +58,4 @@
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
@ -33,4 +33,4 @@
|
||||||
android:layout_margin="@dimen/fab_compat_margin"
|
android:layout_margin="@dimen/fab_compat_margin"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentEnd="true"/>
|
android:layout_alignParentEnd="true"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -34,4 +34,4 @@
|
||||||
android:textColor="?android:attr/textColor" />
|
android:textColor="?android:attr/textColor" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -84,4 +84,4 @@
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -80,4 +80,4 @@
|
||||||
|
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -25,4 +25,4 @@
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
@ -70,4 +70,4 @@
|
||||||
android:text="@string/ssh_keygen_generate" />
|
android:text="@string/ssh_keygen_generate" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
@ -29,4 +29,4 @@
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/sshkey_passphrase" />
|
app:layout_constraintTop_toBottomOf="@+id/sshkey_passphrase" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
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"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
pwstore:actionViewClass="androidx.appcompat.widget.SearchView"
|
pwstore:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||||
pwstore:showAsAction="ifRoom|collapseActionView"/>
|
pwstore:showAsAction="ifRoom|collapseActionView"/>
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -22,4 +22,3 @@
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
|
|
|
@ -28,4 +28,3 @@
|
||||||
android:title="@string/action_settings"
|
android:title="@string/action_settings"
|
||||||
android:orderInCategory="100"/>
|
android:orderInCategory="100"/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
pwstore:showAsAction="ifRoom"
|
pwstore:showAsAction="ifRoom"
|
||||||
android:id="@+id/crypto_select"
|
android:id="@+id/crypto_select"
|
||||||
/>
|
/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
|
|
@ -148,4 +148,4 @@
|
||||||
<string name="send_plaintext_password_to">Odeslat heslo jako plaintext za použití…</string>
|
<string name="send_plaintext_password_to">Odeslat heslo jako plaintext za použití…</string>
|
||||||
<string name="show_password">Pokaż hasło</string>
|
<string name="show_password">Pokaż hasło</string>
|
||||||
<string name="get_last_changed_failed">Failed to get last changed date</string>
|
<string name="get_last_changed_failed">Failed to get last changed date</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="fab_compat_margin">16dp</dimen>
|
<dimen name="fab_compat_margin">16dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -19,4 +19,4 @@
|
||||||
<item>FILE_FIRST</item>
|
<item>FILE_FIRST</item>
|
||||||
<item>INDEPENDENT</item>
|
<item>INDEPENDENT</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
<declare-styleable name="Multiselected">
|
<declare-styleable name="Multiselected">
|
||||||
<attr name="state_multiselected" format="boolean"/>
|
<attr name="state_multiselected" format="boolean"/>
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
android:accessibilityFeedbackType="feedbackGeneric"
|
android:accessibilityFeedbackType="feedbackGeneric"
|
||||||
android:notificationTimeout="100"
|
android:notificationTimeout="100"
|
||||||
android:canRetrieveWindowContent="true"
|
android:canRetrieveWindowContent="true"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue