mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
ContactExchangeErrorFragment: Address review comments
This commit is contained in:
@@ -119,13 +119,10 @@ public class ContactExchangeActivity extends KeyAgreementActivity implements
|
|||||||
return getString(R.string.authenticating_with_device);
|
return getString(R.string.authenticating_with_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@UiThread
|
@UiThread
|
||||||
@Override
|
@Override
|
||||||
public String keyAgreementAborted(boolean remoteAborted) {
|
public void keyAgreementAborted(boolean remoteAborted) {
|
||||||
showErrorFragment(remoteAborted ? R.string.connection_aborted_remote :
|
showErrorFragment(R.string.connection_error_explanation);
|
||||||
R.string.connection_aborted_local);
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@UiThread
|
@UiThread
|
||||||
|
|||||||
@@ -49,9 +49,8 @@ public class ContactExchangeErrorFragment extends BaseFragment {
|
|||||||
public View onCreateView(LayoutInflater inflater,
|
public View onCreateView(LayoutInflater inflater,
|
||||||
@Nullable ViewGroup container,
|
@Nullable ViewGroup container,
|
||||||
@Nullable Bundle savedInstanceState) {
|
@Nullable Bundle savedInstanceState) {
|
||||||
View v = inflater
|
View v = inflater.inflate(R.layout.fragment_error_contact_exchange,
|
||||||
.inflate(R.layout.fragment_error_contact_exchange, container,
|
container, false);
|
||||||
false);
|
|
||||||
|
|
||||||
// set humanized error message
|
// set humanized error message
|
||||||
TextView explanation = v.findViewById(R.id.errorMessage);
|
TextView explanation = v.findViewById(R.id.errorMessage);
|
||||||
|
|||||||
@@ -300,9 +300,7 @@ public class KeyAgreementFragment extends BaseEventFragment
|
|||||||
private void keyAgreementAborted(boolean remoteAborted) {
|
private void keyAgreementAborted(boolean remoteAborted) {
|
||||||
runOnUiThreadUnlessDestroyed(() -> {
|
runOnUiThreadUnlessDestroyed(() -> {
|
||||||
reset();
|
reset();
|
||||||
qrCodeView.setVisibility(VISIBLE);
|
listener.keyAgreementAborted(remoteAborted);
|
||||||
statusView.setVisibility(INVISIBLE);
|
|
||||||
status.setText(listener.keyAgreementAborted(remoteAborted));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,10 +359,9 @@ public class KeyAgreementFragment extends BaseEventFragment
|
|||||||
@Nullable
|
@Nullable
|
||||||
String keyAgreementStarted();
|
String keyAgreementStarted();
|
||||||
|
|
||||||
// Should return a string to be displayed as status.
|
// Will show an error fragment.
|
||||||
@UiThread
|
@UiThread
|
||||||
@Nullable
|
void keyAgreementAborted(boolean remoteAborted);
|
||||||
String keyAgreementAborted(boolean remoteAborted);
|
|
||||||
|
|
||||||
// Should return a string to be displayed as status.
|
// Should return a string to be displayed as status.
|
||||||
@UiThread
|
@UiThread
|
||||||
|
|||||||
@@ -143,8 +143,6 @@
|
|||||||
<string name="camera_error">Camera error</string>
|
<string name="camera_error">Camera error</string>
|
||||||
<string name="connecting_to_device">Connecting to device\u2026</string>
|
<string name="connecting_to_device">Connecting to device\u2026</string>
|
||||||
<string name="authenticating_with_device">Authenticating with device\u2026</string>
|
<string name="authenticating_with_device">Authenticating with device\u2026</string>
|
||||||
<string name="connection_aborted_local">The connection was aborted. Please try again! It might help to check that you\'re both connected to the same Wi-Fi network!</string>
|
|
||||||
<string name="connection_aborted_remote">The connection was aborted by your contact\'s device. Please try again! It might help to check that you\'re both connected to the same Wi-Fi network!</string>
|
|
||||||
<string name="connection_error_title">Could not connect to your contact</string>
|
<string name="connection_error_title">Could not connect to your contact</string>
|
||||||
<string name="connection_error_explanation">Please check that you\'re both connected to the same Wi-Fi network.</string>
|
<string name="connection_error_explanation">Please check that you\'re both connected to the same Wi-Fi network.</string>
|
||||||
<string name="connection_error_feedback">If this problem persists, please <a href="feedback">send feedback</a> to help us improve the app.</string>
|
<string name="connection_error_feedback">If this problem persists, please <a href="feedback">send feedback</a> to help us improve the app.</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user