minor layout fixes, replace non breakable spaces if found in an encrypted armored message, as they break the decryption, the HTML representation of GMail introduces them for empty lines ending in a normal space, also adjusted the PGP_MESSAGE regex to allow for spaces after the -----, which seems to be added by some implementations
This commit is contained in:
@@ -190,6 +190,8 @@ public class DecryptMessageActivity extends Activity
|
||||
Matcher matcher = Apg.PGP_MESSAGE.matcher(data);
|
||||
if (matcher.matches()) {
|
||||
data = matcher.group(1);
|
||||
// replace non breakable spaces
|
||||
data = data.replaceAll("\\xa0", " ");
|
||||
mMessage.setText(data);
|
||||
}
|
||||
}
|
||||
@@ -312,8 +314,9 @@ public class DecryptMessageActivity extends Activity
|
||||
Bundle data = new Bundle();
|
||||
Message msg = new Message();
|
||||
|
||||
ByteArrayInputStream in =
|
||||
new ByteArrayInputStream(mMessage.getText().toString().getBytes());
|
||||
String messageData = mMessage.getText().toString();
|
||||
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(messageData.getBytes());
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user