mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 19:22:14 -05:00
Fixes for upload
This commit is contained in:
parent
38120ae77c
commit
97209f9d3d
@ -333,7 +333,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
||||
|
||||
// Message is received after uploading is done in KeychainIntentService
|
||||
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(this,
|
||||
getString(R.string.progress_exporting), ProgressDialog.STYLE_HORIZONTAL) {
|
||||
getString(R.string.progress_uploading), ProgressDialog.STYLE_HORIZONTAL) {
|
||||
public void handleMessage(Message message) {
|
||||
// handle messages by standard KeychainIntentServiceHandler first
|
||||
super.handleMessage(message);
|
||||
|
@ -145,20 +145,20 @@ public class CreateKeyFinalFragment extends Fragment {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mUploadCheckbox.isChecked()) {
|
||||
if (result.getResult() == OperationResultParcel.RESULT_OK) {
|
||||
if (result.getResult() == OperationResultParcel.RESULT_OK) {
|
||||
if (mUploadCheckbox.isChecked()) {
|
||||
// result will be displayed after upload
|
||||
uploadKey(result);
|
||||
} else {
|
||||
// display result on error without finishing activity
|
||||
// TODO: return result
|
||||
result.createNotify(getActivity());
|
||||
|
||||
getActivity().setResult(Activity.RESULT_OK);
|
||||
getActivity().finish();
|
||||
}
|
||||
} else {
|
||||
// TODO: return result
|
||||
// display result on error without finishing activity
|
||||
result.createNotify(getActivity());
|
||||
|
||||
getActivity().setResult(Activity.RESULT_OK);
|
||||
getActivity().finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -196,9 +196,8 @@ public class CreateKeyFinalFragment extends Fragment {
|
||||
intent.setAction(KeychainIntentService.ACTION_UPLOAD_KEYRING);
|
||||
|
||||
// set data uri as path to keyring
|
||||
Uri blobUri = KeychainContract.KeyRingData.buildPublicKeyRingUri(
|
||||
Long.toString(editKeyResult.mRingMasterKeyId)
|
||||
);
|
||||
Uri blobUri = KeychainContract.KeyRings.buildUnifiedKeyRingUri(
|
||||
editKeyResult.mRingMasterKeyId);
|
||||
intent.setData(blobUri);
|
||||
|
||||
// fill values for this action
|
||||
@ -212,14 +211,15 @@ public class CreateKeyFinalFragment extends Fragment {
|
||||
|
||||
// Message is received after uploading is done in KeychainIntentService
|
||||
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(getActivity(),
|
||||
getString(R.string.progress_exporting), ProgressDialog.STYLE_HORIZONTAL) {
|
||||
getString(R.string.progress_uploading), ProgressDialog.STYLE_HORIZONTAL) {
|
||||
public void handleMessage(Message message) {
|
||||
// handle messages by standard KeychainIntentServiceHandler first
|
||||
super.handleMessage(message);
|
||||
|
||||
if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
|
||||
// TODO: return results
|
||||
|
||||
// TODO: not supported by upload?
|
||||
// if (result.getResult() == OperationResultParcel.RESULT_OK) {
|
||||
// TODO: return result
|
||||
editKeyResult.createNotify(getActivity());
|
||||
|
||||
Notify.showNotify(getActivity(), R.string.key_send_success,
|
||||
@ -227,6 +227,10 @@ public class CreateKeyFinalFragment extends Fragment {
|
||||
|
||||
getActivity().setResult(Activity.RESULT_OK);
|
||||
getActivity().finish();
|
||||
// } else {
|
||||
// // display result on error without finishing activity
|
||||
// editKeyResult.createNotify(getActivity());
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -106,7 +106,7 @@ public class UploadKeyActivity extends ActionBarActivity {
|
||||
|
||||
// Message is received after uploading is done in KeychainIntentService
|
||||
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(this,
|
||||
getString(R.string.progress_exporting), ProgressDialog.STYLE_HORIZONTAL) {
|
||||
getString(R.string.progress_uploading), ProgressDialog.STYLE_HORIZONTAL) {
|
||||
public void handleMessage(Message message) {
|
||||
// handle messages by standard KeychainIntentServiceHandler first
|
||||
super.handleMessage(message);
|
||||
|
@ -300,6 +300,7 @@
|
||||
<string name="progress_saving">saving…</string>
|
||||
<string name="progress_importing">importing…</string>
|
||||
<string name="progress_exporting">exporting…</string>
|
||||
<string name="progress_uploading">uploading…</string>
|
||||
<string name="progress_building_key">building key…</string>
|
||||
<string name="progress_certifying_master_key">certifying master key…</string>
|
||||
<string name="progress_building_master_key">building master ring…</string>
|
||||
|
Loading…
Reference in New Issue
Block a user