mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-26 00:48:51 -05:00
Merge branch 'master' of https://github.com/da-kid/open-keychain into da-kid-master
Conflicts: OpenKeychain/src/test/resources/extern/OpenPGP-Haskell
This commit is contained in:
commit
b332aacabb
@ -68,6 +68,7 @@ public final class Constants {
|
|||||||
public static final String FORCE_V3_SIGNATURES = "forceV3Signatures";
|
public static final String FORCE_V3_SIGNATURES = "forceV3Signatures";
|
||||||
public static final String KEY_SERVERS = "keyServers";
|
public static final String KEY_SERVERS = "keyServers";
|
||||||
public static final String KEY_SERVERS_DEFAULT_VERSION = "keyServersDefaultVersion";
|
public static final String KEY_SERVERS_DEFAULT_VERSION = "keyServersDefaultVersion";
|
||||||
|
public static final String CONCEAL_PGP_APPLICATION = "concealPgpApplication";
|
||||||
public static final String FIRST_TIME = "firstTime";
|
public static final String FIRST_TIME = "firstTime";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,4 +197,14 @@ public class Preferences {
|
|||||||
.commit();
|
.commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setConcealPgpApplication(boolean conceal) {
|
||||||
|
SharedPreferences.Editor editor = mSharedPreferences.edit();
|
||||||
|
editor.putBoolean(Constants.Pref.CONCEAL_PGP_APPLICATION, conceal);
|
||||||
|
editor.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getConcealPgpApplication() {
|
||||||
|
return mSharedPreferences.getBoolean(Constants.Pref.CONCEAL_PGP_APPLICATION, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
|
|||||||
|
|
||||||
import org.sufficientlysecure.keychain.Constants;
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
|
import org.sufficientlysecure.keychain.helper.Preferences;
|
||||||
import org.sufficientlysecure.keychain.util.Log;
|
import org.sufficientlysecure.keychain.util.Log;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -60,8 +61,12 @@ public class PgpHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getFullVersion(Context context) {
|
public static String getFullVersion(Context context) {
|
||||||
|
if(Preferences.getPreferences(context).getConcealPgpApplication()){
|
||||||
|
return "";
|
||||||
|
} else {
|
||||||
return "OpenKeychain v" + getVersion(context);
|
return "OpenKeychain v" + getVersion(context);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// public static final class content {
|
// public static final class content {
|
||||||
// public static final int unknown = 0;
|
// public static final int unknown = 0;
|
||||||
|
@ -121,6 +121,9 @@ public class PreferencesActivity extends PreferenceActivity {
|
|||||||
initializeForceV3Signatures(
|
initializeForceV3Signatures(
|
||||||
(CheckBoxPreference) findPreference(Constants.Pref.FORCE_V3_SIGNATURES));
|
(CheckBoxPreference) findPreference(Constants.Pref.FORCE_V3_SIGNATURES));
|
||||||
|
|
||||||
|
initializeConcealPgpApplication(
|
||||||
|
(CheckBoxPreference) findPreference(Constants.Pref.CONCEAL_PGP_APPLICATION));
|
||||||
|
|
||||||
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
|
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
|
||||||
// Load the legacy preferences headers
|
// Load the legacy preferences headers
|
||||||
addPreferencesFromResource(R.xml.preference_headers_legacy);
|
addPreferencesFromResource(R.xml.preference_headers_legacy);
|
||||||
@ -264,6 +267,9 @@ public class PreferencesActivity extends PreferenceActivity {
|
|||||||
|
|
||||||
initializeForceV3Signatures(
|
initializeForceV3Signatures(
|
||||||
(CheckBoxPreference) findPreference(Constants.Pref.FORCE_V3_SIGNATURES));
|
(CheckBoxPreference) findPreference(Constants.Pref.FORCE_V3_SIGNATURES));
|
||||||
|
|
||||||
|
initializeConcealPgpApplication(
|
||||||
|
(CheckBoxPreference) findPreference(Constants.Pref.CONCEAL_PGP_APPLICATION));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -396,4 +402,15 @@ public class PreferencesActivity extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void initializeConcealPgpApplication(final CheckBoxPreference mConcealPgpApplication) {
|
||||||
|
mConcealPgpApplication.setChecked(sPreferences.getConcealPgpApplication());
|
||||||
|
mConcealPgpApplication.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||||
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
mConcealPgpApplication.setChecked((Boolean) newValue);
|
||||||
|
sPreferences.setConcealPgpApplication((Boolean) newValue);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,8 @@
|
|||||||
<string name="label_passphrase_again">Again</string>
|
<string name="label_passphrase_again">Again</string>
|
||||||
<string name="label_algorithm">Algorithm</string>
|
<string name="label_algorithm">Algorithm</string>
|
||||||
<string name="label_ascii_armor">ASCII Armor</string>
|
<string name="label_ascii_armor">ASCII Armor</string>
|
||||||
|
<string name="label_conceal_pgp_application">Let others know that you\'re using OpenKeychain</string>
|
||||||
|
<string name="label_conceal_pgp_application_summary">Writes \'OpenKeychain v2.7\' to OpenPGP signatures, ciphertext, and exported keys</string>
|
||||||
<string name="label_select_public_keys">Recipients</string>
|
<string name="label_select_public_keys">Recipients</string>
|
||||||
<string name="label_delete_after_encryption">Delete After Encryption</string>
|
<string name="label_delete_after_encryption">Delete After Encryption</string>
|
||||||
<string name="label_delete_after_decryption">Delete After Decryption</string>
|
<string name="label_delete_after_decryption">Delete After Decryption</string>
|
||||||
|
@ -38,11 +38,17 @@
|
|||||||
android:key="defaultAsciiArmor"
|
android:key="defaultAsciiArmor"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:title="@string/label_ascii_armor" />
|
android:title="@string/label_ascii_armor" />
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="concealPgpApplication"
|
||||||
|
android:persistent="false"
|
||||||
|
android:title="@string/label_conceal_pgp_application"
|
||||||
|
android:summary="@string/label_conceal_pgp_application_summary" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/section_advanced" >
|
<PreferenceCategory android:title="@string/section_advanced" >
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="forceV3Signatures"
|
android:key="forceV3Signatures"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:title="@string/label_force_v3_signature" />
|
android:title="@string/label_force_v3_signature"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
Loading…
Reference in New Issue
Block a user