aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain/src
diff options
context:
space:
mode:
authorMiroojin Bakshi <gaglu231094@gmail.com>2014-03-07 21:16:58 +0530
committerMiroojin Bakshi <gaglu231094@gmail.com>2014-03-07 21:16:58 +0530
commit2e2a9bc967399b6adc353b1b34d3c7ed981e68f4 (patch)
tree2ea195c985befba1d461496cc311f3043cc88828 /OpenPGP-Keychain/src
parent59067f9f8b0a12f875ba928b30f8f35fc284356c (diff)
downloadopen-keychain-2e2a9bc967399b6adc353b1b34d3c7ed981e68f4.tar.gz
open-keychain-2e2a9bc967399b6adc353b1b34d3c7ed981e68f4.tar.bz2
open-keychain-2e2a9bc967399b6adc353b1b34d3c7ed981e68f4.zip
Add option for sharing encrypted file.
Diffstat (limited to 'OpenPGP-Keychain/src')
-rw-r--r--OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java11
-rw-r--r--OpenPGP-Keychain/src/main/res/layout/encrypt_activity.xml13
-rw-r--r--OpenPGP-Keychain/src/main/res/values/strings.xml2
3 files changed, 26 insertions, 0 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java
index faac9b157..88a29cee9 100644
--- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java
+++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java
@@ -108,6 +108,7 @@ public class EncryptActivity extends DrawerActivity {
private EditText mFilename = null;
private CheckBox mDeleteAfter = null;
+ private CheckBox mShareAfter = null;
private BootstrapButton mBrowse = null;
private String mInputFilename = null;
@@ -650,6 +651,15 @@ public class EncryptActivity extends DrawerActivity {
.newInstance(mInputFilename);
deleteFileDialog.show(getSupportFragmentManager(), "deleteDialog");
}
+
+ if (mShareAfter.isChecked()) {
+ // Share encrypted file
+ Intent sendFileIntent = new Intent(Intent.ACTION_SEND);
+ sendFileIntent.setType("*/*");
+ sendFileIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(mOutputFilename));
+ startActivity(Intent.createChooser(sendFileIntent,
+ getString(R.string.title_send_file)));
+ }
break;
default:
@@ -809,6 +819,7 @@ public class EncryptActivity extends DrawerActivity {
}
mDeleteAfter = (CheckBox) findViewById(R.id.deleteAfterEncryption);
+ mShareAfter = (CheckBox) findViewById(R.id.shareAfterEncryption);
mAsciiArmor = (CheckBox) findViewById(R.id.asciiArmour);
mAsciiArmor.setChecked(Preferences.getPreferences(this).getDefaultAsciiArmour());
diff --git a/OpenPGP-Keychain/src/main/res/layout/encrypt_activity.xml b/OpenPGP-Keychain/src/main/res/layout/encrypt_activity.xml
index 27e29eddb..419a8f2ad 100644
--- a/OpenPGP-Keychain/src/main/res/layout/encrypt_activity.xml
+++ b/OpenPGP-Keychain/src/main/res/layout/encrypt_activity.xml
@@ -291,6 +291,19 @@
android:orientation="horizontal">
<CheckBox
+ android:id="@+id/shareAfterEncryption"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/label_share_after_encryption" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <CheckBox
android:id="@+id/asciiArmour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/OpenPGP-Keychain/src/main/res/values/strings.xml b/OpenPGP-Keychain/src/main/res/values/strings.xml
index fef83c936..d5123b79c 100644
--- a/OpenPGP-Keychain/src/main/res/values/strings.xml
+++ b/OpenPGP-Keychain/src/main/res/values/strings.xml
@@ -17,6 +17,7 @@
<string name="title_change_passphrase">Change Passphrase</string>
<string name="title_set_passphrase">Set Passphrase</string>
<string name="title_send_email">"Send Mail…"</string>
+ <string name="title_send_file">"Send File…"</string>
<string name="title_encrypt_to_file">Encrypt To File</string>
<string name="title_decrypt_to_file">Decrypt To File</string>
<string name="title_import_keys">Import Keys</string>
@@ -110,6 +111,7 @@
<string name="label_select_public_keys">Recipients</string>
<string name="label_delete_after_encryption">Delete After Encryption</string>
<string name="label_delete_after_decryption">Delete After Decryption</string>
+ <string name="label_share_after_encryption">Share After Encryption</string>
<string name="label_encryption_algorithm">Encryption Algorithm</string>
<string name="label_hash_algorithm">Hash Algorithm</string>
<string name="label_asymmetric">Public Key</string>