Utils.processCommand(this, toNonNull(words[0]), args, toNonNull(address));
}
- if(longPollThread == null || !longPollThread.isAlive()){
+ final String user=PreferenceManager.getDefaultSharedPreferences(this).getString("username", null);
+ final String password=PreferenceManager.getDefaultSharedPreferences(this).getString("password", null);
+ final boolean has_user_pass = user != null && password != null && user.length() > 0 && password.length() > 0;
+ if((longPollThread == null || !longPollThread.isAlive()) && has_user_pass){
longPollThread = new Thread(new LongPollRunnable());
longPollThread.start();
}