api: add a comment explaining use of wrapperBundle

This commit is contained in:
Vincent Breitmoser
2016-05-04 11:45:56 +02:00
parent 4c063ebe46
commit 6b7a0597af

View File

@@ -454,6 +454,7 @@ public class OpenPgpService extends Service {
new Passphrase(data.getCharArrayExtra(OpenPgpApi.EXTRA_PASSPHRASE));
}
if (data.hasExtra(OpenPgpApi.EXTRA_DECRYPTION_RESULT_WRAPPER)) {
// this is wrapped in a Bundle to avoid ClassLoader problems
Bundle wrapperBundle = data.getBundleExtra(OpenPgpApi.EXTRA_DECRYPTION_RESULT_WRAPPER);
wrapperBundle.setClassLoader(getClassLoader());
OpenPgpDecryptionResult decryptionResult = wrapperBundle.getParcelable(OpenPgpApi.EXTRA_DECRYPTION_RESULT);