← Back to team overview

dhis-mobile-devs team mailing list archive

[Branch ~dhis-mobile-devs/dhis-mobile/lwuit-tracking] Rev 205: Added checking for invalid server location.

 

------------------------------------------------------------
revno: 205
committer: sherylyn.marie
branch nick: lwuit-tracking
timestamp: Mon 2014-04-07 15:57:37 +0800
message:
  Added checking for invalid server location.
modified:
  src/org/hisp/dhis/mobile/connection/task/LoginTask.java


--
lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking
https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking

Your team DHIS mobile developers is subscribed to branch lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking/+edit-subscription
=== modified file 'src/org/hisp/dhis/mobile/connection/task/LoginTask.java'
--- src/org/hisp/dhis/mobile/connection/task/LoginTask.java	2014-04-03 01:58:41 +0000
+++ src/org/hisp/dhis/mobile/connection/task/LoginTask.java	2014-04-07 07:57:37 +0000
@@ -93,6 +93,11 @@
                 ConnectionManager.getDhisMIDlet().getAlertBoxView( "Invalid username or password", "Alert" ).showView();
                 ConnectionManager.getDhisMIDlet().getLoginView().showView();
             }
+            else if ( e.getMessage().equalsIgnoreCase( "Connection not found" ) )
+            {
+                ConnectionManager.getDhisMIDlet().getAlertBoxView( "Invalid server location", "Alert" ).showView();
+                ConnectionManager.getDhisMIDlet().getLoginView().showView();
+            }
             e.printStackTrace();
             LogMan.log( "Network,Authentication," + CLASS_TAG, e );
         }