renamed KeychainNewService to KeychainService
This commit is contained in:
parent
7bc21b8b9d
commit
1c6ae48a07
|
@ -711,7 +711,7 @@
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:process=":remote_api" />
|
android:process=":remote_api" />
|
||||||
<service
|
<service
|
||||||
android:name=".service.KeychainNewService"
|
android:name=".service.KeychainService"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
|
|
|
@ -53,7 +53,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
* This Service contains all important long lasting operations for OpenKeychain. It receives Intents with
|
* This Service contains all important long lasting operations for OpenKeychain. It receives Intents with
|
||||||
* data from the activities or other apps, executes them, and stops itself after doing them.
|
* data from the activities or other apps, executes them, and stops itself after doing them.
|
||||||
*/
|
*/
|
||||||
public class KeychainNewService extends Service implements Progressable {
|
public class KeychainService extends Service implements Progressable {
|
||||||
|
|
||||||
// messenger for communication (hack)
|
// messenger for communication (hack)
|
||||||
public static final String EXTRA_MESSENGER = "messenger";
|
public static final String EXTRA_MESSENGER = "messenger";
|
||||||
|
@ -104,7 +104,7 @@ public class KeychainNewService extends Service implements Progressable {
|
||||||
BaseOperation op;
|
BaseOperation op;
|
||||||
|
|
||||||
// just for brevity
|
// just for brevity
|
||||||
KeychainNewService outerThis = KeychainNewService.this;
|
KeychainService outerThis = KeychainService.this;
|
||||||
if (inputParcel instanceof SignEncryptParcel) {
|
if (inputParcel instanceof SignEncryptParcel) {
|
||||||
op = new SignEncryptOperation(outerThis, new ProviderHelper(outerThis),
|
op = new SignEncryptOperation(outerThis, new ProviderHelper(outerThis),
|
||||||
outerThis, mActionCanceled);
|
outerThis, mActionCanceled);
|
|
@ -66,7 +66,7 @@ import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||||
import org.sufficientlysecure.keychain.service.ImportKeyringParcel;
|
import org.sufficientlysecure.keychain.service.ImportKeyringParcel;
|
||||||
import org.sufficientlysecure.keychain.service.KeychainNewService;
|
import org.sufficientlysecure.keychain.service.KeychainService;
|
||||||
import org.sufficientlysecure.keychain.service.ServiceProgressHandler;
|
import org.sufficientlysecure.keychain.service.ServiceProgressHandler;
|
||||||
import org.sufficientlysecure.keychain.service.ServiceProgressHandler.MessageStatus;
|
import org.sufficientlysecure.keychain.service.ServiceProgressHandler.MessageStatus;
|
||||||
import org.sufficientlysecure.keychain.service.PassphraseCacheService;
|
import org.sufficientlysecure.keychain.service.PassphraseCacheService;
|
||||||
|
@ -427,7 +427,7 @@ public class ViewKeyActivity extends BaseNfcActivity implements
|
||||||
};
|
};
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
Messenger messenger = new Messenger(saveHandler);
|
Messenger messenger = new Messenger(saveHandler);
|
||||||
intent.putExtra(KeychainNewService.EXTRA_MESSENGER, messenger);
|
intent.putExtra(KeychainService.EXTRA_MESSENGER, messenger);
|
||||||
|
|
||||||
startActivityForResult(intent, 0);
|
startActivityForResult(intent, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.sufficientlysecure.keychain.Constants;
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
import org.sufficientlysecure.keychain.operations.results.InputPendingResult;
|
import org.sufficientlysecure.keychain.operations.results.InputPendingResult;
|
||||||
import org.sufficientlysecure.keychain.operations.results.OperationResult;
|
import org.sufficientlysecure.keychain.operations.results.OperationResult;
|
||||||
import org.sufficientlysecure.keychain.service.KeychainNewService;
|
import org.sufficientlysecure.keychain.service.KeychainService;
|
||||||
import org.sufficientlysecure.keychain.service.ServiceProgressHandler;
|
import org.sufficientlysecure.keychain.service.ServiceProgressHandler;
|
||||||
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
||||||
import org.sufficientlysecure.keychain.service.input.RequiredInputParcel;
|
import org.sufficientlysecure.keychain.service.input.RequiredInputParcel;
|
||||||
|
@ -234,10 +234,10 @@ public class CryptoOperationHelper<T extends Parcelable, S extends OperationResu
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send all information needed to service to edit key in other thread
|
// Send all information needed to service to edit key in other thread
|
||||||
Intent intent = new Intent(activity, KeychainNewService.class);
|
Intent intent = new Intent(activity, KeychainService.class);
|
||||||
|
|
||||||
intent.putExtra(KeychainNewService.EXTRA_OPERATION_INPUT, operationInput);
|
intent.putExtra(KeychainService.EXTRA_OPERATION_INPUT, operationInput);
|
||||||
intent.putExtra(KeychainNewService.EXTRA_CRYPTO_INPUT, cryptoInput);
|
intent.putExtra(KeychainService.EXTRA_CRYPTO_INPUT, cryptoInput);
|
||||||
|
|
||||||
ServiceProgressHandler saveHandler = new ServiceProgressHandler(activity) {
|
ServiceProgressHandler saveHandler = new ServiceProgressHandler(activity) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -267,7 +267,7 @@ public class CryptoOperationHelper<T extends Parcelable, S extends OperationResu
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
Messenger messenger = new Messenger(saveHandler);
|
Messenger messenger = new Messenger(saveHandler);
|
||||||
intent.putExtra(KeychainNewService.EXTRA_MESSENGER, messenger);
|
intent.putExtra(KeychainService.EXTRA_MESSENGER, messenger);
|
||||||
|
|
||||||
activity.startService(intent);
|
activity.startService(intent);
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ import android.view.View.OnClickListener;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
import org.sufficientlysecure.keychain.service.KeychainNewService;
|
import org.sufficientlysecure.keychain.service.KeychainService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meant to be used
|
* meant to be used
|
||||||
|
@ -181,9 +181,9 @@ public class ProgressDialogFragment extends DialogFragment {
|
||||||
// send a cancel message. note that this message will be handled by
|
// send a cancel message. note that this message will be handled by
|
||||||
// KeychainService.onStartCommand, which runs in this thread,
|
// KeychainService.onStartCommand, which runs in this thread,
|
||||||
// not the service one, and will not queue up a command.
|
// not the service one, and will not queue up a command.
|
||||||
Intent serviceIntent = new Intent(getActivity(), KeychainNewService.class);
|
Intent serviceIntent = new Intent(getActivity(), KeychainService.class);
|
||||||
|
|
||||||
serviceIntent.setAction(KeychainNewService.ACTION_CANCEL);
|
serviceIntent.setAction(KeychainService.ACTION_CANCEL);
|
||||||
getActivity().startService(serviceIntent);
|
getActivity().startService(serviceIntent);
|
||||||
|
|
||||||
// Set the progress bar accordingly
|
// Set the progress bar accordingly
|
||||||
|
|
Loading…
Reference in a new issue