Rename foir clarification

This commit is contained in:
Dominik Schürmann 2013-06-17 16:05:39 +02:00
parent 41338e115c
commit 918bab3a4e
4 changed files with 14 additions and 14 deletions

View File

@ -478,7 +478,7 @@
<action android:name="org.openintents.crypto.ICryptoService" /> <action android:name="org.openintents.crypto.ICryptoService" />
<!-- Can only be used from OpenPGP Keychain (internal): --> <!-- Can only be used from OpenPGP Keychain (internal): -->
<action android:name="org.sufficientlysecure.keychain.crypto_provider.ICryptoServiceActivity" /> <action android:name="org.sufficientlysecure.keychain.crypto_provider.IServiceActivityCallback" />
</intent-filter> </intent-filter>
<meta-data <meta-data

View File

@ -60,7 +60,7 @@ public class CryptoService extends Service {
// RemoteCallbackList<IInterface> // RemoteCallbackList<IInterface>
public static final String ACTION_SERVICE_ACTIVITY = "org.sufficientlysecure.keychain.crypto_provider.ICryptoServiceActivity"; public static final String ACTION_SERVICE_ACTIVITY = "org.sufficientlysecure.keychain.crypto_provider.IServiceActivityCallback";
@Override @Override
public void onCreate() { public void onCreate() {
@ -123,8 +123,8 @@ public class CryptoService extends Service {
// start passphrase dialog // start passphrase dialog
Bundle extras = new Bundle(); Bundle extras = new Bundle();
extras.putLong(CryptoActivity.EXTRA_SECRET_KEY_ID, secretKeyId); extras.putLong(ServiceActivity.EXTRA_SECRET_KEY_ID, secretKeyId);
pauseQueueAndStartCryptoActivity(CryptoActivity.ACTION_CACHE_PASSPHRASE, extras); pauseQueueAndStartServiceActivity(ServiceActivity.ACTION_CACHE_PASSPHRASE, extras);
} }
// if (signedOnly) { // if (signedOnly) {
@ -214,7 +214,7 @@ public class CryptoService extends Service {
}; };
private final ICryptoServiceActivity.Stub mBinderServiceActivity = new ICryptoServiceActivity.Stub() { private final IServiceActivityCallback.Stub mBinderServiceActivity = new IServiceActivityCallback.Stub() {
@Override @Override
public void register(boolean success, String packageName) throws RemoteException { public void register(boolean success, String packageName) throws RemoteException {
@ -249,7 +249,7 @@ public class CryptoService extends Service {
Log.d(Constants.TAG, "Enqueued runnable…"); Log.d(Constants.TAG, "Enqueued runnable…");
} else { } else {
Log.e(Constants.TAG, "Not allowed to use service! Starting register with activity!"); Log.e(Constants.TAG, "Not allowed to use service! Starting register with activity!");
pauseQueueAndStartCryptoActivity(CryptoActivity.ACTION_REGISTER, null); pauseQueueAndStartServiceActivity(ServiceActivity.ACTION_REGISTER, null);
mThreadPool.execute(r); mThreadPool.execute(r);
Log.d(Constants.TAG, "Enqueued runnable…"); Log.d(Constants.TAG, "Enqueued runnable…");
@ -286,11 +286,11 @@ public class CryptoService extends Service {
return false; return false;
} }
private void pauseQueueAndStartCryptoActivity(String action, Bundle extras) { private void pauseQueueAndStartServiceActivity(String action, Bundle extras) {
mThreadPool.pause(); mThreadPool.pause();
Log.d(Constants.TAG, "starting activity..."); Log.d(Constants.TAG, "starting activity...");
Intent intent = new Intent(getBaseContext(), CryptoActivity.class); Intent intent = new Intent(getBaseContext(), ServiceActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
// intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); // intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);

View File

@ -17,7 +17,7 @@
package org.sufficientlysecure.keychain.crypto_provider; package org.sufficientlysecure.keychain.crypto_provider;
interface ICryptoServiceActivity { interface IServiceActivityCallback {
oneway void register(in boolean success, in String packageName); oneway void register(in boolean success, in String packageName);

View File

@ -37,7 +37,7 @@ import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.Button; import android.widget.Button;
public class CryptoActivity extends SherlockFragmentActivity { public class ServiceActivity extends SherlockFragmentActivity {
public static final String ACTION_REGISTER = "org.sufficientlysecure.keychain.REGISTER"; public static final String ACTION_REGISTER = "org.sufficientlysecure.keychain.REGISTER";
public static final String ACTION_CACHE_PASSPHRASE = "org.sufficientlysecure.keychain.CRYPTO_CACHE_PASSPHRASE"; public static final String ACTION_CACHE_PASSPHRASE = "org.sufficientlysecure.keychain.CRYPTO_CACHE_PASSPHRASE";
@ -45,12 +45,12 @@ public class CryptoActivity extends SherlockFragmentActivity {
public static final String EXTRA_SECRET_KEY_ID = "secretKeyId"; public static final String EXTRA_SECRET_KEY_ID = "secretKeyId";
public static final String EXTRA_PACKAGE_NAME = "packageName"; public static final String EXTRA_PACKAGE_NAME = "packageName";
private ICryptoServiceActivity mService; private IServiceActivityCallback mService;
private boolean mServiceBound; private boolean mServiceBound;
private ServiceConnection mServiceActivityConnection = new ServiceConnection() { private ServiceConnection mServiceActivityConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName name, IBinder service) { public void onServiceConnected(ComponentName name, IBinder service) {
mService = ICryptoServiceActivity.Stub.asInterface(service); mService = IServiceActivityCallback.Stub.asInterface(service);
Log.d(Constants.TAG, "connected to ICryptoServiceActivity"); Log.d(Constants.TAG, "connected to ICryptoServiceActivity");
mServiceBound = true; mServiceBound = true;
} }