Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 8b590d80 authored by David Luhmer's avatar David Luhmer Committed by GitHub
Browse files

Merge pull request #47 from nextcloud/fix-for-deck

Fix for deck
parents 3dff5631 dcafaacb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ public class AccountImporter {
        if (appInstalledOrNot(fragment.getContext(), "com.nextcloud.client")) {

            // Clear all tokens first to prevent some caching issues..
            clearAllAuthTokens(fragment.getContext());
            //clearAllAuthTokens(fragment.getContext());

            Intent intent = AccountManager.newChooseAccountIntent(null, null, new String[]{"nextcloud"},
                    true, null, null, null, null);
+3 −3
Original line number Diff line number Diff line
@@ -29,14 +29,14 @@ import com.nextcloud.android.sso.model.SingleSignOnAccount;

public final class SingleAccountHelper {

    private static final String PREF_SINGLE_ACCOUNT_STRING = "PREF_ACCOUNT_STRING";
    private static final String PREF_CURRENT_ACCOUNT_STRING = "PREF_CURRENT_ACCOUNT_STRING";

    private SingleAccountHelper() {
    }

    private static String getCurrentAccountName(Context context) throws NoCurrentAccountSelectedException {
        SharedPreferences mPrefs = AccountImporter.getSharedPreferences(context);
        String accountName = mPrefs.getString(PREF_SINGLE_ACCOUNT_STRING, null);
        String accountName = mPrefs.getString(PREF_CURRENT_ACCOUNT_STRING, null);
        if (accountName == null) {
            throw new NoCurrentAccountSelectedException();
        }
@@ -50,6 +50,6 @@ public final class SingleAccountHelper {

    public static void setCurrentAccount(Context context, String accountName) {
        SharedPreferences mPrefs = AccountImporter.getSharedPreferences(context);
        mPrefs.edit().putString(PREF_SINGLE_ACCOUNT_STRING, accountName).commit();
        mPrefs.edit().putString(PREF_CURRENT_ACCOUNT_STRING, accountName).commit();
    }
}