mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-24 07:58:50 -05:00
First work on decrypt
This commit is contained in:
parent
d5c9021b89
commit
179f48a4de
@ -195,6 +195,167 @@
|
||||
<data android:mimeType="message/*" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.DecryptOldActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||
android:label="@string/title_decrypt"
|
||||
android:windowSoftInputMode="stateHidden">
|
||||
|
||||
<!-- VIEW with mimeType application/octet-stream, application/pgp and text/pgp -->
|
||||
<intent-filter android:label="@string/intent_send_decrypt">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<!-- mime type as defined in http://tools.ietf.org/html/rfc3156 -->
|
||||
<data android:mimeType="application/octet-stream" />
|
||||
<data android:mimeType="application/pgp" />
|
||||
<data android:mimeType="text/pgp" />
|
||||
</intent-filter>
|
||||
<!-- Keychain's own Actions -->
|
||||
<!-- DECRYPT with text as extra -->
|
||||
<intent-filter>
|
||||
<action android:name="org.sufficientlysecure.keychain.action.DECRYPT" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<!-- DECRYPT with data Uri -->
|
||||
<intent-filter>
|
||||
<action android:name="org.sufficientlysecure.keychain.action.DECRYPT" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="file" />
|
||||
<data android:scheme="content" />
|
||||
</intent-filter>
|
||||
<!-- Android's Send Action -->
|
||||
<intent-filter android:label="@string/intent_send_decrypt">
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="*/*" />
|
||||
</intent-filter>
|
||||
<!-- Linking "Decrypt" to file types -->
|
||||
<intent-filter android:label="@string/intent_decrypt_file">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:host="*" />
|
||||
<data android:scheme="file" />
|
||||
<data android:scheme="content" />
|
||||
|
||||
<!-- GnuPG ASCII data, mostly keys, but sometimes signatures and encrypted data -->
|
||||
<data android:pathPattern=".*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<!-- GnuPG binary encrypted/signed data, binary format -->
|
||||
<data android:pathPattern=".*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<!-- PGP encrypted data, binary format -->
|
||||
<data android:pathPattern=".*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<!-- on some mail clients, PGP attachments show up as *.bin -->
|
||||
<data android:pathPattern=".*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
</intent-filter>
|
||||
<!--
|
||||
Some apps will only respect these file associations
|
||||
if the mimeType is not set, and other apps will only respect them if mimeType is set
|
||||
to */*. Therefore we have two whole copies of the same thing, besides setting the mimeType.
|
||||
-->
|
||||
<intent-filter android:label="@string/intent_decrypt_file">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:host="*" />
|
||||
<data android:scheme="file" />
|
||||
<data android:scheme="content" />
|
||||
|
||||
<data android:mimeType="*/*" />
|
||||
|
||||
<!-- GnuPG ASCII data, mostly keys, but sometimes signatures and encrypted data -->
|
||||
<data android:pathPattern=".*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.asc" />
|
||||
<!-- GnuPG binary encrypted/signed data, binary format -->
|
||||
<data android:pathPattern=".*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
|
||||
<!-- PGP encrypted data, binary format -->
|
||||
<data android:pathPattern=".*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.pgp" />
|
||||
<!-- on some mail clients, PGP attachments show up as *.bin -->
|
||||
<data android:pathPattern=".*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.bin" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.DecryptActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||
|
@ -22,6 +22,7 @@ import android.os.Environment;
|
||||
import org.spongycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.sufficientlysecure.keychain.remote.ui.AppsListActivity;
|
||||
import org.sufficientlysecure.keychain.ui.DecryptActivity;
|
||||
import org.sufficientlysecure.keychain.ui.DecryptOldActivity;
|
||||
import org.sufficientlysecure.keychain.ui.EncryptFileActivity;
|
||||
import org.sufficientlysecure.keychain.ui.EncryptTextActivity;
|
||||
import org.sufficientlysecure.keychain.ui.KeyListActivity;
|
||||
|
@ -33,7 +33,7 @@ import org.sufficientlysecure.keychain.util.Log;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
public class DecryptActivity extends DrawerActivity {
|
||||
public class DecryptOldActivity extends DrawerActivity {
|
||||
|
||||
/* Intents */
|
||||
public static final String ACTION_DECRYPT = OpenKeychainIntents.DECRYPT;
|
||||
@ -64,7 +64,7 @@ public class DecryptActivity extends DrawerActivity {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.decrypt_activity);
|
||||
setContentView(R.layout.decrypt_activity_old);
|
||||
|
||||
initView();
|
||||
|
@ -13,6 +13,6 @@
|
||||
|
||||
</android.support.v4.widget.FixedDrawerLayout>
|
||||
|
||||
<include layout="@layout/decrypt_content" />
|
||||
<include layout="@layout/decrypt_content_old" />
|
||||
|
||||
</FrameLayout>
|
@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/decrypt_content"/>
|
||||
<include layout="@layout/decrypt_content_old"/>
|
||||
|
||||
<include layout="@layout/drawer_list" />
|
||||
|
Loading…
Reference in New Issue
Block a user