diff options
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rw-r--r-- | src/org/thialfihar/android/apg/Apg.java | 10 | ||||
-rw-r--r-- | src/org/thialfihar/android/apg/EncryptActivity.java | 6 | ||||
-rw-r--r-- | src/org/thialfihar/android/apg/KeyListActivity.java | 3 |
4 files changed, 12 insertions, 9 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 79d57b039..7ca1a3145 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -17,7 +17,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.thialfihar.android.apg" - android:versionCode="17" android:versionName="1.0.3"> + android:versionCode="18" android:versionName="1.0.4"> <application android:icon="@drawable/icon" diff --git a/src/org/thialfihar/android/apg/Apg.java b/src/org/thialfihar/android/apg/Apg.java index 77e64d27a..8ccc3a2c0 100644 --- a/src/org/thialfihar/android/apg/Apg.java +++ b/src/org/thialfihar/android/apg/Apg.java @@ -152,7 +152,6 @@ public class Apg { Uri.parse("content://" + AUTHORITY + "/key_rings/public/emails/");
private static String VERSION = null;
- private static String FULL_VERSION = null;
private static final int[] PREFERRED_SYMMETRIC_ALGORITHMS =
new int[] {
@@ -1131,7 +1130,7 @@ public class Apg { OutputStream encryptOut = null;
if (armored) {
armorOut = new ArmoredOutputStream(outStream);
- armorOut.setHeader("Version", FULL_VERSION);
+ armorOut.setHeader("Version", getFullVersion(context));
out = armorOut;
} else {
out = outStream;
@@ -1251,7 +1250,7 @@ public class Apg { Security.addProvider(new BouncyCastleProvider());
ArmoredOutputStream armorOut = new ArmoredOutputStream(outStream);
- armorOut.setHeader("Version", FULL_VERSION);
+ armorOut.setHeader("Version", getFullVersion(context));
PGPSecretKey signingKey = null;
PGPSecretKeyRing signingKeyRing = null;
@@ -1853,9 +1852,6 @@ public class Apg { }
public static String getFullVersion(Context context) {
- if (FULL_VERSION == null) {
- FULL_VERSION = "APG v" + getVersion(context);
- }
- return FULL_VERSION;
+ return "APG v" + getVersion(context);
}
}
diff --git a/src/org/thialfihar/android/apg/EncryptActivity.java b/src/org/thialfihar/android/apg/EncryptActivity.java index aa3d70f9f..2c095ecbf 100644 --- a/src/org/thialfihar/android/apg/EncryptActivity.java +++ b/src/org/thialfihar/android/apg/EncryptActivity.java @@ -586,7 +586,7 @@ public class EncryptActivity extends BaseActivity { } else { String message = mMessage.getText().toString(); - if (signOnly && mReturnResult) { + if (signOnly && !mReturnResult) { // fix the message a bit, trailing spaces and newlines break stuff, // because GMail sends as HTML and such things fuck up the signature, // TODO: things like "<" and ">" also fuck up the signature @@ -597,6 +597,10 @@ public class EncryptActivity extends BaseActivity { message = message.replaceFirst("\n*$", "\n"); } + if (signOnly && !message.endsWith("\n")) { + message += '\n'; + } + byte[] byteData = Strings.toUTF8ByteArray(message); in = new ByteArrayInputStream(byteData); out = new ByteArrayOutputStream(); diff --git a/src/org/thialfihar/android/apg/KeyListActivity.java b/src/org/thialfihar/android/apg/KeyListActivity.java index 1e531676b..c9880e8fe 100644 --- a/src/org/thialfihar/android/apg/KeyListActivity.java +++ b/src/org/thialfihar/android/apg/KeyListActivity.java @@ -510,6 +510,7 @@ public class KeyListActivity extends BaseActivity { qb.appendWhere(")");
}
+<<<<<<< HEAD String query = qb.buildQuery(new String[] {
KeyRings.TABLE_NAME + "." + KeyRings._ID, // 0
KeyRings.TABLE_NAME + "." + KeyRings.MASTER_KEY_ID, // 1
@@ -520,6 +521,8 @@ public class KeyListActivity extends BaseActivity { Id.database.type_public : Id.database.type_secret) },
null, null, UserIds.TABLE_NAME + "." + UserIds.USER_ID + " ASC", null);
+======= +>>>>>>> 1.0.x mCursor = qb.query(mDatabase,
new String[] {
KeyRings.TABLE_NAME + "." + KeyRings._ID, // 0
|