diff options
| author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-10-08 17:32:41 +0200 | 
|---|---|---|
| committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-10-08 17:32:41 +0200 | 
| commit | 158f22a799e6a51dff64aa54303bf4bb7b495b4e (patch) | |
| tree | 515d2f304dbbd16e27305d46295005d5eb15c9c5 /OpenKeychain/src/main/java/org | |
| parent | b573afe2359653d0ddeb9f35075ca22af40b0ab4 (diff) | |
| parent | 590650a3039ebabe820241bf8709569812aad7a8 (diff) | |
| download | open-keychain-158f22a799e6a51dff64aa54303bf4bb7b495b4e.tar.gz open-keychain-158f22a799e6a51dff64aa54303bf4bb7b495b4e.tar.bz2 open-keychain-158f22a799e6a51dff64aa54303bf4bb7b495b4e.zip  | |
Merge branch 'development' of github.com:open-keychain/open-keychain into development
Diffstat (limited to 'OpenKeychain/src/main/java/org')
4 files changed, 15 insertions, 25 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java index 485009f0d..b9c42db3f 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -313,12 +313,7 @@ public class KeychainIntentService extends IntentService implements Progressable                  DecryptVerifyResult decryptVerifyResult = builder.build().execute(); -                resultData.putParcelable(DecryptVerifyResult.EXTRA_RESULT, decryptVerifyResult); - -                /* Output */ -                Log.logDebugBundle(resultData, "resultData"); - -                sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_OKAY, resultData); +                sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_OKAY, decryptVerifyResult);              } catch (Exception e) {                  sendErrorToHandler(e);              } @@ -512,11 +507,7 @@ public class KeychainIntentService extends IntentService implements Progressable                  // If the edit operation didn't succeed, exit here                  if (!modifyResult.success()) {                      // always return SaveKeyringResult, so create one out of the EditKeyResult -                    SaveKeyringResult saveResult = new SaveKeyringResult( -                            SaveKeyringResult.RESULT_ERROR, -                            modifyResult.getLog(), -                            null); -                    sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_OKAY, saveResult); +                    sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_OKAY, modifyResult);                      return;                  } @@ -530,9 +521,9 @@ public class KeychainIntentService extends IntentService implements Progressable                          log.add(LogType.MSG_OPERATION_CANCELLED, 0);                      }                      // If so, just stop without saving -                    SaveKeyringResult saveResult = new SaveKeyringResult( -                            SaveKeyringResult.RESULT_CANCELLED, log, null); -                    sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_OKAY, saveResult); +                    modifyResult = new EditKeyResult( +                            EditKeyResult.RESULT_CANCELLED, log, null); +                    sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_OKAY, modifyResult);                      return;                  } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java index d65a84e5b..e3f2c1cc5 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java @@ -93,6 +93,11 @@ public abstract class OperationResult implements Parcelable {      }      public OperationLog getLog() { +        // If there is only a single entry, and it's a compound one, return that log +        if (mLog.isSingleCompound()) { +            return ((SubLogEntryParcel) mLog.getFirst()).getSubResult().getLog(); +        } +        // Otherwse, return our regular log          return mLog;      } @@ -644,6 +649,10 @@ public abstract class OperationResult implements Parcelable {              mParcels.add(new SubLogEntryParcel(subResult, subLog.getFirst().mType, indent, subLog.getFirst().mParameters));          } +        boolean isSingleCompound() { +            return mParcels.size() == 1 && getFirst() instanceof SubLogEntryParcel; +        } +          public void clear() {              mParcels.clear();          } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyFragment.java index 6a8dcbcec..ddfbac03c 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyFragment.java @@ -173,16 +173,6 @@ public class MultiCertifyKeyFragment extends LoaderFragment              }          }); -        // UI tidbit: "my key" is the area above the checkbox, if the user clicks there he -        // probably actually wants to hit the checkbox -        View vMyKeyLabel = view.findViewById(R.id.label_my_key); -        vMyKeyLabel.setOnClickListener(new OnClickListener() { -            @Override -            public void onClick(View v) { -                mUploadKeyCheckbox.performClick(); -            } -        }); -          return root;      } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java index a59cb175f..afc3247be 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java @@ -286,7 +286,7 @@ public class KeyFormattingUtils {      }      public static String beautifyKeyIdWithPrefix(Context context, String idHex) { -        return "ID: " + beautifyKeyId(idHex); +        return "Key ID: " + beautifyKeyId(idHex);      }      public static String beautifyKeyIdWithPrefix(Context context, long keyId) {  | 
