diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-06 13:48:27 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-06 13:48:27 +0200 |
commit | 3a66c1c25aff1dadf4779c2df0fac04f3a9f3c0a (patch) | |
tree | 3d313a803ee9f8b376888f80202a7387560aaf9e /OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain | |
parent | fabb0389fc6c4b8a92d2681c8dc647b66e687b5b (diff) | |
download | open-keychain-3a66c1c25aff1dadf4779c2df0fac04f3a9f3c0a.tar.gz open-keychain-3a66c1c25aff1dadf4779c2df0fac04f3a9f3c0a.tar.bz2 open-keychain-3a66c1c25aff1dadf4779c2df0fac04f3a9f3c0a.zip |
Testing encrypt by service
Diffstat (limited to 'OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain')
-rw-r--r-- | OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java b/OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java index 7dcd7c66f..319820d7c 100644 --- a/OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java +++ b/OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java @@ -73,11 +73,18 @@ public class CryptoProviderDemoActivity extends Activity { final ICryptoCallback.Stub encryptCallback = new ICryptoCallback.Stub() { @Override - public void onSuccess(byte[] outputBytes, CryptoSignatureResult signatureResult) + public void onSuccess(final byte[] outputBytes, CryptoSignatureResult signatureResult) throws RemoteException { Log.d(Constants.TAG, "onEncryptSignSuccess"); - // TODO + runOnUiThread(new Runnable() { + + @Override + public void run() { + mCiphertext.setText(new String(outputBytes)); + + } + }); } @Override @@ -91,11 +98,19 @@ public class CryptoProviderDemoActivity extends Activity { final ICryptoCallback.Stub decryptCallback = new ICryptoCallback.Stub() { @Override - public void onSuccess(byte[] outputBytes, CryptoSignatureResult signatureResult) + public void onSuccess(final byte[] outputBytes, final CryptoSignatureResult signatureResult) throws RemoteException { Log.d(Constants.TAG, "onDecryptVerifySuccess"); - mMessage.setText(new String(outputBytes)); + runOnUiThread(new Runnable() { + + @Override + public void run() { + mMessage.setText(new String(outputBytes) + "\n\n" + signatureResult.toString()); + + } + }); + } @Override |