colima / moca

Automatically exported from code.google.com/p/moca
0 stars 0 forks source link

Android client freezes on startup if MDS is offline #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On app startup, the Android client immediately checks whether the saved 
credentials are valid in order to decide whether or not to start the 
background uploader. This is basically because we make a blocking API call to 
the MDS in the GUI thread in DataConnectionListener. If the phone has a data 
connection and the MDS is down (or it's address is typed incorrectly), then 
the request will take the default timeout period and block the GUI thread, 
which leads to an ANR. 

Original issue reported on code.google.com by russelljryan on 1 Mar 2010 at 5:58

GoogleCodeExporter commented 9 years ago
I just fixed this by switching the validate calls to be done in a thread.

Original comment by russelljryan on 1 Mar 2010 at 8:06