Merge "Fix all NoSuchMethodErrors"

This commit is contained in:
Makoto Onuki 2011-07-01 12:48:02 -07:00 committed by Android (Google) Code Review
commit 6a712721b1
8 changed files with 26 additions and 6 deletions

View File

@ -17,6 +17,7 @@
package com.android.emailcommon.mail;
import com.android.emailcommon.service.SearchParams;
import com.google.common.annotations.VisibleForTesting;
public abstract class Folder {
@ -76,6 +77,7 @@ public abstract class Folder {
* @return True if further commands are not expected to have to open the
* connection.
*/
@VisibleForTesting
public abstract boolean isOpen();
/**

View File

@ -32,6 +32,7 @@ import android.os.RemoteException;
import com.android.emailcommon.utility.TextUtilities;
import com.android.emailcommon.utility.Utility;
import com.google.common.annotations.VisibleForTesting;
import java.io.File;
import java.util.ArrayList;
@ -376,6 +377,7 @@ public abstract class EmailContent {
}
}
@VisibleForTesting
public static long restoreBodySourceKey(Context context, long messageId) {
return Utility.getFirstRowLong(context, Body.CONTENT_URI,
Body.PROJECTION_SOURCE_KEY,

View File

@ -30,6 +30,7 @@ import android.os.RemoteException;
import android.util.Log;
import com.android.emailcommon.utility.Utility;
import com.google.common.annotations.VisibleForTesting;
import java.util.ArrayList;
@ -153,6 +154,7 @@ public final class Policy extends EmailContent implements EmailContent.PolicyCol
/**
* Convenience method for {@link #setAccountPolicy(Context, Account, Policy, String)}.
*/
@VisibleForTesting
public static void setAccountPolicy(Context context, long accountId, Policy policy,
String securitySyncKey) {
setAccountPolicy(context, Account.restoreAccountWithId(context, accountId),

View File

@ -16,6 +16,8 @@
package com.android.emailcommon.utility;
import com.google.common.annotations.VisibleForTesting;
import android.content.Context;
import android.net.SSLCertificateSocketFactory;
import android.security.KeyChain;
@ -80,6 +82,7 @@ public class SSLUtils {
*
* This does not ensure that the first character is a letter (which is required by the RFC).
*/
@VisibleForTesting
public static String escapeForSchemeName(String s) {
// According to the RFC, scheme names are case-insensitive.
s = s.toLowerCase();

View File

@ -16,6 +16,8 @@
package com.android.emailcommon.utility;
import com.google.common.annotations.VisibleForTesting;
import android.graphics.Color;
import android.text.Spannable;
import android.text.SpannableString;
@ -509,6 +511,7 @@ public class TextUtilities {
* @param query the search terms
* @return HTML text with the search terms highlighted
*/
@VisibleForTesting
public static String highlightTermsInHtml(String text, String query) {
try {
return highlightTerms(text, query, true).toString();

View File

@ -577,6 +577,7 @@ public class AccountSelectorAdapter extends CursorAdapter {
return mAccountCount;
}
@VisibleForTesting
public int getRecentMailboxCount() {
return mRecentCount;
}
@ -597,6 +598,7 @@ public class AccountSelectorAdapter extends CursorAdapter {
return mAccountDisplayName;
}
@VisibleForTesting
public long getMailboxId() {
return mMailboxId;
}

View File

@ -395,6 +395,7 @@ class ImapFolder extends Folder {
}
@Override
@VisibleForTesting
public Message getMessage(String uid) throws MessagingException {
checkOpen();
@ -413,6 +414,7 @@ class ImapFolder extends Folder {
* TODO: Properly quote the filter
*/
@Override
@VisibleForTesting
public Message[] getMessages(SearchParams params, MessageRetrievalListener listener)
throws MessagingException {
String filter = params.mFilter;
@ -432,6 +434,7 @@ class ImapFolder extends Folder {
}
@Override
@VisibleForTesting
public Message[] getMessages(int start, int end, MessageRetrievalListener listener)
throws MessagingException {
if (start < 1 || end < 1 || end < start) {
@ -442,6 +445,7 @@ class ImapFolder extends Folder {
}
@Override
@VisibleForTesting
public Message[] getMessages(String[] uids, MessageRetrievalListener listener)
throws MessagingException {
if (uids == null) {

View File

@ -40,6 +40,7 @@ import com.android.emailcommon.service.EmailServiceProxy;
import com.android.emailcommon.service.SearchParams;
import com.android.emailcommon.utility.LoggingInputStream;
import com.android.emailcommon.utility.Utility;
import com.google.common.annotations.VisibleForTesting;
import java.io.IOException;
import java.io.InputStream;
@ -932,6 +933,7 @@ public class Pop3Store extends Store {
}
@Override
@VisibleForTesting
public boolean isOpen() {
return mTransport.isOpen();
}