1 /* 2 * Copyright (C) 2009 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.email.mail.store; 18 19 import android.content.Context; 20 21 import com.android.email.mail.Store; 22 import com.android.email.service.EmailServiceUtils; 23 import com.android.emailcommon.mail.MessagingException; 24 import com.android.emailcommon.provider.Account; 25 import com.android.emailcommon.service.IEmailService; 26 27 /** 28 * Our Exchange service does not use the sender/store model. 29 */ 30 public class ExchangeStore extends ServiceStore { 31 32 /** 33 * Static named constructor. 34 */ 35 public static Store newInstance(Account account, Context context) throws MessagingException { 36 return new ExchangeStore(account, context); 37 } 38 39 /** 40 * Creates a new store for the given account. 41 */ 42 public ExchangeStore(Account account, Context context) throws MessagingException { 43 super(account, context); 44 } 45 46 @Override 47 public Class<? extends android.app.Activity> getSettingActivityClass() { 48 return com.android.email.activity.setup.AccountSetupExchange.class; 49 } 50 51 @Override 52 protected IEmailService getService() { 53 return EmailServiceUtils.getExchangeService(mContext, null); 54 } 55 } 56