mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
recent 1.0.x changes into trunk
This commit is contained in:
parent
720e5371e0
commit
865c998abd
@ -17,7 +17,7 @@
|
|||||||
<manifest
|
<manifest
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.thialfihar.android.apg"
|
package="org.thialfihar.android.apg"
|
||||||
android:versionCode="17" android:versionName="1.0.3">
|
android:versionCode="18" android:versionName="1.0.4">
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:icon="@drawable/icon"
|
android:icon="@drawable/icon"
|
||||||
|
@ -152,7 +152,6 @@ public class Apg {
|
|||||||
Uri.parse("content://" + AUTHORITY + "/key_rings/public/emails/");
|
Uri.parse("content://" + AUTHORITY + "/key_rings/public/emails/");
|
||||||
|
|
||||||
private static String VERSION = null;
|
private static String VERSION = null;
|
||||||
private static String FULL_VERSION = null;
|
|
||||||
|
|
||||||
private static final int[] PREFERRED_SYMMETRIC_ALGORITHMS =
|
private static final int[] PREFERRED_SYMMETRIC_ALGORITHMS =
|
||||||
new int[] {
|
new int[] {
|
||||||
@ -1131,7 +1130,7 @@ public class Apg {
|
|||||||
OutputStream encryptOut = null;
|
OutputStream encryptOut = null;
|
||||||
if (armored) {
|
if (armored) {
|
||||||
armorOut = new ArmoredOutputStream(outStream);
|
armorOut = new ArmoredOutputStream(outStream);
|
||||||
armorOut.setHeader("Version", FULL_VERSION);
|
armorOut.setHeader("Version", getFullVersion(context));
|
||||||
out = armorOut;
|
out = armorOut;
|
||||||
} else {
|
} else {
|
||||||
out = outStream;
|
out = outStream;
|
||||||
@ -1251,7 +1250,7 @@ public class Apg {
|
|||||||
Security.addProvider(new BouncyCastleProvider());
|
Security.addProvider(new BouncyCastleProvider());
|
||||||
|
|
||||||
ArmoredOutputStream armorOut = new ArmoredOutputStream(outStream);
|
ArmoredOutputStream armorOut = new ArmoredOutputStream(outStream);
|
||||||
armorOut.setHeader("Version", FULL_VERSION);
|
armorOut.setHeader("Version", getFullVersion(context));
|
||||||
|
|
||||||
PGPSecretKey signingKey = null;
|
PGPSecretKey signingKey = null;
|
||||||
PGPSecretKeyRing signingKeyRing = null;
|
PGPSecretKeyRing signingKeyRing = null;
|
||||||
@ -1853,9 +1852,6 @@ public class Apg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getFullVersion(Context context) {
|
public static String getFullVersion(Context context) {
|
||||||
if (FULL_VERSION == null) {
|
return "APG v" + getVersion(context);
|
||||||
FULL_VERSION = "APG v" + getVersion(context);
|
|
||||||
}
|
|
||||||
return FULL_VERSION;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -586,7 +586,7 @@ public class EncryptActivity extends BaseActivity {
|
|||||||
} else {
|
} else {
|
||||||
String message = mMessage.getText().toString();
|
String message = mMessage.getText().toString();
|
||||||
|
|
||||||
if (signOnly && mReturnResult) {
|
if (signOnly && !mReturnResult) {
|
||||||
// fix the message a bit, trailing spaces and newlines break stuff,
|
// fix the message a bit, trailing spaces and newlines break stuff,
|
||||||
// because GMail sends as HTML and such things fuck up the signature,
|
// because GMail sends as HTML and such things fuck up the signature,
|
||||||
// TODO: things like "<" and ">" also 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");
|
message = message.replaceFirst("\n*$", "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (signOnly && !message.endsWith("\n")) {
|
||||||
|
message += '\n';
|
||||||
|
}
|
||||||
|
|
||||||
byte[] byteData = Strings.toUTF8ByteArray(message);
|
byte[] byteData = Strings.toUTF8ByteArray(message);
|
||||||
in = new ByteArrayInputStream(byteData);
|
in = new ByteArrayInputStream(byteData);
|
||||||
out = new ByteArrayOutputStream();
|
out = new ByteArrayOutputStream();
|
||||||
|
@ -510,6 +510,7 @@ public class KeyListActivity extends BaseActivity {
|
|||||||
qb.appendWhere(")");
|
qb.appendWhere(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
String query = qb.buildQuery(new String[] {
|
String query = qb.buildQuery(new String[] {
|
||||||
KeyRings.TABLE_NAME + "." + KeyRings._ID, // 0
|
KeyRings.TABLE_NAME + "." + KeyRings._ID, // 0
|
||||||
KeyRings.TABLE_NAME + "." + KeyRings.MASTER_KEY_ID, // 1
|
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) },
|
Id.database.type_public : Id.database.type_secret) },
|
||||||
null, null, UserIds.TABLE_NAME + "." + UserIds.USER_ID + " ASC", null);
|
null, null, UserIds.TABLE_NAME + "." + UserIds.USER_ID + " ASC", null);
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> 1.0.x
|
||||||
mCursor = qb.query(mDatabase,
|
mCursor = qb.query(mDatabase,
|
||||||
new String[] {
|
new String[] {
|
||||||
KeyRings.TABLE_NAME + "." + KeyRings._ID, // 0
|
KeyRings.TABLE_NAME + "." + KeyRings._ID, // 0
|
||||||
|
Loading…
Reference in New Issue
Block a user