summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2019-06-07 12:09:03 +0530
committerHarsh Shandilya <msfjarvis@gmail.com>2019-07-28 12:07:36 +0530
commit5fe2c74cc7b98a68cc765c2397346aee7b8c6097 (patch)
treed330d26cd02b42a1649ce54c31ff846305734b06
parent699007c53b3b29bf798088254abd107ce6bae549 (diff)
Target Android Q
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
-rw-r--r--app/build.gradle.kts4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/UserPreference.kt8
2 files changed, 4 insertions, 8 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index a19c5c61..3bf71c6f 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -9,12 +9,12 @@ plugins {
}
android {
- compileSdkVersion(28)
+ compileSdkVersion(29)
defaultConfig {
applicationId = "com.zeapo.pwdstore"
minSdkVersion(21)
- targetSdkVersion(28)
+ targetSdkVersion(29)
versionCode = 10302
versionName = "1.3.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
index 97462fd2..7f35db6f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
@@ -193,12 +193,8 @@ class UserPreference : AppCompatActivity() {
findPreference("clear_after_copy").isEnabled = sharedPreferences.getString("general_show_time", "45")?.toInt() != 0
findPreference("clear_clipboard_20x").isEnabled = sharedPreferences.getString("general_show_time", "45")?.toInt() != 0
val keyPref = findPreference("openpgp_key_id_pref")
- val selectedKeys: Array<String> = ArrayList<String>(
- sharedPreferences.getStringSet(
- "openpgp_key_ids_set",
- HashSet<String>()
- )
- ).toTypedArray()
+ val selectedKeys = (sharedPreferences.getStringSet("openpgp_key_ids_set", null)
+ ?: HashSet<String>()).toTypedArray()
if (selectedKeys.isEmpty()) {
keyPref.summary = this.resources.getString(R.string.pref_no_key_selected)
} else {