summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-04-12 21:10:40 +0200
committerGitHub <noreply@github.com>2020-04-13 00:40:40 +0530
commit11c7e369860a7ee2d5b0ca9e42c55dd232ac2f07 (patch)
treef5c4ae0a68c9ab49adc8e3439271143401e96c4e
parent4f20c49abb500c6b74558119675314a6210c4221 (diff)
Raise targetSdk to 29 (#682)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r--app/src/main/AndroidManifest.xml1
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt8
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/sshkeygen/ShowSshKeyFragment.kt2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt4
-rw-r--r--dependencies.gradle4
5 files changed, 10 insertions, 9 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index eb5895d5..03769198 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -23,6 +23,7 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
+ android:requestLegacyExternalStorage="true"
tools:ignore="GoogleAppIndexingWarning">
<activity
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))
}
}
}
diff --git a/dependencies.gradle b/dependencies.gradle
index b1b343c0..d57eeeaa 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -4,8 +4,8 @@
*/
ext.versions = [
minSdk: 23,
- targetSdk: 28,
- compileSdk: 28,
+ targetSdk: 29,
+ compileSdk: 29,
versionCode: 10601,
versionName: '1.7.0-SNAPSHOT',
buildTools: '29.0.3',