mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Remove unused code from the app (#3276)
This commit is contained in:
parent
bb0a21929e
commit
2f9a71911a
27 changed files with 49 additions and 610 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue