1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-02 08:35:08 -04:00

Start services and list folders after account has been activated

This commit is contained in:
cketti 2011-10-18 05:06:32 +02:00
parent dd8cd33c5a
commit 4d6946f47c

View File

@ -15,6 +15,7 @@ import java.util.concurrent.ConcurrentHashMap;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Application;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.ContentResolver;
@ -813,6 +814,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
private String mIncomingPassword;
private String mOutgoingPassword;
private List<Account> mRemainingAccounts;
private Application mApplication;
protected SetPasswordsAsyncTask(Activity activity, Account account,
String incomingPassword, String outgoingPassword,
@ -822,6 +824,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
mIncomingPassword = incomingPassword;
mOutgoingPassword = outgoingPassword;
mRemainingAccounts = remainingAccounts;
mApplication = mActivity.getApplication();
}
@Override
@ -857,6 +860,12 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
// Save the account settings
mAccount.save(Preferences.getPreferences(mContext));
// Start services if necessary
K9.setServicesEnabled(mContext);
// Get list of folders from remote server
MessagingController.getInstance(mApplication).listFolders(mAccount, true, null);
} catch (Exception e) {
Log.e(K9.LOG_TAG, "Something went while setting account passwords", e);
}