app/src/main/java/fr/free/nrw/commons/auth/SessionManager.java
public Completable logout() {
        AccountManager accountManager = AccountManager.get(context);
        Account[] allAccounts = accountManager.getAccountsByType(BuildConfig.ACCOUNT_TYPE);
        return Completable.fromObservable(Observable.fromArray(allAccounts)
                .map(a -> accountManager.removeAccount(a, null, null).getResult()))
                .doOnComplete(() -> {
                    mediaWikiApi.logout();
                    currentAccount = null;
                });
    }
/**
     * 1. Clears existing accounts from account manager
     * 2. Calls MediaWikiApi's logout function to clear cookies
     * @return
     */
1. Clears existing accounts from account manager
2. Calls MediaWikiApi's logout function to clear cookies
@return
1 . Clears existing accounts from account manager 2 . Calls MediaWikiApi ' s logout function to clear cookies @return
public Completable logout() {
        AccountManager accountManager = AccountManager.get(context);
        Account[] allAccounts = accountManager.getAccountsByType(BuildConfig.ACCOUNT_TYPE);
        return Completable.fromObservable(Observable.fromArray(allAccounts)
                .map(a -> accountManager.removeAccount(a, null, null).getResult()))
                .doOnComplete(() -> {
                    mediaWikiApi.logout();
                    currentAccount = null;
                });
    }
public Completable logout ( ) { AccountManager accountManager = AccountManager . get ( context ) ; Account [ ] allAccounts = accountManager . getAccountsByType ( BuildConfig . ACCOUNT_TYPE ) ; return Completable . fromObservable ( Observable . fromArray ( allAccounts ) . map ( a -> accountManager . removeAccount ( a , null , null ) . getResult ( ) ) ) . doOnComplete ( ( ) -> { mediaWikiApi . logout ( ) ; currentAccount = null ; } ) ; }
1.
1 .