diff options
author | Fabian Henneke <FabianHenneke@users.noreply.github.com> | 2020-04-12 21:10:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 00:40:40 +0530 |
commit | 11c7e369860a7ee2d5b0ca9e42c55dd232ac2f07 (patch) | |
tree | f5c4ae0a68c9ab49adc8e3439271143401e96c4e /app/src/main/java | |
parent | 4f20c49abb500c6b74558119675314a6210c4221 (diff) |
Raise targetSdk to 29 (#682)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/java')
3 files changed, 7 insertions, 7 deletions
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 1b5da928..cd96e3d1 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt @@ -139,7 +139,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { crypto_password_file.text = name crypto_password_file.setOnLongClickListener { val clip = ClipData.newPlainText("pgp_handler_result_pm", name) - clipboard.primaryClip = clip + clipboard.setPrimaryClip(clip) showSnackbar(this.resources.getString(R.string.clipboard_username_toast_text)) true } @@ -813,7 +813,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { } val clip = ClipData.newPlainText("pgp_handler_result_pm", pass) - clipboard.primaryClip = clip + clipboard.setPrimaryClip(clip) var clearAfter = 45 try { @@ -832,13 +832,13 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { private fun copyUsernameToClipBoard(username: String) { val clip = ClipData.newPlainText("pgp_handler_result_pm", username) - clipboard.primaryClip = clip + clipboard.setPrimaryClip(clip) showSnackbar(resources.getString(R.string.clipboard_username_toast_text)) } private fun copyOtpToClipBoard(code: String) { val clip = ClipData.newPlainText("pgp_handler_result_pm", code) - clipboard.primaryClip = clip + clipboard.setPrimaryClip(clip) showSnackbar(resources.getString(R.string.clipboard_otp_toast_text)) } diff --git a/app/src/main/java/com/zeapo/pwdstore/sshkeygen/ShowSshKeyFragment.kt b/app/src/main/java/com/zeapo/pwdstore/sshkeygen/ShowSshKeyFragment.kt index 7182aac0..e3395d41 100644 --- a/app/src/main/java/com/zeapo/pwdstore/sshkeygen/ShowSshKeyFragment.kt +++ b/app/src/main/java/com/zeapo/pwdstore/sshkeygen/ShowSshKeyFragment.kt @@ -43,7 +43,7 @@ class ShowSshKeyFragment : DialogFragment() { b.setOnClickListener { val clipboard = activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager val clip = ClipData.newPlainText("public key", publicKey.text.toString()) - clipboard.primaryClip = clip + clipboard.setPrimaryClip(clip) } } return ad diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt b/app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt index d173a519..174a1743 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt @@ -15,12 +15,12 @@ object ClipboardUtils { suspend fun clearClipboard(clipboard: ClipboardManager, deepClear: Boolean = false) { Timber.d("Clearing the clipboard") val clip = ClipData.newPlainText("pgp_handler_result_pm", "") - clipboard.primaryClip = clip + clipboard.setPrimaryClip(clip) if (deepClear) { withContext(Dispatchers.IO) { repeat(20) { val count = (it * 500).toString() - clipboard.primaryClip = ClipData.newPlainText(count, count) + clipboard.setPrimaryClip(ClipData.newPlainText(count, count)) } } } |