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