Accept any six-digit invitation/confirmation code.

Rejecting codes greater than 2^19 - 1 creates a confusing user
experience.
This commit is contained in:
akwizgran
2013-03-11 10:30:20 +00:00
parent 1ece8a05fb
commit 4d590f4533
2 changed files with 1 additions and 5 deletions

View File

@@ -5,7 +5,6 @@ import static android.text.InputType.TYPE_CLASS_NUMBER;
import static android.view.Gravity.CENTER;
import static android.view.Gravity.CENTER_HORIZONTAL;
import static android.view.inputmethod.InputMethodManager.HIDE_IMPLICIT_ONLY;
import static net.sf.briar.api.plugins.InvitationConstants.MAX_CODE;
import net.sf.briar.R;
import android.content.Context;
import android.view.KeyEvent;
@@ -83,7 +82,6 @@ OnEditorActionListener, OnClickListener {
} catch(NumberFormatException e) {
return false;
}
if(remoteCode < 0 || remoteCode > MAX_CODE) return false;
// Hide the soft keyboard
Object o = getContext().getSystemService(INPUT_METHOD_SERVICE);
((InputMethodManager) o).toggleSoftInput(HIDE_IMPLICIT_ONLY, 0);