diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2019-11-06 19:42:39 +0530 |
---|---|---|
committer | Harsh Shandilya <msfjarvis@gmail.com> | 2019-11-06 19:42:39 +0530 |
commit | be0d89958ad0ee18d3bba79db8d21666148d52ce (patch) | |
tree | f53e0181ec6ee8eb91994cd01623aec2464afd79 /app/src/main/java | |
parent | b2d352e3ea671e84cc4f356a49786d1d3b2eaef6 (diff) |
treewide: Reformat with latest ktlint
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app/src/main/java')
17 files changed, 25 insertions, 31 deletions
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<GitCommand<out Any>> 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() { |