Disable email format check on the add contact dialog.
authorDa Risk <da_risk@beem-project.com>
Mon, 08 Oct 2012 23:36:20 +0200
changeset 1000 3651228bf160
parent 999 07b9c3efb14c
child 1001 ec0c60b581ed
Disable email format check on the add contact dialog. A roster item is not necessary in the form of an bare jid. fix #424
src/com/beem/project/beem/ui/AddContact.java
--- a/src/com/beem/project/beem/ui/AddContact.java	Mon Oct 08 21:29:03 2012 +0200
+++ b/src/com/beem/project/beem/ui/AddContact.java	Mon Oct 08 23:36:20 2012 +0200
@@ -55,6 +55,7 @@
 import android.os.Bundle;
 import android.os.IBinder;
 import android.os.RemoteException;
+import android.text.TextUtils;
 import android.util.Log;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -185,8 +186,7 @@
 	public void onClick(View v) {
 	    String login;
 	    login = getWidgetText(R.id.addc_login);
-	    boolean isEmail = Pattern.matches("[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9-]+.)+[a-zA-Z]{2,4}", login);
-	    if (!isEmail) {
+	    if (TextUtils.isEmpty(login)) {
 		Toast.makeText(AddContact.this, getString(R.string.AddCContactAddedLoginError), Toast.LENGTH_SHORT)
 		    .show();
 		return;