16 |
17 |
--------------------------------------------------------------------------------
/emailcommon/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/Api.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon;
18 |
19 | /**
20 | * This class will be used for API-related definitions; for now, just the api "level"
21 | *
22 | * Level 1: As shipped in HC/MR1
23 | * Level 2: Adds searchMessages to EmailService
24 | * Level 3: Adds capabilities query
25 | *
26 | */
27 | public class Api {
28 | public static final int LEVEL = 3;
29 | }
30 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/Configuration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon;
18 |
19 | public class Configuration {
20 | // Bundle key for Exchange configuration (boolean value)
21 | public static final String EXCHANGE_CONFIGURATION_USE_ALTERNATE_STRINGS =
22 | "com.android.email.EXCHANGE_CONFIGURATION_USE_ALTERNATE_STRINGS";
23 | }
24 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/Logging.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon;
18 |
19 | import com.android.mail.utils.LogTag;
20 |
21 | public class Logging {
22 | public static final String LOG_TAG = LogTag.getLogTag();
23 |
24 | /**
25 | * Set this to 'true' to enable as much Email logging as possible.
26 | */
27 | public static final boolean LOGD;
28 |
29 | /**
30 | * If this is enabled then logging that normally hides sensitive information
31 | * like passwords will show that information.
32 | */
33 | public static final boolean DEBUG_SENSITIVE;
34 |
35 | /**
36 | * If true, logging regarding UI (such as activity/fragment lifecycle) will be enabled.
37 | *
38 | * TODO rename it to DEBUG_UI.
39 | */
40 | public static final boolean DEBUG_LIFECYCLE;
41 |
42 | static {
43 | // Declare values here to avoid dead code warnings; it means we have some extra
44 | // "if" statements in the byte code that always evaluate to "if (false)"
45 | LOGD = false; // DO NOT CHECK IN WITH TRUE
46 | DEBUG_SENSITIVE = false; // DO NOT CHECK IN WITH TRUE
47 | DEBUG_LIFECYCLE = false; // DO NOT CHECK IN WITH TRUE
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/provider/Account.aidl:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2012 The Android Open Source Project
2 | *
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | package com.android.emailcommon.provider;
17 |
18 | parcelable Account;
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/provider/HostAuth.aidl:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2011 The Android Open Source Project
2 | *
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | package com.android.emailcommon.provider;
17 |
18 | parcelable HostAuth;
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/provider/Policy.aidl:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2011 The Android Open Source Project
2 | *
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | package com.android.emailcommon.provider;
17 |
18 | parcelable Policy;
19 |
20 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/provider/ProviderUnavailableException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon.provider;
18 |
19 | public class ProviderUnavailableException extends RuntimeException {
20 | private static final long serialVersionUID = 1L;
21 | }
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/provider/QuickResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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 |
18 | package com.android.emailcommon.provider;
19 |
20 | import android.net.Uri;
21 |
22 | import com.android.emailcommon.provider.EmailContent.QuickResponseColumns;
23 |
24 | /**
25 | * A user-modifiable message that may be quickly inserted into the body while user is composing
26 | * a message. Tied to a specific account.
27 | */
28 | public abstract class QuickResponse extends EmailContent
29 | implements QuickResponseColumns {
30 | public static final String TABLE_NAME = "QuickResponse";
31 | public static Uri CONTENT_URI;
32 | public static Uri ACCOUNT_ID_URI;
33 |
34 | public static void initQuickResponse() {
35 | CONTENT_URI = Uri.parse(EmailContent.CONTENT_URI + "/quickresponse");
36 | ACCOUNT_ID_URI = Uri.parse(EmailContent.CONTENT_URI + "/quickresponse/account");
37 | }
38 | }
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/service/EmailServiceConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.emailcommon.service;
18 |
19 | public class EmailServiceConstants {
20 | /** "Not responded yet", used ONLY for UI. */
21 | public static final int MEETING_REQUEST_NOT_RESPONDED = 0;
22 | public static final int MEETING_REQUEST_ACCEPTED = 1;
23 | public static final int MEETING_REQUEST_TENTATIVE = 2;
24 | public static final int MEETING_REQUEST_DECLINED = 3;
25 | }
26 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/service/EmailServiceVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 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 | package com.android.emailcommon.service;
17 |
18 | public class EmailServiceVersion {
19 | // Initial version
20 | public static final int L_PLATFORM = 1;
21 |
22 | public static final int CURRENT = L_PLATFORM;
23 |
24 | // For each following version, add a comment explaining what apis where added or removed.
25 | }
26 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/service/HostAuthCompat.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 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 | package com.android.emailcommon.service;
17 |
18 | parcelable HostAuthCompat;
19 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/service/IAccountService.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon.service;
18 |
19 | import android.os.Bundle;
20 |
21 | interface IAccountService {
22 | int getAccountColor(long accountId);
23 |
24 | Bundle getConfigurationData(String accountType);
25 |
26 | String getDeviceId();
27 | }
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/service/IPolicyService.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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 | package com.android.emailcommon.service;
17 |
18 | import com.android.emailcommon.provider.Policy;
19 |
20 | interface IPolicyService {
21 | boolean isActive(in Policy policies);
22 | void setAccountHoldFlag(long accountId, boolean newState);
23 | // Legacy compatability for Exchange shipped with KK
24 | void setAccountPolicy(long accountId, in Policy policy, String securityKey);
25 | // New version
26 | void setAccountPolicy2(long accountId, in Policy policy, String securityKey, boolean notify);
27 | oneway void remoteWipe();
28 | boolean canDisableCamera();
29 | }
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/service/SearchParams.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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 | package com.android.emailcommon.service;
17 |
18 | parcelable SearchParams;
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/service/ServiceUnavailableException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon.service;
18 |
19 | /**
20 | * An Exception thrown when a service proxy requires a result and there's a remote exception; this
21 | * prevents the caller from receiving an invalid result.
22 | */
23 | public class ServiceUnavailableException extends RuntimeException {
24 | private static final long serialVersionUID = 1L;
25 |
26 | public ServiceUnavailableException(String string) {
27 | super(string);
28 | }
29 | }
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/service/SyncWindow.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon.service;
18 |
19 | public class SyncWindow {
20 | public static final int SYNC_WINDOW_USER = -1;
21 | public static final int SYNC_WINDOW_ACCOUNT = 0;
22 | public static final int SYNC_WINDOW_1_DAY = 1;
23 | public static final int SYNC_WINDOW_3_DAYS = 2;
24 | public static final int SYNC_WINDOW_1_WEEK = 3;
25 | public static final int SYNC_WINDOW_2_WEEKS = 4;
26 | public static final int SYNC_WINDOW_1_MONTH = 5;
27 | public static final int SYNC_WINDOW_ALL = 6;
28 |
29 | public static int toDays(int window) {
30 | switch(window) {
31 | case SYNC_WINDOW_1_DAY:
32 | return 1;
33 | case SYNC_WINDOW_3_DAYS:
34 | return 3;
35 | case SYNC_WINDOW_1_WEEK:
36 | return 7;
37 | case SYNC_WINDOW_2_WEEKS:
38 | return 14;
39 | case SYNC_WINDOW_1_MONTH:
40 | return 30;
41 | case SYNC_WINDOW_ALL:
42 | return 365*10;
43 | case SYNC_WINDOW_ACCOUNT:
44 | default:
45 | return 7;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/utility/CountingOutputStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 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.emailcommon.utility;
18 |
19 | import java.io.IOException;
20 | import java.io.OutputStream;
21 |
22 | /**
23 | * A simple pass-thru OutputStream that also counts how many bytes are written to it and
24 | * makes that count available to callers.
25 | */
26 | public class CountingOutputStream extends OutputStream {
27 | private long mCount;
28 | private final OutputStream mOutputStream;
29 |
30 | public CountingOutputStream(OutputStream outputStream) {
31 | mOutputStream = outputStream;
32 | }
33 |
34 | public long getCount() {
35 | return mCount;
36 | }
37 |
38 | @Override
39 | public void write(byte[] buffer, int offset, int count) throws IOException {
40 | mOutputStream.write(buffer, offset, count);
41 | mCount += count;
42 | }
43 |
44 | @Override
45 | public void write(int oneByte) throws IOException {
46 | mOutputStream.write(oneByte);
47 | mCount++;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/emailcommon/src/com/android/emailcommon/utility/EOLConvertingOutputStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 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.emailcommon.utility;
18 |
19 | import java.io.FilterOutputStream;
20 | import java.io.IOException;
21 | import java.io.OutputStream;
22 |
23 | public class EOLConvertingOutputStream extends FilterOutputStream {
24 | int lastChar;
25 |
26 | public EOLConvertingOutputStream(OutputStream out) {
27 | super(out);
28 | }
29 |
30 | @Override
31 | public void write(int oneByte) throws IOException {
32 | if (oneByte == '\n') {
33 | if (lastChar != '\r') {
34 | super.write('\r');
35 | }
36 | }
37 | super.write(oneByte);
38 | lastChar = oneByte;
39 | }
40 |
41 | @Override
42 | public void flush() throws IOException {
43 | if (lastChar == '\r') {
44 | super.write('\n');
45 | lastChar = '\n';
46 | }
47 | super.flush();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/proguard.flags:
--------------------------------------------------------------------------------
1 | #Email-specific proguard flags that are not covered by UnifiedEmail go here
2 |
3 | -keepclasseswithmembers class * {
4 | public *** newInstance(com.android.emailcommon.provider.Account, android.content.Context);
5 | }
6 |
7 | -keep class com.android.email.activity.setup.AccountSetupFinal
8 | -keep class com.android.email.activity.setup.AccountSettingsFragment
--------------------------------------------------------------------------------
/provider_src/com/android/email/EmailIntentService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 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 | package com.android.email;
17 |
18 | import android.content.Intent;
19 |
20 | import com.android.mail.MailIntentService;
21 | import com.android.mail.providers.UIProvider;
22 | import com.android.mail.utils.LogTag;
23 | import com.android.mail.utils.LogUtils;
24 |
25 | /**
26 | * A service to handle various intents asynchronously.
27 | */
28 | public class EmailIntentService extends MailIntentService {
29 | private static final String LOG_TAG = LogTag.getLogTag();
30 |
31 | public EmailIntentService() {
32 | super("EmailIntentService");
33 | }
34 |
35 | @Override
36 | protected void onHandleIntent(final Intent intent) {
37 | super.onHandleIntent(intent);
38 |
39 | if (UIProvider.ACTION_UPDATE_NOTIFICATION.equals(intent.getAction())) {
40 | final NotificationController nc =
41 | NotificationControllerCreatorHolder.getInstance(this);
42 | if (nc != null) {
43 | nc.handleUpdateNotificationIntent(this, intent);
44 | }
45 | }
46 |
47 | LogUtils.v(LOG_TAG, "Handling intent %s", intent);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/NotificationController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 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;
18 |
19 | import android.content.Context;
20 | import android.content.Intent;
21 | import com.android.emailcommon.provider.Account;
22 | import com.android.emailcommon.provider.EmailContent.Attachment;
23 |
24 |
25 | public interface NotificationController {
26 | void watchForMessages();
27 | void showDownloadForwardFailedNotificationSynchronous(Attachment attachment);
28 | void showLoginFailedNotificationSynchronous(long accountId, boolean incoming);
29 | void cancelLoginFailedNotification(long accountId);
30 | void cancelNotifications(final Context context, final Account account);
31 | void handleUpdateNotificationIntent(Context context, Intent intent);
32 | void showSecurityNeededNotification(Account account);
33 | void showSecurityUnsupportedNotification(Account account);
34 | void showSecurityChangedNotification(Account account);
35 | void cancelSecurityNeededNotification();
36 | void showPasswordExpiringNotificationSynchronous(long accountId);
37 | void showPasswordExpiredNotificationSynchronous(long accountId);
38 | void cancelPasswordExpirationNotifications();
39 | }
40 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/NotificationControllerCreator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 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;
18 |
19 | import android.content.Context;
20 |
21 | public interface NotificationControllerCreator {
22 | NotificationController getInstance(Context context);
23 | }
24 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/NotificationControllerCreatorHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 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;
18 |
19 | import android.content.Context;
20 |
21 | public class NotificationControllerCreatorHolder {
22 | private static NotificationControllerCreator sCreator =
23 | new NotificationControllerCreator() {
24 | @Override
25 | public NotificationController getInstance(Context context){
26 | return null;
27 | }
28 | };
29 |
30 | public static void setNotificationControllerCreator(
31 | NotificationControllerCreator creator) {
32 | sCreator = creator;
33 | }
34 |
35 | public static NotificationControllerCreator getNotificationControllerCreator() {
36 | return sCreator;
37 | }
38 |
39 | public static NotificationController getInstance(Context context) {
40 | return getNotificationControllerCreator().getInstance(context);
41 | }
42 | }
--------------------------------------------------------------------------------
/provider_src/com/android/email/activity/setup/ForwardingIntent.java:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2012 Google Inc.
2 | * Licensed to 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.activity.setup;
18 |
19 | import android.content.Context;
20 | import android.content.Intent;
21 |
22 | /**
23 | * An intent that forwards results
24 | */
25 | public class ForwardingIntent extends Intent {
26 | public ForwardingIntent(Context activity, Class klass) {
27 | super(activity, klass);
28 | setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/mail/store/imap/ImapSimpleString.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.imap;
18 |
19 | import com.android.emailcommon.utility.Utility;
20 |
21 | import java.io.ByteArrayInputStream;
22 | import java.io.InputStream;
23 |
24 | /**
25 | * Subclass of {@link ImapString} used for non literals.
26 | */
27 | public class ImapSimpleString extends ImapString {
28 | private String mString;
29 |
30 | /* package */ ImapSimpleString(String string) {
31 | mString = (string != null) ? string : "";
32 | }
33 |
34 | @Override
35 | public void destroy() {
36 | mString = null;
37 | super.destroy();
38 | }
39 |
40 | @Override
41 | public String getString() {
42 | return mString;
43 | }
44 |
45 | @Override
46 | public InputStream getAsStream() {
47 | return new ByteArrayInputStream(Utility.toAscii(mString));
48 | }
49 |
50 | @Override
51 | public String toString() {
52 | // Purposefully not return just mString, in order to prevent using it instead of getString.
53 | return "\"" + mString + "\"";
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/provider/FolderPickerCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Google Inc.
3 | * Licensed to The Android Open Source Project.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.android.email.provider;
19 |
20 | import com.android.mail.providers.Folder;
21 |
22 | public interface FolderPickerCallback {
23 | public void select(Folder folder);
24 | public void cancel();
25 | }
26 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/AliceAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class AliceAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/AolAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class AolAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/ClixAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class ClixAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/EasAuthenticatorService.java:
--------------------------------------------------------------------------------
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.service;
18 |
19 | /**
20 | * This service needs to be declared separately from the base service
21 | */
22 | public class EasAuthenticatorService extends AuthenticatorService {
23 | }
24 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/EasAuthenticatorServiceAlternate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.service;
18 |
19 | /**
20 | * This service needs to be declared separately from the base service
21 | */
22 | public class EasAuthenticatorServiceAlternate extends AuthenticatorService {
23 | }
24 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/EmailBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.service;
18 |
19 | import android.content.BroadcastReceiver;
20 | import android.content.Context;
21 | import android.content.Intent;
22 |
23 | /**
24 | * The broadcast receiver. The actual job is done in EmailBroadcastProcessor on a worker thread.
25 | */
26 | public class EmailBroadcastReceiver extends BroadcastReceiver {
27 | @Override
28 | public void onReceive(Context context, Intent intent) {
29 | EmailBroadcastProcessorService.processBroadcastIntent(context, intent);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/EmailUpgradeBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | package com.android.email.service;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | /**
8 | * {@link BroadcastReceiver} for app upgrade. This listens to package replacement (for unbundled
9 | * upgrade) and reboot (for OTA upgrade). The code in the {@link EmailBroadcastProcessorService}
10 | * disables this receiver after it runs.
11 | */
12 | public class EmailUpgradeBroadcastReceiver extends BroadcastReceiver {
13 | @Override
14 | public void onReceive(final Context context, final Intent intent) {
15 | EmailBroadcastProcessorService.processUpgradeBroadcastIntent(context);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/FreeAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class FreeAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/GmailAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class GmailAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/ImapAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.service;
18 |
19 | /**
20 | * This service needs to be declared separately from the base service
21 | */
22 | public class ImapAuthenticatorService extends AuthenticatorService {
23 | }
24 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/LegacyEasAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.service;
18 |
19 | /**
20 | * This service needs to be declared separately from the base service
21 | */
22 | public class LegacyEasAuthenticatorService extends AuthenticatorService {
23 | }
24 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/LegacyEmailAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.service;
18 |
19 | /**
20 | * This service needs to be declared separately from the base service
21 | */
22 | public class LegacyEmailAuthenticatorService extends AuthenticatorService {
23 | }
24 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/LegacyImapAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.service;
18 |
19 | /**
20 | * This service needs to be declared separately from the base service
21 | */
22 | public class LegacyImapAuthenticatorService extends AuthenticatorService {
23 | }
24 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/NoosAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class NoosAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/Pop3AuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.service;
18 |
19 | /**
20 | * This service needs to be declared separately from the base service
21 | */
22 | public class Pop3AuthenticatorService extends AuthenticatorService {
23 | }
24 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/Pop3SyncAdapterService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.service;
18 |
19 | public class Pop3SyncAdapterService extends PopImapSyncAdapterService {
20 | }
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/SapoAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class SapoAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/SfrAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class SfrAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/SwingAuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class SwingAuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/provider_src/com/android/email/service/Tele2AuthenticatorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions are
6 | * met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.android.email.service;
31 |
32 | /**
33 | * This service needs to be declared separately from the base service
34 | */
35 | public class Tele2AuthenticatorService extends AuthenticatorService {
36 | }
37 |
--------------------------------------------------------------------------------
/res/color/buttontext.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_add_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-hdpi/ic_add_24dp.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_exchange_minitab_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-hdpi/ic_exchange_minitab_selected.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_exchange_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-hdpi/ic_exchange_selected.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_setup_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-hdpi/ic_setup_delete.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_add_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-mdpi/ic_add_24dp.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_exchange_minitab_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-mdpi/ic_exchange_minitab_selected.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_exchange_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-mdpi/ic_exchange_selected.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_setup_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-mdpi/ic_setup_delete.png
--------------------------------------------------------------------------------
/res/drawable-nodpi/mail_widget_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-nodpi/mail_widget_preview.png
--------------------------------------------------------------------------------
/res/drawable-v21/ic_add_24dp.xml:
--------------------------------------------------------------------------------
1 |
16 |
21 |
24 |
27 |
28 |
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_add_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-xhdpi/ic_add_24dp.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_exchange_minitab_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-xhdpi/ic_exchange_minitab_selected.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_exchange_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-xhdpi/ic_exchange_selected.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_setup_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-xhdpi/ic_setup_delete.png
--------------------------------------------------------------------------------
/res/drawable-xxhdpi/ic_add_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-xxhdpi/ic_add_24dp.png
--------------------------------------------------------------------------------
/res/drawable-xxhdpi/ic_setup_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/drawable-xxhdpi/ic_setup_delete.png
--------------------------------------------------------------------------------
/res/drawable/account_setup_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/res/layout-w800dp/account_setup_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
23 |
24 |
28 |
29 |
34 |
35 |
36 |
37 |
41 |
--------------------------------------------------------------------------------
/res/layout/account_credentials.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
--------------------------------------------------------------------------------
/res/layout/account_credentials_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
22 |
23 |
28 |
29 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/res/layout/account_server_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
21 |
--------------------------------------------------------------------------------
/res/layout/account_settings_buttons.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
23 |
24 |
31 |
38 |
39 |
--------------------------------------------------------------------------------
/res/layout/account_settings_edit_quick_responses_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
24 |
30 |
41 |
--------------------------------------------------------------------------------
/res/layout/account_setup_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/res/layout/account_setup_type_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
25 |
31 |
32 |
--------------------------------------------------------------------------------
/res/layout/account_type.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
28 |
--------------------------------------------------------------------------------
/res/layout/quick_response_edit_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
26 |
27 |
31 |
32 |
--------------------------------------------------------------------------------
/res/layout/quick_response_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
27 |
37 |
38 |
--------------------------------------------------------------------------------
/res/layout/quick_responses.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
21 |
22 |
27 |
28 |
37 |
38 |
--------------------------------------------------------------------------------
/res/menu/email_compose_menu_extras.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/res/menu/quick_response_prefs_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/res/mipmap-hdpi/ic_alice_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-hdpi/ic_alice_email.png
--------------------------------------------------------------------------------
/res/mipmap-hdpi/ic_launcher_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-hdpi/ic_launcher_email.png
--------------------------------------------------------------------------------
/res/mipmap-mdpi/ic_alice_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-mdpi/ic_alice_email.png
--------------------------------------------------------------------------------
/res/mipmap-mdpi/ic_launcher_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-mdpi/ic_launcher_email.png
--------------------------------------------------------------------------------
/res/mipmap-xhdpi/ic_alice_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-xhdpi/ic_alice_email.png
--------------------------------------------------------------------------------
/res/mipmap-xhdpi/ic_launcher_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-xhdpi/ic_launcher_email.png
--------------------------------------------------------------------------------
/res/mipmap-xxhdpi/ic_alice_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-xxhdpi/ic_alice_email.png
--------------------------------------------------------------------------------
/res/mipmap-xxhdpi/ic_launcher_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-xxhdpi/ic_launcher_email.png
--------------------------------------------------------------------------------
/res/mipmap-xxxhdpi/ic_alice_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-xxxhdpi/ic_alice_email.png
--------------------------------------------------------------------------------
/res/mipmap-xxxhdpi/ic_launcher_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Email/45d5dd33d90b7c5fe5182dd50dd2ab20f35ced87/res/mipmap-xxxhdpi/ic_launcher_email.png
--------------------------------------------------------------------------------
/res/values-am/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-bn-rBD/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-br-rFR/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-bs-rBA/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-csb-rPL/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-cy/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-en-rAU/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-en-rGB/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-en-rPT/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-eo/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 | Forigi konton
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/res/values-es-rCO/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-es-rMX/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-fil-rPH/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-fr-rCA/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-frp-rIT/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-fy-rNL/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-ga-rIE/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-gd-rGB/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-hy-rAM/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-is-rIS/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-ja/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 | アカウントを削除
21 | アカウント%sのすべての設定とメールを削除します。この操作は元に戻せません。\n\n続けますか?
22 | アカウントを削除中\u2026
23 | アカウントを削除できませんでした
24 |
25 | 通知オプション
26 |
27 | 通知オプション(%s)
28 |
29 | フォルダの通知の設定
30 |
31 | ライト
32 |
33 |
--------------------------------------------------------------------------------
/res/values-ka-rGE/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-kk-rKZ/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-km-rKH/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-ko/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 | 계정 삭제
21 | 계정 %s의 모든 이메일과 설정이 삭제됩니다. 이 작업은 되돌릴 수 없습니다.\n\n계속하시겠습니까?
22 | 계정 삭제중\u2026
23 | 계정을 삭제할 수 없음
24 |
25 | 알림 옵션
26 |
27 | 알림 옵션 (%s)
28 |
29 | 폴더 알림 설정
30 |
31 | 알림 표시등
32 |
33 |
--------------------------------------------------------------------------------
/res/values-ku/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 | سڕینەوەی هەژمار
21 | ئەمە هەموو ڕێکخستنەکان و پەیامە ئەلکترۆنیەکانی هەژماری %s. ئەسڕیتەوە، ئەم فرمانە ناتوانرێت بگەڕێنرێتەوە.\n\nبەردەوامبوون؟?
22 | سڕینەوەی هەژماری\u2026
23 | هەژمار ناتوانرێت بسڕدرێتەوە
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/res/values-ky-rKG/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-lo-rLA/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-lv/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-mk-rMK/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-mn-rMN/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-ms-rMY/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-my-rMM/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-ne-rNP/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-oc-rFR/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-pa-rIN/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-rm/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-si-rLK/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-sq-rAL/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-sw/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-ur-rPK/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-uz-rUZ/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-zh-rCN/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 | 删除帐户
21 | 这将删除 %s 帐户所有的设置和邮件。此操作不能撤销。\n\n要继续吗?
22 | 正在删除帐户\u2026
23 | 无法删除该帐户
24 |
25 | 通知选项
26 |
27 | 通知选项(%s)
28 |
29 | 文件夹通知设置
30 |
31 | 指示灯
32 |
33 |
--------------------------------------------------------------------------------
/res/values-zh-rHK/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values-zh-rTW/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 | 移除帳戶
21 | 這將移除帳戶 %s 的所有設定及電子郵件。一但執行即無法復原。\n\n您要繼續嗎?
22 | 正在移除帳戶\u2026
23 | 無法移除該帳戶
24 |
25 | 通知選項
26 |
27 | 通知選項 (%s)
28 |
29 | 資料夾通知設定
30 |
31 | 指示燈
32 |
33 |
--------------------------------------------------------------------------------
/res/values-zu/cm_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values/accountprovider.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 | content://com.android.email.provider/uiaccts
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/values/cm_dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 | 8dp
20 |
21 |
--------------------------------------------------------------------------------
/res/values/constants.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 | false
21 |
22 |
23 | true
24 |
25 |
27 | false
28 |
29 |
30 | true
31 |
32 |
33 | true
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/res/xml-sw600dp/widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
26 |
--------------------------------------------------------------------------------
/res/xml/account_preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
27 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/res/xml/authenticator_alternate.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
32 |
--------------------------------------------------------------------------------
/res/xml/authenticator_eas.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
30 |
--------------------------------------------------------------------------------
/res/xml/authenticator_imap.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
30 |
--------------------------------------------------------------------------------
/res/xml/authenticator_legacy_eas.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
30 |
--------------------------------------------------------------------------------
/res/xml/authenticator_legacy_email.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
30 |
--------------------------------------------------------------------------------
/res/xml/authenticator_legacy_imap.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
30 |
--------------------------------------------------------------------------------
/res/xml/authenticator_pop3.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
30 |
--------------------------------------------------------------------------------
/res/xml/device_admin.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/res/xml/eastest_authenticator.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
30 |
--------------------------------------------------------------------------------
/res/xml/email_extra_preference_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/xml/mailbox_notifications_preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
24 |
25 |
29 |
30 |
35 |
36 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/res/xml/mailbox_preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
24 |
25 |
26 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/res/xml/preference_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/xml/providers_product.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/res/xml/senders.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/res/xml/senders_product.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/res/xml/syncadapter_legacy_imap.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
29 |
--------------------------------------------------------------------------------
/res/xml/syncadapter_pop3.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
29 |
--------------------------------------------------------------------------------
/res/xml/widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
28 |
--------------------------------------------------------------------------------
/src/com/android/email/EmailAddressValidator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 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;
18 |
19 | import android.widget.AutoCompleteTextView.Validator;
20 |
21 | import com.android.emailcommon.mail.Address;
22 |
23 | public class EmailAddressValidator implements Validator {
24 | @Override
25 | public CharSequence fixText(CharSequence invalidText) {
26 | return "";
27 | }
28 |
29 | @Override
30 | public boolean isValid(CharSequence text) {
31 | return Address.parse(text.toString()).length == 1;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/com/android/email/activity/setup/PolicyListPreference.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.activity.setup;
18 |
19 | import android.content.Context;
20 | import android.preference.Preference;
21 | import android.util.AttributeSet;
22 | import android.view.View;
23 | import android.widget.TextView;
24 |
25 | /**
26 | * Simple text preference allowing a large number of lines
27 | */
28 | public class PolicyListPreference extends Preference {
29 | // Arbitrary, but large number (we don't, and won't, have nearly this many)
30 | public static final int MAX_POLICIES = 24;
31 |
32 | public PolicyListPreference(Context ctx, AttributeSet attrs, int defStyle) {
33 | super(ctx, attrs, defStyle);
34 | }
35 |
36 | public PolicyListPreference(Context ctx, AttributeSet attrs) {
37 | super(ctx, attrs);
38 | }
39 |
40 | @Override
41 | protected void onBindView(View view) {
42 | super.onBindView(view);
43 | ((TextView)view.findViewById(android.R.id.summary)).setMaxLines(MAX_POLICIES);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/com/android/email/activity/setup/SpinnerOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 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.activity.setup;
18 |
19 | import android.widget.Spinner;
20 |
21 | public class SpinnerOption {
22 | public final Object value;
23 |
24 | public final String label;
25 |
26 | public static void setSpinnerOptionValue(Spinner spinner, Object value) {
27 | for (int i = 0, count = spinner.getCount(); i < count; i++) {
28 | SpinnerOption so = (SpinnerOption)spinner.getItemAtPosition(i);
29 | if (so.value.equals(value)) {
30 | spinner.setSelection(i, true);
31 | return;
32 | }
33 | }
34 | }
35 |
36 | public SpinnerOption(Object value, String label) {
37 | this.value = value;
38 | this.label = label;
39 | }
40 |
41 | @Override
42 | public String toString() {
43 | return label;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/com/android/email/data/ClosingMatrixCursor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.data;
18 |
19 | import android.database.Cursor;
20 | import android.database.MatrixCursor;
21 |
22 | import com.android.mail.utils.MatrixCursorWithCachedColumns;
23 |
24 | /**
25 | * {@link MatrixCursor} which takes an extra {@link Cursor} to the constructor, and close
26 | * it when self is closed.
27 | */
28 | public class ClosingMatrixCursor extends MatrixCursorWithCachedColumns {
29 | private final Cursor mInnerCursor;
30 |
31 | public ClosingMatrixCursor(String[] columnNames, Cursor innerCursor) {
32 | super(columnNames);
33 | mInnerCursor = innerCursor;
34 | }
35 |
36 | @Override
37 | public void close() {
38 | if (mInnerCursor != null) {
39 | mInnerCursor.close();
40 | }
41 | super.close();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/com/android/email/mail/transport/StatusOutputStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 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.emailcommon.Logging;
20 | import com.android.mail.utils.LogUtils;
21 |
22 | import java.io.FilterOutputStream;
23 | import java.io.IOException;
24 | import java.io.OutputStream;
25 |
26 | public class StatusOutputStream extends FilterOutputStream {
27 | private long mCount = 0;
28 |
29 | public StatusOutputStream(OutputStream out) {
30 | super(out);
31 | }
32 |
33 | @Override
34 | public void write(int oneByte) throws IOException {
35 | super.write(oneByte);
36 | mCount++;
37 | if (Logging.LOGD) {
38 | if (mCount % 1024 == 0) {
39 | LogUtils.v(Logging.LOG_TAG, "# " + mCount);
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/com/android/email2/ui/MailboxSelectionActivityEmail.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 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 | package com.android.email2.ui;
17 |
18 | /* An activity that shows the list of all the available accounts and return the
19 | * one selected in onResult().
20 | */
21 | public class MailboxSelectionActivityEmail extends com.android.mail.ui.MailboxSelectionActivity {
22 |
23 | }
--------------------------------------------------------------------------------
/src/com/android/mail/browse/EmailConversationProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 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.mail.browse;
18 |
19 | import com.android.email.R;
20 | import com.android.mail.browse.ConversationCursor.ConversationProvider;
21 |
22 | import java.lang.Override;
23 |
24 | public class EmailConversationProvider extends ConversationProvider {
25 | // The authority of our conversation provider (a forwarding provider)
26 | // This string must match the declaration in AndroidManifest.xml
27 | private static String sAuthority;
28 |
29 | @Override
30 | protected String getAuthority() {
31 | if (sAuthority == null) {
32 | sAuthority = getContext().getString(R.string.authority_conversation_provider);
33 | }
34 | return sAuthority;
35 | }
36 | }
--------------------------------------------------------------------------------
/src/com/android/mail/providers/EmailAccountCacheProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 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.mail.providers;
18 |
19 | import android.content.Context;
20 | import android.content.Intent;
21 | import android.net.Uri;
22 |
23 | import com.android.email.R;
24 | import com.android.email.activity.setup.AccountSetupFinal;
25 | import com.android.email.setup.AuthenticatorSetupIntentHelper;
26 |
27 | public class EmailAccountCacheProvider extends MailAppProvider {
28 | // Content provider for Email
29 | private static String sAuthority;
30 | @Override
31 | protected String getAuthority() {
32 | if (sAuthority == null) {
33 | sAuthority = getContext().getString(R.string.authority_account_cache_provider);
34 | }
35 | return sAuthority;
36 | }
37 |
38 | @Override
39 | protected Intent getNoAccountsIntent(Context context) {
40 | return AuthenticatorSetupIntentHelper.actionNewAccountWithResultIntent(context);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/tests/Android.mk:
--------------------------------------------------------------------------------
1 | # Copyright 2011, The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | LOCAL_PATH:= $(call my-dir)
16 |
17 | src_dirs := src
18 | res_dirs := res
19 |
20 | ##################################################
21 |
22 | include $(CLEAR_VARS)
23 |
24 | # We only want this apk build for tests.
25 | LOCAL_MODULE_TAGS := tests
26 |
27 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
28 |
29 | LOCAL_SDK_VERSION := 14
30 | LOCAL_PACKAGE_NAME := EmailTests
31 | LOCAL_INSTRUMENTATION_FOR := Email
32 |
33 | LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
34 | LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
35 | LOCAL_AAPT_FLAGS := --auto-add-overlay
36 |
37 | include $(BUILD_PACKAGE)
38 |
39 | # Build all sub-directories
40 | include $(call all-makefiles-under,$(LOCAL_PATH))
41 |
--------------------------------------------------------------------------------
/tests/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
33 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/tests/src/com/android/email/DummyFlakyTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 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;
18 |
19 | import android.support.test.filters.FlakyTest;
20 | import org.junit.Test;
21 |
22 | /**
23 | * Placeholder flaky test.
24 | */
25 | public class DummyFlakyTest {
26 |
27 | @FlakyTest
28 | @Test
29 | public void imNotReallyFlaky() {}
30 | }
31 |
--------------------------------------------------------------------------------
/tests/src/com/android/email/MockClock.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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;
18 |
19 | import com.android.mail.utils.Clock;
20 |
21 | public class MockClock extends Clock {
22 | public static final long DEFAULT_TIME = 10000; // Arbitrary value
23 |
24 | public long mTime = DEFAULT_TIME;
25 |
26 | @Override
27 | public long getTime() {
28 | return mTime;
29 | }
30 |
31 | public void advance() {
32 | mTime++;
33 | }
34 |
35 | public void advance(long milliseconds) {
36 | mTime += milliseconds;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/tests/src/com/android/email/MockVendorPolicy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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;
18 |
19 | import android.content.Context;
20 | import android.os.Bundle;
21 |
22 | import com.android.emailcommon.VendorPolicyLoader;
23 |
24 | public class MockVendorPolicy {
25 | public static String passedPolicy;
26 | public static Bundle passedBundle;
27 | public static Bundle mockResult;
28 |
29 | public static Bundle getPolicy(String policy, Bundle args) {
30 | passedPolicy = policy;
31 | passedBundle = args;
32 | return mockResult;
33 | }
34 |
35 | /**
36 | * Call it to enable {@link MockVendorPolicy}.
37 | */
38 | public static void inject(Context context) {
39 | VendorPolicyLoader.injectPolicyForTest(context, context.getPackageName(),
40 | MockVendorPolicy.class);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/tests/src/com/android/email/mail/store/imap/ImapElementTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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.imap;
18 |
19 | import com.android.email.mail.store.imap.ImapElement;
20 |
21 | import android.test.suitebuilder.annotation.SmallTest;
22 |
23 | import junit.framework.TestCase;
24 |
25 | @SmallTest
26 | public class ImapElementTest extends TestCase {
27 |
28 | /** Test for {@link ImapElement#NONE} */
29 | public void testNone() {
30 | assertFalse(ImapElement.NONE.isList());
31 | assertFalse(ImapElement.NONE.isString());
32 |
33 | assertTrue(ImapElement.NONE.equalsForTest(ImapElement.NONE));
34 | assertFalse(ImapElement.NONE.equalsForTest(null));
35 | assertFalse(ImapElement.NONE.equalsForTest(ImapTestUtils.STRING_1));
36 | assertFalse(ImapElement.NONE.equalsForTest(ImapTestUtils.LIST_1));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/tests/src/com/android/emailcommon/DeviceTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | /*
3 | * Copyright (C) 2011 The Android Open Source Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.android.emailcommon;
19 |
20 | import android.content.Context;
21 | import android.telephony.TelephonyManager;
22 | import android.test.AndroidTestCase;
23 | import android.test.suitebuilder.annotation.SmallTest;
24 |
25 | import com.android.mail.utils.LogUtils;
26 |
27 | @SmallTest
28 | public class DeviceTests extends AndroidTestCase {
29 |
30 | public void testGetConsistentDeviceId() {
31 | TelephonyManager tm =
32 | (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);
33 | if (tm == null) {
34 | LogUtils.w(Logging.LOG_TAG, "TelephonyManager not supported. Skipping.");
35 | return;
36 | }
37 |
38 | // Note null is a valid return value. But still it should be consistent.
39 | final String deviceId = Device.getConsistentDeviceId(getContext());
40 | final String deviceId2 = Device.getConsistentDeviceId(getContext());
41 | // Should be consistent.
42 | assertEquals(deviceId, deviceId2);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/tests/src/com/android/emailcommon/mail/FlagTests.java:
--------------------------------------------------------------------------------
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.emailcommon.mail;
18 |
19 | import com.android.emailcommon.mail.Flag;
20 |
21 | import android.test.suitebuilder.annotation.SmallTest;
22 |
23 | import junit.framework.TestCase;
24 |
25 | /**
26 | * Tests of Flag enum
27 | */
28 | @SmallTest
29 | public class FlagTests extends TestCase {
30 |
31 | /**
32 | * Confirm that all flags are upper-case. This removes the need for wasteful toUpper
33 | * conversions in code that uses the flags.
34 | */
35 | public void testFlagsUpperCase() {
36 | for (Flag flag : Flag.values()) {
37 | String name = flag.name();
38 | assertEquals(name.toUpperCase(), name);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tests/src/com/android/emailcommon/provider/QuickResponseTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon.provider;
18 |
19 | import android.content.Context;
20 | import android.test.ProviderTestCase2;
21 | import android.test.suitebuilder.annotation.SmallTest;
22 | import android.test.suitebuilder.annotation.Suppress;
23 |
24 | import com.android.email.provider.ContentCache;
25 | import com.android.email.provider.EmailProvider;
26 |
27 | /**
28 | * Unit tests for the QuickResponse class
29 | */
30 | @Suppress
31 | @SmallTest
32 | public class QuickResponseTests extends ProviderTestCase2 {
33 | private Context mMockContext;
34 | private EmailProvider mProvider;
35 |
36 | public QuickResponseTests() {
37 | super(EmailProvider.class, EmailContent.AUTHORITY);
38 | }
39 |
40 | @Override
41 | public void setUp() throws Exception {
42 | super.setUp();
43 | mMockContext = getMockContext();
44 | mProvider = getProvider();
45 | // Invalidate all caches, since we reset the database for each test
46 | ContentCache.invalidateAllCaches();
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/tests/src/com/android/emailcommon/service/SearchParamsTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 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.emailcommon.service;
18 |
19 | import android.os.Parcel;
20 | import android.test.AndroidTestCase;
21 | import android.test.suitebuilder.annotation.Suppress;
22 |
23 | @Suppress
24 | public class SearchParamsTests extends AndroidTestCase {
25 | public void brokentestParcel() {
26 | SearchParams params = new SearchParams(1, "query");
27 | params.mIncludeChildren = true;
28 | params.mLimit = 66;
29 | params.mOffset = 99;
30 | Parcel parcel = Parcel.obtain();
31 | params.writeToParcel(parcel, 0);
32 | parcel.setDataPosition(0);
33 | SearchParams readParams = SearchParams.CREATOR.createFromParcel(parcel);
34 | assertEquals(params.mFilter, readParams.mFilter);
35 | assertEquals(params.mIncludeChildren, readParams.mIncludeChildren);
36 | assertEquals(params.mLimit, readParams.mLimit);
37 | assertEquals(params.mOffset, readParams.mOffset);
38 | assertEquals(params.mMailboxId, readParams.mMailboxId);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------