From 3a66c1c25aff1dadf4779c2df0fac04f3a9f3c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Fri, 6 Sep 2013 13:48:27 +0200 Subject: Testing encrypt by service --- .../keychain/demo/CryptoProviderDemoActivity.java | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java') 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 -- cgit v1.2.3