summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle10
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/UserPreference.java32
2 files changed, 21 insertions, 21 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 2c437302..17a8e4cd 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -4,7 +4,7 @@ apply plugin: 'eclipse'
android {
compileSdkVersion 23
- buildToolsVersion '23.0.2'
+ buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.zeapo.pwdstore"
minSdkVersion 15
@@ -58,10 +58,10 @@ android {
}
dependencies {
- compile 'com.android.support:appcompat-v7:23.3.0'
- compile 'com.android.support:recyclerview-v7:23.3.0'
- compile 'com.android.support:cardview-v7:23.3.0'
- compile 'com.android.support:design:23.3.0'
+ compile 'com.android.support:appcompat-v7:23.4.0'
+ compile 'com.android.support:recyclerview-v7:23.4.0'
+ compile 'com.android.support:cardview-v7:23.4.0'
+ compile 'com.android.support:design:23.4.0'
compile 'org.sufficientlysecure:openpgp-api:9.0'
compile 'com.nononsenseapps:filepicker:2.4.2'
compile ('org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') {
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java
index 5e91ec49..82132978 100644
--- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java
+++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java
@@ -58,22 +58,7 @@ public class UserPreference extends AppCompatActivity {
addPreferencesFromResource(R.xml.preference);
- Preference keyPref = findPreference("openpgp_key_id_pref");
- Set<String> selectedKeys = sharedPreferences.getStringSet("openpgp_key_ids_set", new HashSet<String>());
- if (selectedKeys.isEmpty()) {
- keyPref.setSummary("No key selected");
- } else {
- keyPref.setSummary(
- Joiner.on(',')
- .join(Iterables.transform(selectedKeys, new Function<String, Object>() {
- @Override
- public Object apply(String input) {
- return OpenPgpUtils.convertKeyIdToHex(Long.valueOf(input));
- }
- }))
- );
- }
- keyPref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
+ findPreference("openpgp_key_id_pref").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Intent intent = new Intent(callingActivity, PgpHandler.class);
@@ -235,6 +220,21 @@ public class UserPreference extends AppCompatActivity {
findPreference("pref_select_external").setSummary(getPreferenceManager().getSharedPreferences().getString("git_external_repo", getString(R.string.no_repo_selected)));
findPreference("ssh_see_key").setEnabled(sharedPreferences.getBoolean("use_generated_key", false));
findPreference("git_delete_repo").setEnabled(!sharedPreferences.getBoolean("git_external", false));
+ Preference keyPref = findPreference("openpgp_key_id_pref");
+ Set<String> selectedKeys = sharedPreferences.getStringSet("openpgp_key_ids_set", new HashSet<String>());
+ if (selectedKeys.isEmpty()) {
+ keyPref.setSummary("No key selected");
+ } else {
+ keyPref.setSummary(
+ Joiner.on(',')
+ .join(Iterables.transform(selectedKeys, new Function<String, Object>() {
+ @Override
+ public Object apply(String input) {
+ return OpenPgpUtils.convertKeyIdToHex(Long.valueOf(input));
+ }
+ }))
+ );
+ }
// see if the autofill service is enabled and check the preference accordingly
((CheckBoxPreference) findPreference("autofill_enable"))