Remove unused code from the app (#3276)

This commit is contained in:
Vivek Maskara 2019-12-05 18:07:21 +05:30 committed by Ashish Kumar
parent bb0a21929e
commit 2f9a71911a
27 changed files with 49 additions and 610 deletions

View file

@ -10,7 +10,6 @@ import timber.log.Timber;
public class AccountUtil {
public static final String AUTH_COOKIE = "authCookie";
public static final String AUTH_TOKEN_TYPE = "CommonsAndroid";
public AccountUtil() {
@ -38,12 +37,6 @@ public class AccountUtil {
return account == null ? null : account.name;
}
@Nullable
public static String getPassword(Context context) {
Account account = account(context);
return account == null ? null : accountManager(context).getPassword(account);
}
private static AccountManager accountManager(Context context) {
return AccountManager.get(context);
}

View file

@ -9,6 +9,7 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -109,16 +110,6 @@ public class WikiAccountAuthenticator extends AbstractAccountAuthenticator {
return bundle;
}
private Bundle unsupportedOperation() {
Bundle bundle = new Bundle();
bundle.putInt(AccountManager.KEY_ERROR_CODE, AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION);
// HACK: the docs indicate that this is a required key bit it's not displayed to the user.
bundle.putString(AccountManager.KEY_ERROR_MESSAGE, "");
return bundle;
}
@Override
public Bundle getAccountRemovalAllowed(AccountAuthenticatorResponse response,
Account account) throws NetworkErrorException {