From 581e6edb4cdfb6274f21e532ba60a610a3ce1fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Fri, 14 Feb 2014 17:19:54 +0100 Subject: cleanup --- .../example-app/src/main/AndroidManifest.xml | 10 +- .../keychain/demo/AidlDemoActivity2.java | 168 --------------------- .../keychain/demo/BaseActivity.java | 13 -- .../keychain/demo/OpenPgpProviderActivity.java | 2 +- .../example-app/src/main/res/layout/aidl_demo2.xml | 40 ----- .../src/main/res/layout/crypto_provider_demo.xml | 79 ---------- .../example-app/src/main/res/layout/intent.xml | 93 ++++++++++++ .../src/main/res/layout/intent_demo.xml | 93 ------------ .../src/main/res/layout/openpgp_provider.xml | 79 ++++++++++ .../src/main/res/xml/base_preference.xml | 5 - .../service/remote/IExtendedApiCallback.aidl | 24 --- .../service/remote/IExtendedApiService.aidl | 48 ------ .../service/remote/ExtendedApiService.java | 122 --------------- .../service/remote/IExtendedApiCallback.aidl | 24 +++ .../service/remote/IExtendedApiService.aidl | 48 ++++++ .../src/main/java/ExtendedApiService.java | 122 +++++++++++++++ .../service/remote/IExtendedApiCallback.aidl | 24 --- .../service/remote/IExtendedApiService.aidl | 48 ------ 18 files changed, 370 insertions(+), 672 deletions(-) delete mode 100644 OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/AidlDemoActivity2.java delete mode 100644 OpenPGP-Keychain-API/example-app/src/main/res/layout/aidl_demo2.xml delete mode 100644 OpenPGP-Keychain-API/example-app/src/main/res/layout/crypto_provider_demo.xml create mode 100644 OpenPGP-Keychain-API/example-app/src/main/res/layout/intent.xml delete mode 100644 OpenPGP-Keychain-API/example-app/src/main/res/layout/intent_demo.xml create mode 100644 OpenPGP-Keychain-API/example-app/src/main/res/layout/openpgp_provider.xml delete mode 100644 OpenPGP-Keychain-API/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl delete mode 100644 OpenPGP-Keychain-API/libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl delete mode 100644 OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/ExtendedApiService.java create mode 100644 Resources/old extended service/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl create mode 100644 Resources/old extended service/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl create mode 100644 Resources/old extended service/src/main/java/ExtendedApiService.java delete mode 100644 libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiCallback.aidl delete mode 100644 libraries/keychain-api-library/src/main/aidl/org/sufficientlysecure/keychain/service/remote/IExtendedApiService.aidl 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 @@ + android:versionName="1.1"> + android:label="OpenPGP Keychain API Demo"> + android:label="OpenPGP Keychain API Demo"> @@ -25,10 +25,6 @@ android:name=".OpenPgpProviderActivity" android:label="OpenPGP Provider" android:windowSoftInputMode="stateHidden" /> - \ 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 -// * -// * 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 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 outputStrings) -// throws RemoteException { -// runOnUiThread(new Runnable() { -// public void run() { -// if (outputBytes != null) { -// keysBytes = outputBytes; -// keysStrings = null; -// } else if (outputStrings != null) { -// keysBytes = null; -// keysStrings = (ArrayList) 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 @@ - - - - - -