Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions app/src/main/java/com/github/mobile/accounts/LoginActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ protected List<User> run(Account account) throws Exception {
return cache.getOrgs(true);
}
}
private boolean isLoggingOut;

private AccountManager accountManager;

Expand Down Expand Up @@ -284,6 +285,30 @@ public void startActivity(Intent intent) {
super.startActivity(intent);
}

public static class LogOut {
private static LogOut logOut;

private boolean isLoggingOut;

private LogOut() {
}

public static LogOut getLogOut() {
if (logOut == null) {
logOut = new LogOut();
}
return logOut;
}

public boolean isLoggingOut() {
return isLoggingOut;
}

public void setLoggingOut(boolean isLoggingOut) {
this.isLoggingOut = isLoggingOut;
}
}

/**
* Authenticate login & password
*/
Expand Down Expand Up @@ -391,6 +416,10 @@ protected void finishConfirmCredentials(boolean result) {
setAccountAuthenticatorResult(intent.getExtras());
setResult(RESULT_OK, intent);
finish();

Intent logOutIntent = new Intent(this, LoginActivity.class);
startActivity(intent);
finish();
}

/**
Expand Down