removed unused code
This commit is contained in:
parent
b5bbae90d5
commit
907d377b9e
|
@ -31,21 +31,15 @@ import android.os.Bundle;
|
|||
import android.os.ParcelFileDescriptor;
|
||||
import android.support.annotation.IntDef;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import org.mariotaku.twidere.model.ComposingStatus;
|
||||
import org.mariotaku.twidere.model.ParcelableCredentials;
|
||||
import org.mariotaku.twidere.model.ParcelableCredentialsCursorIndices;
|
||||
import org.mariotaku.twidere.model.ParcelableStatus;
|
||||
import org.mariotaku.twidere.model.ParcelableUser;
|
||||
import org.mariotaku.twidere.model.ParcelableUserList;
|
||||
import org.mariotaku.twidere.model.UserKey;
|
||||
import org.mariotaku.twidere.provider.TwidereDataStore;
|
||||
import org.mariotaku.twidere.provider.TwidereDataStore.Accounts;
|
||||
import org.mariotaku.twidere.provider.TwidereDataStore.DNS;
|
||||
import org.mariotaku.twidere.provider.TwidereDataStore.Permissions;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.net.Inet4Address;
|
||||
|
@ -233,27 +227,6 @@ public final class Twidere implements TwidereConstants {
|
|||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static ParcelableCredentials getCredentials(@NonNull final Context context,
|
||||
@NonNull final UserKey accountId)
|
||||
throws SecurityException {
|
||||
final String selection = Accounts.ACCOUNT_KEY + " = ?";
|
||||
final String[] selectionArgs = {String.valueOf(accountId)};
|
||||
Cursor cur = context.getContentResolver().query(Accounts.CONTENT_URI, Accounts.COLUMNS,
|
||||
selection, selectionArgs, null);
|
||||
if (cur == null) return null;
|
||||
try {
|
||||
if (cur.moveToFirst()) {
|
||||
return ParcelableCredentialsCursorIndices.fromCursor(cur);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
return null;
|
||||
} finally {
|
||||
cur.close();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static int indexOf(String[] input, String find) {
|
||||
for (int i = 0, inputLength = input.length; i < inputLength; i++) {
|
||||
if (find == null) {
|
||||
|
|
Loading…
Reference in New Issue