diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | app/build.gradle | 10 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/UserPreference.java | 32 | ||||
-rw-r--r-- | build.gradle | 4 |
4 files changed, 24 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml index 36f0fc3c..1fe79179 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ android: components: - platform-tools - tools - - build-tools-23.0.2 + - build-tools-23.0.3 - android-23 - extra-google-m2repository - extra-android-m2repository 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")) diff --git a/build.gradle b/build.gradle index b8224c36..32e51710 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:2.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -22,7 +22,7 @@ allprojects { ext { compileSdkVersion = 23 - buildToolsVersion = "23.0.2" + buildToolsVersion = "23.0.3" } subprojects { subproject -> afterEvaluate{ |