diff options
author | Dominik <dominik@dominikschuermann.de> | 2012-11-15 17:54:25 +0100 |
---|---|---|
committer | Dominik <dominik@dominikschuermann.de> | 2012-11-15 17:54:25 +0100 |
commit | e247fe18af14010719d26f3823a2f2984bc1f9be (patch) | |
tree | cdb249c6a505aaf657089c654180f1c17f49359f /org_apg_integration_demo | |
parent | d61e00ae6c2bf071860195cbff48be81c59c47d9 (diff) | |
download | open-keychain-e247fe18af14010719d26f3823a2f2984bc1f9be.tar.gz open-keychain-e247fe18af14010719d26f3823a2f2984bc1f9be.tar.bz2 open-keychain-e247fe18af14010719d26f3823a2f2984bc1f9be.zip |
removed deprecated code, reworked service blob provider
Diffstat (limited to 'org_apg_integration_demo')
-rw-r--r-- | org_apg_integration_demo/res/layout/intent_demo.xml | 23 | ||||
-rw-r--r-- | org_apg_integration_demo/src/org/thialfihar/android/apg/demo/IntentDemoActivity.java | 13 |
2 files changed, 33 insertions, 3 deletions
diff --git a/org_apg_integration_demo/res/layout/intent_demo.xml b/org_apg_integration_demo/res/layout/intent_demo.xml index 3809f6ca4..a765343f9 100644 --- a/org_apg_integration_demo/res/layout/intent_demo.xml +++ b/org_apg_integration_demo/res/layout/intent_demo.xml @@ -7,7 +7,14 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > - + + <Button + android:id="@+id/Button02" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:onClick="encryptOnClick" + android:text="Encrypt" /> + <Button android:id="@+id/intent_demo_create_new_key" android:layout_width="match_parent" @@ -51,12 +58,26 @@ android:text="Encrypt" /> <Button + android:id="@+id/intent_demo_encrypt" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:onClick="encryptAndReturnOnClick" + android:text="Encrypt and return result" /> + + <Button android:id="@+id/intent_demo_decrypt" android:layout_width="match_parent" android:layout_height="wrap_content" android:onClick="decryptOnClick" android:text="Decrypt" /> + <Button + android:id="@+id/intent_demo_decrypt" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:onClick="decryptAndReturnOnClick" + android:text="Decrypt and return result" /> + <TextView android:layout_width="match_parent" android:layout_height="match_parent" diff --git a/org_apg_integration_demo/src/org/thialfihar/android/apg/demo/IntentDemoActivity.java b/org_apg_integration_demo/src/org/thialfihar/android/apg/demo/IntentDemoActivity.java index 00f055fc1..b707e48a8 100644 --- a/org_apg_integration_demo/src/org/thialfihar/android/apg/demo/IntentDemoActivity.java +++ b/org_apg_integration_demo/src/org/thialfihar/android/apg/demo/IntentDemoActivity.java @@ -70,11 +70,20 @@ public class IntentDemoActivity extends Activity { public void encryptOnClick(View view) { mApgIntentHelper.encrypt(mMessageTextView.getText().toString(), - mApgData.getEncryptionKeys(), mApgData.getSignatureKeyId()); + mApgData.getEncryptionKeys(), mApgData.getSignatureKeyId(), false); + } + + public void encryptAndReturnOnClick(View view) { + mApgIntentHelper.encrypt(mMessageTextView.getText().toString(), + mApgData.getEncryptionKeys(), mApgData.getSignatureKeyId(), true); } public void decryptOnClick(View view) { - mApgIntentHelper.decrypt(mCiphertextTextView.getText().toString()); + mApgIntentHelper.decrypt(mCiphertextTextView.getText().toString(), false); + } + + public void decryptAndReturnOnClick(View view) { + mApgIntentHelper.decrypt(mCiphertextTextView.getText().toString(), true); } @Override |