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

Commit 4b1dc23e authored by cketti's avatar cketti
Browse files

Remove unused code from `OAuth2TokenProvider`

parent a5b9cea5
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
@@ -3,8 +3,6 @@ package com.fsck.k9.mail.oauth;

import java.util.List;

import android.app.Activity;

import com.fsck.k9.mail.AuthenticationFailedException;


@@ -20,18 +18,6 @@ public interface OAuth2TokenProvider {
     */
    List<String> getAccounts();

    /**
     * Request API authorization. This is a foreground action that may produce a dialog to interact with.
     *
     * @param username
     *         Username
     * @param activity
     *         The responsible activity
     * @param callback
     *         A callback to process the asynchronous response
     */
    void authorizeApi(String username, Activity activity, OAuth2TokenProviderAuthCallback callback);

    /**
     * Fetch a token. No guarantees are provided for validity.
     */
@@ -47,14 +33,4 @@ public interface OAuth2TokenProvider {
     * Invalidating a token and then failure with a new token should be treated as a permanent failure.
     */
    void invalidateToken(String username);


    /**
     * Provides an asynchronous response to an
     * {@link OAuth2TokenProvider#authorizeApi(String, Activity, OAuth2TokenProviderAuthCallback)} request.
     */
    interface OAuth2TokenProviderAuthCallback {
        void success();
        void failure(AuthorizationException e);
    }
}
+0 −6
Original line number Diff line number Diff line
@@ -5,8 +5,6 @@ import java.io.IOException;
import java.net.UnknownHostException;
import java.util.List;

import android.app.Activity;

import com.fsck.k9.mail.AuthType;
import com.fsck.k9.mail.AuthenticationFailedException;
import com.fsck.k9.mail.CertificateValidationException;
@@ -1070,10 +1068,6 @@ public class RealImapConnectionTest {
                throw new UnsupportedOperationException();
            }

            @Override
            public void authorizeApi(String username, Activity activity, OAuth2TokenProviderAuthCallback callback) {
                throw new UnsupportedOperationException();
            }
        };
    }
}