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.transport; 18 19 import com.android.email.mail.Sender; 20 import com.android.emailcommon.mail.MessagingException; 21 import com.android.emailcommon.provider.Account; 22 23 import android.content.Context; 24 25 /** 26 * Our Exchange service does not use the sender/store model. This class exists for exactly one 27 * purpose, which is to return "null" for getSettingActivityClass(). 28 */ 29 public class ExchangeSender extends Sender { 30 31 /** 32 * Factory method. 33 */ 34 public static Sender newInstance(Account account, Context context) throws MessagingException { 35 return new ExchangeSender(context, account); 36 } 37 38 private ExchangeSender(Context context, Account account) { 39 } 40 41 @Override 42 public void close() { 43 } 44 45 @Override 46 public void open() { 47 } 48 49 @Override 50 public void sendMessage(long messageId) { 51 } 52 53 /** 54 * Get class of SettingActivity for this Sender class. 55 * @return Activity class that has class method actionEditOutgoingSettings(), or null if 56 * outgoing settings should not be presented (e.g. they're handled by the incoming settings 57 * screen). 58 */ 59 @Override 60 public Class<? extends android.app.Activity> getSettingActivityClass() { 61 return null; 62 } 63 64 } 65