aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsSourceService.java
diff options
context:
space:
mode:
authorSebastien Vincent <seb@jitsi.org>2011-03-23 11:06:35 +0000
committerSebastien Vincent <seb@jitsi.org>2011-03-23 11:06:35 +0000
commit2593dad14079f0a8d1a5aa6b3be2f791a2741f7f (patch)
treec5d6348122e95c3620ffd5227fb6aeeb19ffb5c5 /src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsSourceService.java
parent3d20cd71475f08369623a0302031b54d711e586e (diff)
downloadjitsi-2593dad14079f0a8d1a5aa6b3be2f791a2741f7f.zip
jitsi-2593dad14079f0a8d1a5aa6b3be2f791a2741f7f.tar.gz
jitsi-2593dad14079f0a8d1a5aa6b3be2f791a2741f7f.tar.bz2
Handle cases where user change Gmail/Google Apps account password, Google Contacts source must inform users about wrong password.
Diffstat (limited to 'src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsSourceService.java')
-rw-r--r--src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsSourceService.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsSourceService.java b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsSourceService.java
index d36c78f..5fdc3f1 100644
--- a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsSourceService.java
+++ b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsSourceService.java
@@ -8,6 +8,7 @@ package net.java.sip.communicator.impl.googlecontacts;
import java.util.*;
import java.util.regex.*;
+import net.java.sip.communicator.impl.googlecontacts.configform.*;
import net.java.sip.communicator.service.contactsource.*;
import net.java.sip.communicator.service.googlecontacts.*;
import net.java.sip.communicator.util.*;
@@ -167,6 +168,47 @@ public class GoogleContactsSourceService
if(cnx == null)
{
cnx = new GoogleContactsConnectionImpl(login, password);
+
+ if(cnx.connect() == false)
+ {
+ AccountSettingsForm settings =
+ new AccountSettingsForm();
+ settings.setModal(true);
+ settings.loadData(cnx);
+ int ret = settings.showDialog();
+
+ if(ret == 1)
+ {
+ cnx = (GoogleContactsConnectionImpl)
+ settings.getConnection();
+ GoogleContactsActivator.getGoogleContactsService().
+ saveConfig(cnx);
+ }
+ else
+ {
+ cnx = null;
+ }
+ }
+ }
+ else if(!cnx.connect())
+ {
+ AccountSettingsForm settings =
+ new AccountSettingsForm();
+ settings.setModal(true);
+ settings.loadData(cnx);
+ int ret = settings.showDialog();
+
+ if(ret == 1)
+ {
+ cnx = (GoogleContactsConnectionImpl)
+ settings.getConnection();
+ GoogleContactsActivator.getGoogleContactsService().
+ saveConfig(cnx);
+ }
+ else
+ {
+ cnx = null;
+ }
}
}
else