From 3b8689f892f34d471b46da92e2e1854090757977 Mon Sep 17 00:00:00 2001 From: akwizgran <akwizgran@users.sourceforge.net> Date: Mon, 25 Apr 2016 13:14:22 +0100 Subject: [PATCH] Tweaked introduction wording, use Collections.emptyList(). --- briar-android/res/values/strings.xml | 8 ++++---- .../briarproject/introduction/IntroduceeEngine.java | 12 +++++------- .../briarproject/introduction/IntroducerEngine.java | 5 ++--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/briar-android/res/values/strings.xml b/briar-android/res/values/strings.xml index 95bde25704..99292210ff 100644 --- a/briar-android/res/values/strings.xml +++ b/briar-android/res/values/strings.xml @@ -157,13 +157,13 @@ <string name="introduction_request_sent">You have asked to introduce %1$s to %2$s.</string> <string name="introduction_request_received">%1$s has asked to introduce you to %2$s. Do you want to add %2$s to your contact list?</string> <string name="introduction_request_exists_received">%1$s has asked to introduce you to %2$s, but %2$s is already in your contact list. Since %1$s might not know that, you can still respond:</string> - <string name="introduction_request_for_our_identity_received">%1$s has asked to introduce you to %2$s, but %2$s is one of your other identities. For that reason you cannot accept the introduction:</string> + <string name="introduction_request_for_our_identity_received">%1$s has asked to introduce you to %2$s, but %2$s is one of your other identities, so you cannot accept the introduction:</string> <string name="introduction_request_answered_received">%1$s has asked to introduce you to %2$s.</string> <string name="introduction_response_accepted_sent">You accepted the introduction to %1$s.</string> <string name="introduction_response_declined_sent">You declined the introduction to %1$s.</string> - <string name="introduction_response_accepted_received">%1$s accepted to be introduced to %2$s.</string> - <string name="introduction_response_declined_received">%1$s declined to be introduced to %2$s.</string> - <string name="introduction_response_declined_received_by_introducee">%1$s has informed us that %2$s has declined the introduction.</string> + <string name="introduction_response_accepted_received">%1$s accepted the introduction to %2$s.</string> + <string name="introduction_response_declined_received">%1$s declined the introduction to %2$s.</string> + <string name="introduction_response_declined_received_by_introducee">%1$s says that %2$s declined the introduction.</string> <string name="introduction_success_title">Introduced contact was added</string> <string name="introduction_success_text">You have been introduced to %1$s.</string> diff --git a/briar-core/src/org/briarproject/introduction/IntroduceeEngine.java b/briar-core/src/org/briarproject/introduction/IntroduceeEngine.java index cb1ee7e023..3f29b00b00 100644 --- a/briar-core/src/org/briarproject/introduction/IntroduceeEngine.java +++ b/briar-core/src/org/briarproject/introduction/IntroduceeEngine.java @@ -26,8 +26,6 @@ import static org.briarproject.api.introduction.IntroduceeAction.LOCAL_ABORT; import static org.briarproject.api.introduction.IntroduceeAction.LOCAL_ACCEPT; import static org.briarproject.api.introduction.IntroduceeAction.LOCAL_DECLINE; import static org.briarproject.api.introduction.IntroduceeAction.REMOTE_ABORT; -import static org.briarproject.api.introduction.IntroduceeAction.REMOTE_ACCEPT; -import static org.briarproject.api.introduction.IntroduceeAction.REMOTE_DECLINE; import static org.briarproject.api.introduction.IntroduceeProtocolState.AWAIT_ACK; import static org.briarproject.api.introduction.IntroduceeProtocolState.AWAIT_REMOTE_RESPONSE; import static org.briarproject.api.introduction.IntroduceeProtocolState.AWAIT_REQUEST; @@ -199,8 +197,9 @@ public class IntroduceeEngine // we are done (probably declined response), ignore & delete message else if (currentState == FINISHED) { return new StateUpdate<BdfDictionary, BdfDictionary>(true, - false, localState, new ArrayList<BdfDictionary>(0), - new ArrayList<Event>(0)); + false, localState, + Collections.<BdfDictionary>emptyList(), + Collections.<Event>emptyList()); } // this should not happen else { @@ -377,8 +376,7 @@ public class IntroduceeEngine BdfDictionary localState) throws FormatException { return new StateUpdate<BdfDictionary, BdfDictionary>(false, false, - localState, new ArrayList<BdfDictionary>(0), - new ArrayList<Event>(0)); + localState, Collections.<BdfDictionary>emptyList(), + Collections.<Event>emptyList()); } - } diff --git a/briar-core/src/org/briarproject/introduction/IntroducerEngine.java b/briar-core/src/org/briarproject/introduction/IntroducerEngine.java index 6af05d14bc..e0e1449f65 100644 --- a/briar-core/src/org/briarproject/introduction/IntroducerEngine.java +++ b/briar-core/src/org/briarproject/introduction/IntroducerEngine.java @@ -388,8 +388,7 @@ public class IntroducerEngine BdfDictionary localState) throws FormatException { return new StateUpdate<BdfDictionary, BdfDictionary>(false, false, - localState, new ArrayList<BdfDictionary>(0), - new ArrayList<Event>(0)); + localState, Collections.<BdfDictionary>emptyList(), + Collections.<Event>emptyList()); } - } -- GitLab