android: improved logging information on rpc failure, releated issue #1323

This commit is contained in:
Joachim Fritzsch 2013-08-13 13:28:37 +02:00
parent 84c5bd353d
commit 11db1b9741
1 changed files with 10 additions and 1 deletions

View File

@ -393,7 +393,16 @@ public class Monitor extends Service {
// Update status bar notification
ClientNotification.getInstance(getApplicationContext()).update();
} else {
if(Logging.ERROR) Log.e(Logging.TAG, "readClientStatus(): connection problem");
String nullValues = "";
try{
if(status == null) nullValues += "status,";
if(state == null) nullValues += "state,";
if(state.results == null) nullValues += "state.results,";
if(state.projects == null) nullValues += "state.projects,";
if(transfers == null) nullValues += "transfers,";
if(state.host_info == null) nullValues += "state.host_info,";
} catch (NullPointerException e) {};
if(Logging.ERROR) Log.e(Logging.TAG, "readClientStatus(): connection problem, null: " + nullValues);
}
// check whether monitor is still intended to update, if not, skip broadcast and exit...