mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-24 07:58:50 -05:00
Rename foir clarification
This commit is contained in:
parent
41338e115c
commit
918bab3a4e
@ -478,7 +478,7 @@
|
||||
<action android:name="org.openintents.crypto.ICryptoService" />
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<meta-data
|
||||
|
@ -60,7 +60,7 @@ public class CryptoService extends Service {
|
||||
|
||||
// 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
|
||||
public void onCreate() {
|
||||
@ -123,8 +123,8 @@ public class CryptoService extends Service {
|
||||
|
||||
// start passphrase dialog
|
||||
Bundle extras = new Bundle();
|
||||
extras.putLong(CryptoActivity.EXTRA_SECRET_KEY_ID, secretKeyId);
|
||||
pauseQueueAndStartCryptoActivity(CryptoActivity.ACTION_CACHE_PASSPHRASE, extras);
|
||||
extras.putLong(ServiceActivity.EXTRA_SECRET_KEY_ID, secretKeyId);
|
||||
pauseQueueAndStartServiceActivity(ServiceActivity.ACTION_CACHE_PASSPHRASE, extras);
|
||||
}
|
||||
|
||||
// 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
|
||||
public void register(boolean success, String packageName) throws RemoteException {
|
||||
@ -249,7 +249,7 @@ public class CryptoService extends Service {
|
||||
Log.d(Constants.TAG, "Enqueued runnable…");
|
||||
} else {
|
||||
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);
|
||||
|
||||
Log.d(Constants.TAG, "Enqueued runnable…");
|
||||
@ -286,11 +286,11 @@ public class CryptoService extends Service {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void pauseQueueAndStartCryptoActivity(String action, Bundle extras) {
|
||||
private void pauseQueueAndStartServiceActivity(String action, Bundle extras) {
|
||||
mThreadPool.pause();
|
||||
|
||||
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_CLEAR_TOP);
|
||||
// intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
|
||||
|
@ -17,7 +17,7 @@
|
||||
package org.sufficientlysecure.keychain.crypto_provider;
|
||||
|
||||
|
||||
interface ICryptoServiceActivity {
|
||||
interface IServiceActivityCallback {
|
||||
|
||||
|
||||
oneway void register(in boolean success, in String packageName);
|
@ -37,7 +37,7 @@ import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
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_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_PACKAGE_NAME = "packageName";
|
||||
|
||||
private ICryptoServiceActivity mService;
|
||||
private IServiceActivityCallback mService;
|
||||
private boolean mServiceBound;
|
||||
|
||||
private ServiceConnection mServiceActivityConnection = new ServiceConnection() {
|
||||
public void onServiceConnected(ComponentName name, IBinder service) {
|
||||
mService = ICryptoServiceActivity.Stub.asInterface(service);
|
||||
mService = IServiceActivityCallback.Stub.asInterface(service);
|
||||
Log.d(Constants.TAG, "connected to ICryptoServiceActivity");
|
||||
mServiceBound = true;
|
||||
}
|
Loading…
Reference in New Issue
Block a user