aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenPGP-Keychain-API/example-app/src/main/AndroidManifest.xml10
-rw-r--r--OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/AidlDemoActivity2.java168
-rw-r--r--OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/BaseActivity.java13
-rw-r--r--OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java2
-rw-r--r--OpenPGP-Keychain-API/example-app/src/main/res/layout/aidl_demo2.xml40
-rw-r--r--OpenPGP-Keychain-API/example-app/src/main/res/layout/intent.xml (renamed from OpenPGP-Keychain-API/example-app/src/main/res/layout/intent_demo.xml)0
-rw-r--r--OpenPGP-Keychain-API/example-app/src/main/res/layout/openpgp_provider.xml (renamed from OpenPGP-Keychain-API/example-app/src/main/res/layout/crypto_provider_demo.xml)0
-rw-r--r--OpenPGP-Keychain-API/example-app/src/main/res/xml/base_preference.xml5
-rw-r--r--Resources/old extended service/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl (renamed from OpenPGP-Keychain-API/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl)0
-rw-r--r--Resources/old extended service/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl (renamed from OpenPGP-Keychain-API/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl)0
-rw-r--r--Resources/old extended service/src/main/java/ExtendedApiService.java (renamed from OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/ExtendedApiService.java)0
-rw-r--r--libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl24
-rw-r--r--libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl48
13 files changed, 4 insertions, 306 deletions
diff --git a/OpenPGP-Keychain-API/example-app/src/main/AndroidManifest.xml b/OpenPGP-Keychain-API/example-app/src/main/AndroidManifest.xml
index 39a990f72..3658283ba 100644
--- a/OpenPGP-Keychain-API/example-app/src/main/AndroidManifest.xml
+++ b/OpenPGP-Keychain-API/example-app/src/main/AndroidManifest.xml
@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.sufficientlysecure.keychain.demo"
android:versionCode="2"
- android:versionName="1.1" >
+ android:versionName="1.1">
<uses-sdk
android:minSdkVersion="9"
@@ -11,10 +11,10 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
- android:label="OpenPGP Keychain API Demo" >
+ android:label="OpenPGP Keychain API Demo">
<activity
android:name=".BaseActivity"
- android:label="OpenPGP Keychain API Demo" >
+ android:label="OpenPGP Keychain API Demo">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -25,10 +25,6 @@
android:name=".OpenPgpProviderActivity"
android:label="OpenPGP Provider"
android:windowSoftInputMode="stateHidden" />
- <activity
- android:name=".AidlDemoActivity2"
- android:label="Aidl Demo (ACCESS_KEYS permission)"
- android:windowSoftInputMode="stateHidden" />
</application>
</manifest> \ No newline at end of file
diff --git a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/AidlDemoActivity2.java b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/AidlDemoActivity2.java
deleted file mode 100644
index b6e211955..000000000
--- a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/AidlDemoActivity2.java
+++ /dev/null
@@ -1,168 +0,0 @@
-///*
-// * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de>
-// *
-// * Licensed under the Apache License, Version 2.0 (the "License");
-// * you may not use this file except in compliance with the License.
-// * You may obtain a copy of the License at
-// *
-// * http://www.apache.org/licenses/LICENSE-2.0
-// *
-// * Unless required by applicable law or agreed to in writing, software
-// * distributed under the License is distributed on an "AS IS" BASIS,
-// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// * See the License for the specific language governing permissions and
-// * limitations under the License.
-// */
-//
-//package org.sufficientlysecure.keychain.demo;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//import org.sufficientlysecure.keychain.demo.R;
-//import org.sufficientlysecure.keychain.integration.KeychainData;
-//import org.sufficientlysecure.keychain.integration.KeychainIntentHelper;
-//import org.sufficientlysecure.keychain.service.IKeychainKeyService;
-//import org.sufficientlysecure.keychain.service.handler.IKeychainGetKeyringsHandler;
-//
-//import android.annotation.SuppressLint;
-//import android.app.Activity;
-//import android.app.AlertDialog;
-//import android.content.ComponentName;
-//import android.content.Context;
-//import android.content.Intent;
-//import android.content.ServiceConnection;
-//import android.os.Bundle;
-//import android.os.IBinder;
-//import android.os.RemoteException;
-//import android.util.Base64;
-//import android.view.View;
-//import android.widget.TextView;
-//
-//public class AidlDemoActivity2 extends Activity {
-// Activity mActivity;
-//
-// TextView mKeyringsTextView;
-//
-// KeychainIntentHelper mKeychainIntentHelper;
-// KeychainData mKeychainData;
-//
-// byte[] keysBytes;
-// ArrayList<String> keysStrings;
-//
-// private IKeychainKeyService service = null;
-// private ServiceConnection svcConn = new ServiceConnection() {
-// public void onServiceConnected(ComponentName className, IBinder binder) {
-// service = IKeychainKeyService.Stub.asInterface(binder);
-// }
-//
-// public void onServiceDisconnected(ComponentName className) {
-// service = null;
-// }
-// };
-//
-// @Override
-// public void onCreate(Bundle icicle) {
-// super.onCreate(icicle);
-// setContentView(R.layout.aidl_demo2);
-//
-// mActivity = this;
-//
-// mKeyringsTextView = (TextView) findViewById(R.id.aidl_demo_keyrings);
-//
-// mKeychainIntentHelper = new KeychainIntentHelper(mActivity);
-// mKeychainData = new KeychainData();
-//
-// bindService(new Intent(IKeychainKeyService.class.getName()), svcConn,
-// Context.BIND_AUTO_CREATE);
-// }
-//
-// public void getKeyringsStringsOnClick(View view) {
-// try {
-// service.getPublicKeyRings(mKeychainData.getPublicKeys(), true, getKeyringsHandler);
-// } catch (RemoteException e) {
-// exceptionImplementation(-1, e.toString());
-// }
-// }
-//
-// public void getKeyringsBytesOnClick(View view) {
-// try {
-// service.getPublicKeyRings(mKeychainData.getPublicKeys(), false, getKeyringsHandler);
-// } catch (RemoteException e) {
-// exceptionImplementation(-1, e.toString());
-// }
-// }
-//
-// @SuppressLint("NewApi")
-// private void updateView() {
-// if (keysBytes != null) {
-// mKeyringsTextView.setText(Base64.encodeToString(keysBytes, Base64.DEFAULT));
-// } else if (keysStrings != null) {
-// mKeyringsTextView.setText("");
-// for (String output : keysStrings) {
-// mKeyringsTextView.append(output);
-// }
-// }
-// }
-//
-// @Override
-// public void onDestroy() {
-// super.onDestroy();
-//
-// unbindService(svcConn);
-// }
-//
-// private void exceptionImplementation(int exceptionId, String error) {
-// AlertDialog.Builder builder = new AlertDialog.Builder(this);
-// builder.setTitle("Exception!").setMessage(error).setPositiveButton("OK", null).show();
-// }
-//
-// private final IKeychainGetKeyringsHandler.Stub getKeyringsHandler = new IKeychainGetKeyringsHandler.Stub() {
-//
-// @Override
-// public void onException(final int exceptionId, final String message) throws RemoteException {
-// runOnUiThread(new Runnable() {
-// public void run() {
-// exceptionImplementation(exceptionId, message);
-// }
-// });
-// }
-//
-// @Override
-// public void onSuccess(final byte[] outputBytes, final List<String> outputStrings)
-// throws RemoteException {
-// runOnUiThread(new Runnable() {
-// public void run() {
-// if (outputBytes != null) {
-// keysBytes = outputBytes;
-// keysStrings = null;
-// } else if (outputStrings != null) {
-// keysBytes = null;
-// keysStrings = (ArrayList<String>) outputStrings;
-// }
-// updateView();
-// }
-// });
-//
-// }
-//
-// };
-//
-// public void selectEncryptionKeysOnClick(View view) {
-// mKeychainIntentHelper.selectPublicKeys("user@example.com");
-// }
-//
-// @Override
-// protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-// // this updates the mKeychainData object to the result of the methods
-// boolean result = mKeychainIntentHelper.onActivityResult(requestCode, resultCode, data,
-// mKeychainData);
-// if (result) {
-// updateView();
-// }
-//
-// // continue with other activity results
-// super.onActivityResult(requestCode, resultCode, data);
-// }
-//
-//}
diff --git a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/BaseActivity.java b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/BaseActivity.java
index 5b286f208..7e8818b5b 100644
--- a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/BaseActivity.java
+++ b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/BaseActivity.java
@@ -32,8 +32,6 @@ public class BaseActivity extends PreferenceActivity {
private Preference mIntentDemo;
private Preference mContentProviderDemo;
private Preference mCryptoProvider;
- private Preference mAidlDemo;
- private Preference mAidlDemo2;
/**
* Called when the activity is first created.
@@ -51,8 +49,6 @@ public class BaseActivity extends PreferenceActivity {
mIntentDemo = (Preference) findPreference("intent_demo");
mContentProviderDemo = (Preference) findPreference("content_provider_demo");
mCryptoProvider = (Preference) findPreference("openpgp_provider_demo");
- mAidlDemo = (Preference) findPreference("aidl_demo");
- mAidlDemo2 = (Preference) findPreference("aidl_demo2");
mIntentDemo.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
@@ -73,15 +69,6 @@ public class BaseActivity extends PreferenceActivity {
}
});
- // mAidlDemo2.setOnPreferenceClickListener(new OnPreferenceClickListener() {
- // @Override
- // public boolean onPreferenceClick(Preference preference) {
- // startActivity(new Intent(mActivity, AidlDemoActivity2.class));
- //
- // return false;
- // }
- // });
-
}
}
diff --git a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java
index a7060abb2..6dc3bd562 100644
--- a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java
+++ b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java
@@ -69,7 +69,7 @@ public class OpenPgpProviderActivity extends Activity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
- setContentView(R.layout.crypto_provider_demo);
+ setContentView(R.layout.openpgp_provider);
mActivity = this;
diff --git a/OpenPGP-Keychain-API/example-app/src/main/res/layout/aidl_demo2.xml b/OpenPGP-Keychain-API/example-app/src/main/res/layout/aidl_demo2.xml
deleted file mode 100644
index 73abd9b5c..000000000
--- a/OpenPGP-Keychain-API/example-app/src/main/res/layout/aidl_demo2.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/aidl_demo_select_encryption_key"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:onClick="selectEncryptionKeysOnClick"
- android:text="Select encryption key(s)" />
-
- <EditText
- android:id="@+id/aidl_demo_keyrings"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="keyrings output"
- android:textAppearance="@android:style/TextAppearance.Small" />
-
- <Button
- android:id="@+id/aidl_demo_get_keyrings_strings"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:onClick="getKeyringsStringsOnClick"
- android:text="getKeyrings as Strings" />
-
- <Button
- android:id="@+id/aidl_demo_get_keyrings_bytes"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:onClick="getKeyringsBytesOnClick"
- android:text="getKeyringsBytes" />
- </LinearLayout>
-
-</ScrollView> \ No newline at end of file
diff --git a/OpenPGP-Keychain-API/example-app/src/main/res/layout/intent_demo.xml b/OpenPGP-Keychain-API/example-app/src/main/res/layout/intent.xml
index ed416a05f..ed416a05f 100644
--- a/OpenPGP-Keychain-API/example-app/src/main/res/layout/intent_demo.xml
+++ b/OpenPGP-Keychain-API/example-app/src/main/res/layout/intent.xml
diff --git a/OpenPGP-Keychain-API/example-app/src/main/res/layout/crypto_provider_demo.xml b/OpenPGP-Keychain-API/example-app/src/main/res/layout/openpgp_provider.xml
index 6647a417b..6647a417b 100644
--- a/OpenPGP-Keychain-API/example-app/src/main/res/layout/crypto_provider_demo.xml
+++ b/OpenPGP-Keychain-API/example-app/src/main/res/layout/openpgp_provider.xml
diff --git a/OpenPGP-Keychain-API/example-app/src/main/res/xml/base_preference.xml b/OpenPGP-Keychain-API/example-app/src/main/res/xml/base_preference.xml
index 86b461742..cb76dc10f 100644
--- a/OpenPGP-Keychain-API/example-app/src/main/res/xml/base_preference.xml
+++ b/OpenPGP-Keychain-API/example-app/src/main/res/xml/base_preference.xml
@@ -6,11 +6,6 @@
android:key="intent_demo"
android:title="Intent Demo" />
</PreferenceCategory>
- <!-- <PreferenceCategory android:title="AIDL" > -->
- <!-- <Preference -->
- <!-- android:key="aidl_demo2" -->
- <!-- android:title="AIDL Demo (ACCESS_KEYS permission)" /> -->
- <!-- </PreferenceCategory> -->
<PreferenceCategory android:title="OpenPGP Provider" >
<org.openintents.openpgp.util.OpenPgpListPreference
android:key="openpgp_provider_list"
diff --git a/OpenPGP-Keychain-API/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl b/Resources/old extended service/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl
index f69f66fd7..f69f66fd7 100644
--- a/OpenPGP-Keychain-API/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl
+++ b/Resources/old extended service/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl
diff --git a/OpenPGP-Keychain-API/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl b/Resources/old extended service/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl
index 669bd31b5..669bd31b5 100644
--- a/OpenPGP-Keychain-API/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl
+++ b/Resources/old extended service/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/ExtendedApiService.java b/Resources/old extended service/src/main/java/ExtendedApiService.java
index 427e6bb8f..427e6bb8f 100644
--- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/ExtendedApiService.java
+++ b/Resources/old extended service/src/main/java/ExtendedApiService.java
diff --git a/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl b/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl
deleted file mode 100644
index f69f66fd7..000000000
--- a/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2013 Dominik Schürmann <dominik@dominikschuermann.de>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.sufficientlysecure.keychain.service.remote;
-
-interface IExtendedApiCallback {
-
- oneway void onSuccess(in byte[] outputBytes);
-
- oneway void onError(in String error);
-} \ No newline at end of file
diff --git a/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl b/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl
deleted file mode 100644
index 669bd31b5..000000000
--- a/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2013 Dominik Schürmann <dominik@dominikschuermann.de>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.sufficientlysecure.keychain.service.remote;
-
-import org.sufficientlysecure.keychain.service.remote.IExtendedApiCallback;
-
-/**
- * All methods are oneway, which means they are asynchronous and non-blocking.
- * Results are returned to the callback, which has to be implemented on client side.
- */
-interface IExtendedApiService {
-
- /**
- * Symmetric Encrypt
- *
- * @param inputBytes
- * Byte array you want to encrypt
- * @param passphrase
- * symmetric passhprase
- * @param callback
- * Callback where to return results
- */
- oneway void encrypt(in byte[] inputBytes, in String passphrase, in IExtendedApiCallback callback);
-
- /**
- * Generates self signed X509 certificate signed by OpenPGP private key (from app settings)
- *
- * @param subjAltNameURI
- * @param callback
- * Callback where to return results
- */
- oneway void selfSignedX509Cert(in String subjAltNameURI, in IExtendedApiCallback callback);
-
-} \ No newline at end of file