renamed KeychainIntentService to KeychainService

This commit is contained in:
Adithya Abraham Philip
2015-06-01 17:43:00 +05:30
parent 14a08361e5
commit 6bc40d12ad
28 changed files with 196 additions and 198 deletions

View File

@@ -26,7 +26,7 @@ import org.sufficientlysecure.keychain.keyimport.HkpKeyserver;
import org.sufficientlysecure.keychain.keyimport.ImportKeysListEntry;
import org.sufficientlysecure.keychain.keyimport.Keyserver;
import org.sufficientlysecure.keychain.keyimport.ParcelableKeyRing;
import org.sufficientlysecure.keychain.service.KeychainIntentService;
import org.sufficientlysecure.keychain.service.KeychainService;
import java.util.ArrayList;
import java.util.HashSet;
@@ -79,12 +79,12 @@ public class EmailKeyHelper {
}
private static void importKeys(Context context, Messenger messenger, ArrayList<ParcelableKeyRing> keys) {
Intent importIntent = new Intent(context, KeychainIntentService.class);
importIntent.setAction(KeychainIntentService.ACTION_IMPORT_KEYRING);
Intent importIntent = new Intent(context, KeychainService.class);
importIntent.setAction(KeychainService.ACTION_IMPORT_KEYRING);
Bundle importData = new Bundle();
importData.putParcelableArrayList(KeychainIntentService.IMPORT_KEY_LIST, keys);
importIntent.putExtra(KeychainIntentService.EXTRA_DATA, importData);
importIntent.putExtra(KeychainIntentService.EXTRA_MESSENGER, messenger);
importData.putParcelableArrayList(KeychainService.IMPORT_KEY_LIST, keys);
importIntent.putExtra(KeychainService.EXTRA_DATA, importData);
importIntent.putExtra(KeychainService.EXTRA_MESSENGER, messenger);
context.startService(importIntent);
}

View File

@@ -27,7 +27,7 @@ import android.support.v4.app.FragmentActivity;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.ExportResult;
import org.sufficientlysecure.keychain.service.KeychainIntentService;
import org.sufficientlysecure.keychain.service.KeychainService;
import org.sufficientlysecure.keychain.service.ServiceProgressHandler;
import java.io.File;
@@ -78,25 +78,25 @@ public class ExportHelper {
Log.d(Constants.TAG, "exportKeys started");
// Send all information needed to service to export key in other thread
final Intent intent = new Intent(mActivity, KeychainIntentService.class);
final Intent intent = new Intent(mActivity, KeychainService.class);
intent.setAction(KeychainIntentService.ACTION_EXPORT_KEYRING);
intent.setAction(KeychainService.ACTION_EXPORT_KEYRING);
// fill values for this action
Bundle data = new Bundle();
data.putString(KeychainIntentService.EXPORT_FILENAME, mExportFile.getAbsolutePath());
data.putBoolean(KeychainIntentService.EXPORT_SECRET, exportSecret);
data.putString(KeychainService.EXPORT_FILENAME, mExportFile.getAbsolutePath());
data.putBoolean(KeychainService.EXPORT_SECRET, exportSecret);
if (masterKeyIds == null) {
data.putBoolean(KeychainIntentService.EXPORT_ALL, true);
data.putBoolean(KeychainService.EXPORT_ALL, true);
} else {
data.putLongArray(KeychainIntentService.EXPORT_KEY_RING_MASTER_KEY_ID, masterKeyIds);
data.putLongArray(KeychainService.EXPORT_KEY_RING_MASTER_KEY_ID, masterKeyIds);
}
intent.putExtra(KeychainIntentService.EXTRA_DATA, data);
intent.putExtra(KeychainService.EXTRA_DATA, data);
// Message is received after exporting is done in KeychainIntentService
// Message is received after exporting is done in KeychainService
ServiceProgressHandler exportHandler = new ServiceProgressHandler(mActivity,
mActivity.getString(R.string.progress_exporting),
ProgressDialog.STYLE_HORIZONTAL
@@ -118,7 +118,7 @@ public class ExportHelper {
// Create a new Messenger for the communication back
Messenger messenger = new Messenger(exportHandler);
intent.putExtra(KeychainIntentService.EXTRA_MESSENGER, messenger);
intent.putExtra(KeychainService.EXTRA_MESSENGER, messenger);
// show progress dialog
exportHandler.showProgressDialog(mActivity);

View File

@@ -51,15 +51,15 @@ public class KeyUpdateHelper {
}
// Start the service and update the keys
Intent importIntent = new Intent(mContext, KeychainIntentService.class);
importIntent.setAction(KeychainIntentService.ACTION_DOWNLOAD_AND_IMPORT_KEYS);
Intent importIntent = new Intent(mContext, KeychainService.class);
importIntent.setAction(KeychainService.ACTION_DOWNLOAD_AND_IMPORT_KEYS);
Bundle importData = new Bundle();
importData.putParcelableArrayList(KeychainIntentService.DOWNLOAD_KEY_LIST,
importData.putParcelableArrayList(KeychainService.DOWNLOAD_KEY_LIST,
new ArrayList<ImportKeysListEntry>(keys));
importIntent.putExtra(KeychainIntentService.EXTRA_SERVICE_INTENT, importData);
importIntent.putExtra(KeychainService.EXTRA_SERVICE_INTENT, importData);
importIntent.putExtra(KeychainIntentService.EXTRA_MESSENGER, new Messenger(mHandler));
importIntent.putExtra(KeychainService.EXTRA_MESSENGER, new Messenger(mHandler));
mContext.startService(importIntent);
}