recent 1.0.x changes into trunk

This commit is contained in:
Thialfihar 2010-06-17 13:08:28 +00:00
parent 720e5371e0
commit 865c998abd
4 changed files with 12 additions and 9 deletions

View File

@ -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"

View File

@ -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);
}
}

View File

@ -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();

View File

@ -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