Revert "Convert Controller to a full service"
This reverts commit 0e6d972641
.
Change-Id: I005fc34152396806468edef919a3620961ddb4fe
This commit is contained in:
parent
2027b29d40
commit
c184f36c2d
@ -277,10 +277,9 @@
|
||||
>
|
||||
</service>
|
||||
|
||||
<!-- Controller runs at all times -->
|
||||
--><service
|
||||
<service
|
||||
android:name=".Controller"
|
||||
android:enabled="true"
|
||||
android:enabled="false"
|
||||
>
|
||||
</service>
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.email;
|
||||
|
||||
import com.android.email.activity.Debug;
|
||||
import com.android.email.mail.AuthenticationFailedException;
|
||||
import com.android.email.mail.MessagingException;
|
||||
import com.android.email.mail.Store;
|
||||
@ -34,7 +33,6 @@ import com.android.email.provider.EmailContent.MessageColumns;
|
||||
import com.android.email.service.EmailServiceStatus;
|
||||
import com.android.email.service.IEmailService;
|
||||
import com.android.email.service.IEmailServiceCallback;
|
||||
import com.android.email.service.MailService;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.ContentResolver;
|
||||
@ -66,9 +64,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
public class Controller extends Service {
|
||||
private static final String TAG = "Controller";
|
||||
private static Controller sInstance;
|
||||
private Context mContext;
|
||||
private final Context mContext;
|
||||
private Context mProviderContext;
|
||||
private MessagingController mLegacyController;
|
||||
private final MessagingController mLegacyController;
|
||||
private final LegacyListener mLegacyListener = new LegacyListener();
|
||||
private final ServiceCallback mServiceCallback = new ServiceCallback();
|
||||
private final HashSet<Result> mListeners = new HashSet<Result>();
|
||||
@ -107,31 +105,11 @@ public class Controller extends Service {
|
||||
private static RemoteCallbackList<IEmailServiceCallback> sCallbackList =
|
||||
new RemoteCallbackList<IEmailServiceCallback>();
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
sInstance = this;
|
||||
mContext = getApplicationContext();
|
||||
mProviderContext = mContext;
|
||||
protected Controller(Context _context) {
|
||||
mContext = _context.getApplicationContext();
|
||||
mProviderContext = _context;
|
||||
mLegacyController = MessagingController.getInstance(mProviderContext, this);
|
||||
mLegacyController.addListener(mLegacyListener);
|
||||
// Tie MailRefreshManager to the Controller.
|
||||
RefreshManager.getInstance(this);
|
||||
// Reset all accounts to default visible window
|
||||
resetVisibleLimits();
|
||||
// Enable logging in the EAS service, so it starts up as early as possible.
|
||||
Debug.updateLoggingFlags(this);
|
||||
MailService.actionReschedule(this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
sInstance = null;
|
||||
Log.d(TAG, "Controller.onDestroy()");
|
||||
}
|
||||
|
||||
public static Controller getInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -144,6 +122,39 @@ public class Controller extends Service {
|
||||
mLegacyController.removeListener(mLegacyListener);
|
||||
}
|
||||
|
||||
/**
|
||||
* As a Service, Controller needs this no-argument constructor, but only because there is
|
||||
* another constructor defined for the class. In the typical case for a Service, there are
|
||||
* no defined constructors, so the default constructor is used when the Service is instantiated
|
||||
* by ServiceManager (initialization would be performed in onCreate or onStartCommand, etc.)
|
||||
*
|
||||
* Because of this, the Controller Service, when bound, creates a second instance of the class,
|
||||
* i.e. in addition to the "singleton" created/returned by getInstance. This is unfortunate,
|
||||
* but not disruptive, as the Service Controller instance references members of sInstance (the
|
||||
* previously-singleton Controller); it's perhaps best to think of the Service instance as a
|
||||
* delegate.
|
||||
*
|
||||
* TODO: Have Controller behave more like a real Service. This means that the lifecycle of
|
||||
* the Service (and thus the singleton instance) should be managed by ServiceManager (as happens
|
||||
* with AttachmentDownloadService and MailService), its initialization should be handled in
|
||||
* onCreate(), etc. When this is done (and it should be relatively simple), we will be back
|
||||
* to a true singleton
|
||||
*/
|
||||
public Controller() {
|
||||
mContext = mProviderContext = this;
|
||||
mLegacyController = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets or creates the singleton instance of Controller.
|
||||
*/
|
||||
public synchronized static Controller getInstance(Context _context) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new Controller(_context);
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject a mock controller. Used only for testing. Affects future calls to getInstance().
|
||||
*
|
||||
|
@ -17,6 +17,7 @@
|
||||
package com.android.email;
|
||||
|
||||
import com.android.email.activity.AccountShortcutPicker;
|
||||
import com.android.email.activity.Debug;
|
||||
import com.android.email.activity.MessageCompose;
|
||||
import com.android.email.provider.EmailContent;
|
||||
import com.android.email.service.AttachmentDownloadService;
|
||||
@ -28,9 +29,11 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class Email extends Application {
|
||||
public static final String LOG_TAG = "Email";
|
||||
@ -263,11 +266,7 @@ public class Email extends Application {
|
||||
* And now if accounts do exist then we've just enabled the service and we want to
|
||||
* schedule alarms for the new accounts.
|
||||
*/
|
||||
// If this is running at start-up, Controller might not be running as a Service yet
|
||||
// In this case, ignore - when it starts, it will call MailService.actionReschedule()
|
||||
if (Controller.getInstance() != null) {
|
||||
MailService.actionReschedule(context);
|
||||
}
|
||||
MailService.actionReschedule(context);
|
||||
}
|
||||
// Start/stop the AttachmentDownloadService, depending on whether there are any accounts
|
||||
Intent intent = new Intent(context, AttachmentDownloadService.class);
|
||||
@ -276,7 +275,6 @@ public class Email extends Application {
|
||||
} else {
|
||||
context.stopService(intent);
|
||||
}
|
||||
context.startService(new Intent(context, Controller.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -285,6 +283,14 @@ public class Email extends Application {
|
||||
Preferences prefs = Preferences.getPreferences(this);
|
||||
DEBUG = prefs.getEnableDebugLogging();
|
||||
setTempDirectory(this);
|
||||
|
||||
// Tie MailRefreshManager to the Controller.
|
||||
RefreshManager.getInstance(this);
|
||||
// Reset all accounts to default visible window
|
||||
Controller.getInstance(this).resetVisibleLimits();
|
||||
|
||||
// Enable logging in the EAS service, so it starts up as early as possible.
|
||||
Debug.updateLoggingFlags(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,8 +17,10 @@
|
||||
package com.android.email;
|
||||
|
||||
import com.android.email.mail.MessagingException;
|
||||
import com.android.email.provider.EmailContent;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
@ -151,7 +153,7 @@ public class RefreshManager {
|
||||
*/
|
||||
public static synchronized RefreshManager getInstance(Context context) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new RefreshManager(context, Controller.getInstance(),
|
||||
sInstance = new RefreshManager(context, Controller.getInstance(context),
|
||||
Clock.INSTANCE, new Handler());
|
||||
}
|
||||
return sInstance;
|
||||
|
@ -106,7 +106,7 @@ public class AccountFolderList extends Activity implements AccountFolderListFrag
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
Controller.getInstance().removeResultCallback(mControllerCallback);
|
||||
Controller.getInstance(getApplication()).removeResultCallback(mControllerCallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -117,7 +117,7 @@ public class AccountFolderList extends Activity implements AccountFolderListFrag
|
||||
getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
notifMgr.cancel(1);
|
||||
|
||||
Controller.getInstance().addResultCallback(mControllerCallback);
|
||||
Controller.getInstance(getApplication()).addResultCallback(mControllerCallback);
|
||||
|
||||
// Exit immediately if the accounts list has changed (e.g. externally deleted)
|
||||
if (Email.getNotifyUiAccountsChanged()) {
|
||||
@ -150,7 +150,7 @@ public class AccountFolderList extends Activity implements AccountFolderListFrag
|
||||
Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
showProgressIcon(true);
|
||||
Controller.getInstance().updateMailboxList(accountId);
|
||||
Controller.getInstance(getApplication()).updateMailboxList(accountId);
|
||||
// TODO update the inbox too
|
||||
}
|
||||
}
|
||||
@ -214,7 +214,7 @@ public class AccountFolderList extends Activity implements AccountFolderListFrag
|
||||
Account.CONTENT_URI, null, null);
|
||||
mListFragment.hideDeletingAccount(mSelectedContextAccount.mId);
|
||||
|
||||
Controller.getInstance().deleteAccount(
|
||||
Controller.getInstance(AccountFolderList.this).deleteAccount(
|
||||
mSelectedContextAccount.mId);
|
||||
if (numAccounts == 1) {
|
||||
AccountSetupBasics.actionNewAccount(AccountFolderList.this);
|
||||
|
@ -38,14 +38,14 @@ import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.CursorAdapter;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
|
||||
public class AccountFolderListFragment extends ListFragment
|
||||
implements OnItemClickListener, AccountsAdapter.Callback {
|
||||
@ -139,7 +139,7 @@ public class AccountFolderListFragment extends ListFragment
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
Controller.getInstance().addResultCallback(mControllerCallback);
|
||||
Controller.getInstance(mActivity).addResultCallback(mControllerCallback);
|
||||
updateAccounts();
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ public class AccountFolderListFragment extends ListFragment
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
Controller.getInstance().removeResultCallback(mControllerCallback);
|
||||
Controller.getInstance(mActivity).removeResultCallback(mControllerCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,7 +88,7 @@ public final class ActivityHelper {
|
||||
}
|
||||
|
||||
public static void deleteMessage(Activity activity, long messageId) {
|
||||
Controller.getInstance().deleteMessage(messageId, -1);
|
||||
Controller.getInstance(activity).deleteMessage(messageId, -1);
|
||||
Utility.showToast(activity,
|
||||
activity.getResources().getQuantityString(R.plurals.message_deleted_toast, 1));
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class Debug extends Activity implements OnCheckedChangeListener {
|
||||
int exchangeLogging = prefs.getEnableExchangeLogging() ? Eas.DEBUG_EXCHANGE_BIT : 0;
|
||||
int fileLogging = prefs.getEnableExchangeFileLogging() ? Eas.DEBUG_FILE_BIT : 0;
|
||||
int debugBits = debugLogging | exchangeLogging | fileLogging;
|
||||
Controller.getInstance().serviceLogging(debugBits);
|
||||
Controller.getInstance(context).serviceLogging(debugBits);
|
||||
//EXCHANGE-REMOVE-SECTION-END
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class MailboxFinder {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
mContext = context.getApplicationContext();
|
||||
mController = Controller.getInstance();
|
||||
mController = Controller.getInstance(context);
|
||||
mAccountId = accountId;
|
||||
mMailboxType = mailboxType;
|
||||
mCallback = callback;
|
||||
|
@ -117,7 +117,7 @@ public class MailboxList extends Activity implements MailboxListFragment.Callbac
|
||||
if (result == null) {
|
||||
return;
|
||||
}
|
||||
final String accountName = result[0];
|
||||
final String accountName = (String) result[0];
|
||||
// accountName is null if account name can't be retrieved or query exception
|
||||
if (accountName == null) {
|
||||
// something is wrong with this account
|
||||
@ -134,13 +134,13 @@ public class MailboxList extends Activity implements MailboxListFragment.Callbac
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
Controller.getInstance().removeResultCallback(mControllerCallback);
|
||||
Controller.getInstance(getApplication()).removeResultCallback(mControllerCallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
Controller.getInstance().addResultCallback(mControllerCallback);
|
||||
Controller.getInstance(getApplication()).addResultCallback(mControllerCallback);
|
||||
|
||||
// Exit immediately if the accounts list has changed (e.g. externally deleted)
|
||||
if (Email.getNotifyUiAccountsChanged()) {
|
||||
@ -211,7 +211,7 @@ public class MailboxList extends Activity implements MailboxListFragment.Callbac
|
||||
* Refresh the mailbox list
|
||||
*/
|
||||
private void onRefresh() {
|
||||
Controller controller = Controller.getInstance();
|
||||
Controller controller = Controller.getInstance(getApplication());
|
||||
showProgressIcon(true);
|
||||
mListFragment.onRefresh();
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
|
||||
setContentView(R.layout.message_compose);
|
||||
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.list_title);
|
||||
|
||||
mController = Controller.getInstance();
|
||||
mController = Controller.getInstance(getApplication());
|
||||
initViews();
|
||||
setDraftNeedsSaving(false);
|
||||
|
||||
|
@ -46,8 +46,8 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.Animation.AnimationListener;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
@ -69,7 +69,7 @@ public class MessageList extends Activity implements OnClickListener,
|
||||
private Button mDeleteButton;
|
||||
private TextView mErrorBanner;
|
||||
|
||||
private final Controller mController = Controller.getInstance();
|
||||
private final Controller mController = Controller.getInstance(getApplication());
|
||||
private ControllerResultUiThreadWrapper<ControllerResults> mControllerCallback;
|
||||
|
||||
private TextView mLeftTitle;
|
||||
@ -386,7 +386,6 @@ public class MessageList extends Activity implements OnClickListener,
|
||||
*
|
||||
* @deprecated not used any longer. remove them.
|
||||
*/
|
||||
@Deprecated
|
||||
public void onSelectionChanged() {
|
||||
showMultiPanel(mListFragment.getSelectedCount() > 0);
|
||||
}
|
||||
@ -395,7 +394,6 @@ public class MessageList extends Activity implements OnClickListener,
|
||||
* @deprecated not used any longer. remove them. (with associated resources, strings,
|
||||
* members, etc)
|
||||
*/
|
||||
@Deprecated
|
||||
private void updateFooterButtonNames () {
|
||||
// Show "unread_action" when one or more read messages are selected.
|
||||
if (mListFragment.doesSelectionContainReadMessage()) {
|
||||
@ -416,7 +414,6 @@ public class MessageList extends Activity implements OnClickListener,
|
||||
*
|
||||
* @deprecated not used any longer. remove them.
|
||||
*/
|
||||
@Deprecated
|
||||
private void showMultiPanel(boolean show) {
|
||||
if (show && mMultiSelectPanel.getVisibility() != View.VISIBLE) {
|
||||
mMultiSelectPanel.setVisibility(View.VISIBLE);
|
||||
|
@ -42,15 +42,15 @@ import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.AdapterView.OnItemLongClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.AdapterView.OnItemLongClickListener;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.HashSet;
|
||||
@ -161,7 +161,7 @@ public class MessageListFragment extends ListFragment
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
mActivity = getActivity();
|
||||
mController = Controller.getInstance();
|
||||
mController = Controller.getInstance(mActivity);
|
||||
mRefreshManager = RefreshManager.getInstance(mActivity);
|
||||
mRefreshManager.registerListener(mRefreshListener);
|
||||
}
|
||||
|
@ -20,7 +20,11 @@ import com.android.email.Controller;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Browser;
|
||||
|
||||
/**
|
||||
* Base class for {@link MessageView} and {@link MessageFileView}.
|
||||
@ -62,7 +66,7 @@ public abstract class MessageViewBase extends Activity implements MessageViewFra
|
||||
mFetchAttachmentProgressDialog.setIndeterminate(true);
|
||||
mFetchAttachmentProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
|
||||
mController = Controller.getInstance();
|
||||
mController = Controller.getInstance(getApplication());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -210,7 +210,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
|
||||
mDateFormat = android.text.format.DateFormat.getDateFormat(mContext); // short format
|
||||
mTimeFormat = android.text.format.DateFormat.getTimeFormat(mContext); // 12/24 date format
|
||||
|
||||
mController = Controller.getInstance();
|
||||
mController = Controller.getInstance(mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -206,7 +206,7 @@ public class MailService extends Service {
|
||||
this.mStartId = startId;
|
||||
String action = intent.getAction();
|
||||
|
||||
mController = Controller.getInstance();
|
||||
mController = Controller.getInstance(this);
|
||||
mController.addResultCallback(mControllerCallback);
|
||||
mContentResolver = getContentResolver();
|
||||
|
||||
@ -336,7 +336,7 @@ public class MailService extends Service {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
Controller.getInstance().removeResultCallback(mControllerCallback);
|
||||
Controller.getInstance(getApplication()).removeResultCallback(mControllerCallback);
|
||||
// Unregister our account listener
|
||||
if (mAccountsUpdatedListener != null) {
|
||||
AccountManager.get(this).removeOnAccountsUpdatedListener(mAccountsUpdatedListener);
|
||||
|
@ -96,7 +96,7 @@ public class PopImapSyncAdapterService extends Service {
|
||||
Mailbox.TYPE_INBOX);
|
||||
if (mailboxId > 0) {
|
||||
Log.d(TAG, "Starting manual sync for account " + emailAddress);
|
||||
Controller.getInstance().updateMailbox(accountId, mailboxId);
|
||||
Controller.getInstance(context).updateMailbox(accountId, mailboxId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,13 +17,13 @@
|
||||
package com.android.email;
|
||||
|
||||
import com.android.email.provider.EmailContent;
|
||||
import com.android.email.provider.EmailProvider;
|
||||
import com.android.email.provider.ProviderTestUtils;
|
||||
import com.android.email.provider.EmailContent.Account;
|
||||
import com.android.email.provider.EmailContent.Body;
|
||||
import com.android.email.provider.EmailContent.HostAuth;
|
||||
import com.android.email.provider.EmailContent.Mailbox;
|
||||
import com.android.email.provider.EmailContent.Message;
|
||||
import com.android.email.provider.EmailProvider;
|
||||
import com.android.email.provider.ProviderTestUtils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
@ -72,7 +72,7 @@ public class ControllerProviderOpsTests extends ProviderTestCase2<EmailProvider>
|
||||
public static class TestController extends Controller {
|
||||
|
||||
protected TestController(Context providerContext, Context systemContext) {
|
||||
super();
|
||||
super(systemContext);
|
||||
setProviderContext(providerContext);
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,9 @@
|
||||
package com.android.email;
|
||||
|
||||
import com.android.email.mail.MessagingException;
|
||||
import com.android.email.provider.EmailContent.Account;
|
||||
import com.android.email.provider.EmailProvider;
|
||||
import com.android.email.provider.ProviderTestUtils;
|
||||
import com.android.email.provider.EmailContent.Account;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
@ -55,7 +55,7 @@ public class RefreshManagerTest extends InstrumentationTestCase {
|
||||
|
||||
mClock = new MockClock();
|
||||
mContext = getInstrumentation().getTargetContext();
|
||||
mController = new MockController();
|
||||
mController = new MockController(mContext);
|
||||
mListener = new RefreshListener();
|
||||
mProviderContext = DBTestHelper.ProviderContextSetupHelper.getProviderContext(
|
||||
mContext, EmailProvider.class);
|
||||
@ -474,8 +474,8 @@ public class RefreshManagerTest extends InstrumentationTestCase {
|
||||
public volatile boolean mCalledUpdateMailboxList;
|
||||
public volatile Result mListener;
|
||||
|
||||
protected MockController() {
|
||||
super();
|
||||
protected MockController(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
|
@ -22,10 +22,10 @@ import com.android.email.Email;
|
||||
import com.android.email.TestUtils;
|
||||
import com.android.email.mail.MessagingException;
|
||||
import com.android.email.provider.EmailContent;
|
||||
import com.android.email.provider.EmailProvider;
|
||||
import com.android.email.provider.ProviderTestUtils;
|
||||
import com.android.email.provider.EmailContent.Account;
|
||||
import com.android.email.provider.EmailContent.Mailbox;
|
||||
import com.android.email.provider.EmailProvider;
|
||||
import com.android.email.provider.ProviderTestUtils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
@ -337,7 +337,7 @@ public class MailboxFinderTest extends InstrumentationTestCase {
|
||||
}
|
||||
|
||||
protected MockController(Context context) {
|
||||
super();
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -163,7 +163,7 @@ public class MailServiceTests extends AccountTestCase {
|
||||
public static class TestController extends Controller {
|
||||
|
||||
protected TestController(Context providerContext, Context systemContext) {
|
||||
super();
|
||||
super(systemContext);
|
||||
setProviderContext(providerContext);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user