├── .classpath ├── .project ├── Android.mk ├── AndroidManifest.xml ├── CleanSpec.mk ├── MODULE_LICENSE_APACHE2 ├── NOTICE ├── OWNERS ├── TEST_MAPPING ├── assets ├── loading.gif ├── loading.html └── test.html ├── emailcommon ├── Android.mk ├── AndroidManifest.xml ├── res │ └── values │ │ └── strings.xml └── src │ └── com │ └── android │ └── emailcommon │ ├── Api.java │ ├── Configuration.java │ ├── Device.java │ ├── Logging.java │ ├── TrafficFlags.java │ ├── VendorPolicyLoader.java │ ├── internet │ └── Rfc822Output.java │ ├── provider │ ├── Account.aidl │ ├── Account.java │ ├── Credential.java │ ├── EmailContent.java │ ├── HostAuth.aidl │ ├── HostAuth.java │ ├── Mailbox.java │ ├── MailboxUtilities.java │ ├── MessageChangeLogTable.java │ ├── MessageMove.java │ ├── MessageStateChange.java │ ├── Policy.aidl │ ├── Policy.java │ ├── ProviderUnavailableException.java │ └── QuickResponse.java │ ├── service │ ├── AccountServiceProxy.java │ ├── EmailServiceConstants.java │ ├── EmailServiceProxy.java │ ├── EmailServiceStatus.java │ ├── EmailServiceVersion.java │ ├── HostAuthCompat.aidl │ ├── HostAuthCompat.java │ ├── IAccountService.aidl │ ├── IEmailService.aidl │ ├── IEmailServiceCallback.aidl │ ├── IPolicyService.aidl │ ├── LegacyPolicySet.java │ ├── PolicyServiceProxy.java │ ├── SearchParams.aidl │ ├── ServiceProxy.java │ ├── ServiceUnavailableException.java │ └── SyncWindow.java │ └── utility │ ├── AttachmentUtilities.java │ ├── CertificateRequestor.java │ ├── CountingOutputStream.java │ ├── DelayedOperations.java │ ├── EOLConvertingOutputStream.java │ ├── EmailAsyncTask.java │ ├── EmailClientConnectionManager.java │ ├── IntentUtilities.java │ ├── LoggingInputStream.java │ ├── SSLSocketFactory.java │ ├── SSLSocketFactoryWrapper.java │ ├── SSLUtils.java │ └── Utility.java ├── proguard-test.flags ├── proguard.flags ├── provider_src └── com │ └── android │ └── email │ ├── AttachmentInfo.java │ ├── DebugUtils.java │ ├── EmailConnectivityManager.java │ ├── EmailIntentService.java │ ├── FixedLengthInputStream.java │ ├── LegacyConversions.java │ ├── NotificationController.java │ ├── NotificationControllerCreator.java │ ├── NotificationControllerCreatorHolder.java │ ├── PeekableInputStream.java │ ├── Preferences.java │ ├── ResourceHelper.java │ ├── SecurityPolicy.java │ ├── activity │ └── setup │ │ ├── AccountSecurity.java │ │ ├── AccountSettingsUtils.java │ │ └── ForwardingIntent.java │ ├── mail │ ├── Sender.java │ ├── Store.java │ ├── internet │ │ ├── AuthenticationCache.java │ │ └── OAuthAuthenticator.java │ ├── store │ │ ├── ImapConnection.java │ │ ├── ImapFolder.java │ │ ├── ImapStore.java │ │ ├── Pop3Store.java │ │ ├── ServiceStore.java │ │ └── imap │ │ │ ├── ImapConstants.java │ │ │ ├── ImapElement.java │ │ │ ├── ImapList.java │ │ │ ├── ImapMemoryLiteral.java │ │ │ ├── ImapResponse.java │ │ │ ├── ImapResponseParser.java │ │ │ ├── ImapSimpleString.java │ │ │ ├── ImapString.java │ │ │ ├── ImapTempFileLiteral.java │ │ │ └── ImapUtility.java │ └── transport │ │ ├── DiscourseLogger.java │ │ └── MailTransport.java │ ├── provider │ ├── AccountBackupRestore.java │ ├── AccountReconciler.java │ ├── AttachmentProvider.java │ ├── ContentCache.java │ ├── DBHelper.java │ ├── EmailConversationCursor.java │ ├── EmailMessageCursor.java │ ├── EmailProvider.java │ ├── FolderPickerActivity.java │ ├── FolderPickerCallback.java │ ├── FolderPickerDialog.java │ ├── FolderPickerSelectorAdapter.java │ ├── RefreshStatusMonitor.java │ ├── Utilities.java │ └── WidgetProvider.java │ ├── service │ ├── AccountService.java │ ├── AttachmentService.java │ ├── AuthenticatorService.java │ ├── EasAuthenticatorService.java │ ├── EasAuthenticatorServiceAlternate.java │ ├── EasTestAuthenticatorService.java │ ├── EmailBroadcastProcessorService.java │ ├── EmailBroadcastReceiver.java │ ├── EmailServiceStub.java │ ├── EmailServiceUtils.java │ ├── EmailUpgradeBroadcastReceiver.java │ ├── ImapAuthenticatorService.java │ ├── ImapService.java │ ├── ImapTempFileLiteral.java │ ├── LegacyEasAuthenticatorService.java │ ├── LegacyEmailAuthenticatorService.java │ ├── LegacyImapAuthenticatorService.java │ ├── LegacyImapSyncAdapterService.java │ ├── PolicyService.java │ ├── Pop3AuthenticatorService.java │ ├── Pop3Service.java │ ├── Pop3SyncAdapterService.java │ └── PopImapSyncAdapterService.java │ └── setup │ └── AuthenticatorSetupIntentHelper.java ├── res ├── color │ └── buttontext.xml ├── drawable-hdpi │ ├── ic_add_24dp.png │ ├── ic_exchange_minitab_selected.png │ ├── ic_exchange_selected.png │ └── ic_setup_delete.png ├── drawable-mdpi │ ├── ic_add_24dp.png │ ├── ic_exchange_minitab_selected.png │ ├── ic_exchange_selected.png │ └── ic_setup_delete.png ├── drawable-nodpi │ └── mail_widget_preview.png ├── drawable-v21 │ └── ic_add_24dp.xml ├── drawable-xhdpi │ ├── ic_add_24dp.png │ ├── ic_exchange_minitab_selected.png │ ├── ic_exchange_selected.png │ └── ic_setup_delete.png ├── drawable-xxhdpi │ ├── ic_add_24dp.png │ └── ic_setup_delete.png ├── drawable │ └── account_setup_background.xml ├── layout-w600dp │ ├── account_setup_basics_fragment.xml │ ├── account_setup_incoming_fragment.xml │ ├── account_setup_options_fragment.xml │ ├── account_setup_outgoing_fragment.xml │ └── authentication_view.xml ├── layout-w800dp │ └── account_setup_activity.xml ├── layout │ ├── account_credentials.xml │ ├── account_credentials_fragment.xml │ ├── account_server_settings.xml │ ├── account_settings_buttons.xml │ ├── account_settings_edit_quick_responses_fragment.xml │ ├── account_settings_incoming_fragment.xml │ ├── account_settings_outgoing_fragment.xml │ ├── account_setup_ab_fragment.xml │ ├── account_setup_activity.xml │ ├── account_setup_basics_fragment.xml │ ├── account_setup_credentials_fragment.xml │ ├── account_setup_incoming_fragment.xml │ ├── account_setup_names_fragment.xml │ ├── account_setup_options_fragment.xml │ ├── account_setup_outgoing_fragment.xml │ ├── account_setup_template.xml │ ├── account_setup_type_fragment.xml │ ├── account_type.xml │ ├── authentication_view.xml │ ├── client_certificate_selector.xml │ ├── debug.xml │ ├── quick_response_edit_dialog.xml │ ├── quick_response_item.xml │ └── quick_responses.xml ├── menu │ ├── email_compose_menu_extras.xml │ └── quick_response_prefs_fragment_menu.xml ├── mipmap-hdpi │ └── ic_launcher_email.png ├── mipmap-mdpi │ └── ic_launcher_email.png ├── mipmap-xhdpi │ └── ic_launcher_email.png ├── mipmap-xxhdpi │ └── ic_launcher_email.png ├── mipmap-xxxhdpi │ └── ic_launcher_email.png ├── values-af │ └── strings.xml ├── values-am │ └── strings.xml ├── values-ar │ └── strings.xml ├── values-az │ └── strings.xml ├── values-bg │ └── strings.xml ├── values-bn │ └── strings.xml ├── values-ca │ └── strings.xml ├── values-cs │ └── strings.xml ├── values-da │ └── strings.xml ├── values-de │ └── strings.xml ├── values-el │ └── strings.xml ├── values-en-rAU │ └── strings.xml ├── values-en-rGB │ └── strings.xml ├── values-en-rIN │ └── strings.xml ├── values-es-rUS │ └── strings.xml ├── values-es │ └── strings.xml ├── values-et │ └── strings.xml ├── values-eu │ └── strings.xml ├── values-fa │ └── strings.xml ├── values-fi │ └── strings.xml ├── values-fr-rCA │ └── strings.xml ├── values-fr │ └── strings.xml ├── values-gl │ └── strings.xml ├── values-gu │ └── strings.xml ├── values-hi │ └── strings.xml ├── values-hr │ └── strings.xml ├── values-hu │ └── strings.xml ├── values-hy │ └── strings.xml ├── values-in │ └── strings.xml ├── values-is │ └── strings.xml ├── values-it │ └── strings.xml ├── values-iw │ └── strings.xml ├── values-ja │ └── strings.xml ├── values-ka │ └── strings.xml ├── values-kk │ └── strings.xml ├── values-km │ └── strings.xml ├── values-kn │ └── strings.xml ├── values-ko │ └── strings.xml ├── values-ky │ └── strings.xml ├── values-ldrtl │ └── styles-ldrtl.xml ├── values-lo │ └── strings.xml ├── values-lt │ └── strings.xml ├── values-lv │ └── strings.xml ├── values-mk │ └── strings.xml ├── values-ml │ └── strings.xml ├── values-mn │ └── strings.xml ├── values-mr │ └── strings.xml ├── values-ms │ └── strings.xml ├── values-my │ └── strings.xml ├── values-nb │ └── strings.xml ├── values-ne │ └── strings.xml ├── values-nl │ └── strings.xml ├── values-pl │ └── strings.xml ├── values-pt-rPT │ └── strings.xml ├── values-pt │ └── strings.xml ├── values-rm │ └── strings.xml ├── values-ro │ └── strings.xml ├── values-ru │ └── strings.xml ├── values-si │ └── strings.xml ├── values-sk │ └── strings.xml ├── values-sl │ └── strings.xml ├── values-sr │ └── strings.xml ├── values-sv │ └── strings.xml ├── values-sw │ └── strings.xml ├── values-ta │ └── strings.xml ├── values-te │ └── strings.xml ├── values-th │ └── strings.xml ├── values-tl │ └── strings.xml ├── values-tr │ └── strings.xml ├── values-uk │ └── strings.xml ├── values-ur │ └── strings.xml ├── values-uz │ └── strings.xml ├── values-v21 │ └── styles.xml ├── values-vi │ └── strings.xml ├── values-w600dp │ └── dimensions.xml ├── values-zh-rCN │ └── strings.xml ├── values-zh-rHK │ └── strings.xml ├── values-zh-rTW │ └── strings.xml ├── values-zu │ └── strings.xml ├── values │ ├── accountprovider.xml │ ├── arrays.xml │ ├── attrs.xml │ ├── colors.xml │ ├── constants.xml │ ├── dimensions.xml │ ├── strings.xml │ └── styles.xml ├── xml-sw600dp │ └── widget_info.xml └── xml │ ├── account_preferences.xml │ ├── account_settings_preferences.xml │ ├── authenticator_alternate.xml │ ├── authenticator_eas.xml │ ├── authenticator_imap.xml │ ├── authenticator_legacy_eas.xml │ ├── authenticator_legacy_email.xml │ ├── authenticator_legacy_imap.xml │ ├── authenticator_pop3.xml │ ├── device_admin.xml │ ├── eastest_authenticator.xml │ ├── email_extra_preference_headers.xml │ ├── mailbox_preferences.xml │ ├── oauth.xml │ ├── preference_headers.xml │ ├── providers.xml │ ├── providers_product.xml │ ├── senders.xml │ ├── senders_product.xml │ ├── services.xml │ ├── syncadapter_legacy_imap.xml │ ├── syncadapter_pop3.xml │ └── widget_info.xml ├── src └── com │ ├── android │ ├── email │ │ ├── EmailAddressValidator.java │ │ ├── EmailApplication.java │ │ ├── EmailNotificationController.java │ │ ├── StopWatch.java │ │ ├── activity │ │ │ ├── ComposeActivityEmail.java │ │ │ ├── ComposeActivityEmailExternal.java │ │ │ ├── ContactStatusLoader.java │ │ │ ├── EventViewer.java │ │ │ ├── InsertQuickResponseDialog.java │ │ │ ├── UiUtilities.java │ │ │ └── setup │ │ │ │ ├── AccountCheckSettingsFragment.java │ │ │ │ ├── AccountCreationFragment.java │ │ │ │ ├── AccountCredentials.java │ │ │ │ ├── AccountFinalizeFragment.java │ │ │ │ ├── AccountServerBaseFragment.java │ │ │ │ ├── AccountServerSettingsActivity.java │ │ │ │ ├── AccountSettingsEditQuickResponsesFragment.java │ │ │ │ ├── AccountSettingsFragment.java │ │ │ │ ├── AccountSetupABFragment.java │ │ │ │ ├── AccountSetupActivity.java │ │ │ │ ├── AccountSetupBasicsFragment.java │ │ │ │ ├── AccountSetupCredentialsFragment.java │ │ │ │ ├── AccountSetupFinal.java │ │ │ │ ├── AccountSetupFragment.java │ │ │ │ ├── AccountSetupIncomingFragment.java │ │ │ │ ├── AccountSetupNamesFragment.java │ │ │ │ ├── AccountSetupNoteDialogFragment.java │ │ │ │ ├── AccountSetupOptionsFragment.java │ │ │ │ ├── AccountSetupOutgoingFragment.java │ │ │ │ ├── AccountSetupTypeFragment.java │ │ │ │ ├── AuthenticationView.java │ │ │ │ ├── CheckSettingsErrorDialogFragment.java │ │ │ │ ├── CheckSettingsProgressDialogFragment.java │ │ │ │ ├── DebugFragment.java │ │ │ │ ├── DuplicateAccountDialogFragment.java │ │ │ │ ├── EditQuickResponseDialog.java │ │ │ │ ├── EmailPreferenceActivity.java │ │ │ │ ├── GeneralPreferences.java │ │ │ │ ├── HeadlessAccountSettingsLoader.java │ │ │ │ ├── MailboxSettings.java │ │ │ │ ├── OAuthAuthenticationActivity.java │ │ │ │ ├── PolicyListPreference.java │ │ │ │ ├── SecurityRequiredDialogFragment.java │ │ │ │ ├── SetupDataFragment.java │ │ │ │ └── SpinnerOption.java │ │ ├── data │ │ │ └── ClosingMatrixCursor.java │ │ ├── mail │ │ │ ├── internet │ │ │ │ └── EmailHtmlUtil.java │ │ │ └── transport │ │ │ │ ├── SmtpSender.java │ │ │ │ └── StatusOutputStream.java │ │ ├── preferences │ │ │ └── EmailPreferenceMigrator.java │ │ └── view │ │ │ └── CertificateSelector.java │ ├── email2 │ │ └── ui │ │ │ ├── CreateShortcutActivityEmail.java │ │ │ ├── MailActivityEmail.java │ │ │ └── MailboxSelectionActivityEmail.java │ └── mail │ │ ├── browse │ │ └── EmailConversationProvider.java │ │ └── providers │ │ └── EmailAccountCacheProvider.java │ └── beetstra │ └── jutf7 │ ├── Base64Util.java │ ├── CharsetProvider.java │ ├── ModifiedUTF7Charset.java │ ├── UTF7Charset.java │ ├── UTF7StyleCharset.java │ ├── UTF7StyleCharsetDecoder.java │ └── UTF7StyleCharsetEncoder.java └── tests ├── Android.mk ├── AndroidManifest.xml ├── AndroidTest.xml ├── res └── xml │ └── test_providers.xml └── src └── com └── android ├── email ├── AccountTestCase.java ├── ControllerProviderOpsTests.java ├── DBTestHelper.java ├── DummyFlakyTest.java ├── LegacyConversionsTest.java ├── LegacyConversionsTests.java ├── MessagingControllerUnitTests.java ├── MockClock.java ├── MockSharedPreferences.java ├── MockVendorPolicy.java ├── ResourceHelperTest.java ├── SecurityPolicyTests.java ├── TestUtils.java ├── ThrottleTest.java ├── VendorPolicyLoaderTest.java ├── activity │ ├── IntentUtilitiesTests.java │ ├── MessageViewTests.java │ └── setup │ │ ├── AccountSettingsUtilsTests.java │ │ ├── AccountSetupIncomingTests.java │ │ ├── AccountSetupOptionsTests.java │ │ ├── AccountSetupOutgoingTests.java │ │ └── EmailPreferenceActivityTests.java ├── mail │ ├── StoreTests.java │ ├── internet │ │ └── EmailHtmlUtilTest.java │ ├── store │ │ ├── ImapStoreUnitTests.java │ │ ├── Pop3StoreUnitTests.java │ │ └── imap │ │ │ ├── ImapElementTest.java │ │ │ ├── ImapListTest.java │ │ │ ├── ImapResponseParserTest.java │ │ │ ├── ImapResponseTest.java │ │ │ ├── ImapStringTest.java │ │ │ ├── ImapTestUtils.java │ │ │ └── ImapUtilityTests.java │ └── transport │ │ ├── DiscourseLoggerTest.java │ │ ├── MockTransport.java │ │ └── SmtpSenderUnitTests.java ├── provider │ ├── AccountBackupRestoreTests.java │ ├── AttachmentProviderTests.java │ ├── ContentCacheTests.java │ ├── PolicyTests.java │ ├── ProviderTestUtils.java │ └── ProviderTests.java └── service │ ├── AttachmentServiceTests.java │ └── EmailBroadcastProcessorServiceTests.java └── emailcommon ├── DeviceTests.java ├── internet ├── MimeBodyPartTest.java ├── MimeHeaderUnitTests.java ├── MimeMessageTest.java ├── MimeUtilityTest.java └── Rfc822OutputTests.java ├── mail ├── FlagTests.java ├── MessageTestUtils.java ├── MockFolder.java └── PackedStringTests.java ├── provider ├── AccountTest.java ├── HostAuthTests.java ├── MailboxTests.java └── QuickResponseTests.java ├── service └── SearchParamsTests.java └── utility ├── AttachmentUtilitiesTests.java ├── DelayedOperationsTests.java ├── EmailAsyncTaskTests.java ├── SSLUtilsTest.java ├── TextUtilitiesTests.java └── UtilityTest.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | AndroidMail 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /MODULE_LICENSE_APACHE2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/MODULE_LICENSE_APACHE2 -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | # Please update this list if you find better candidates. 2 | -------------------------------------------------------------------------------- /TEST_MAPPING: -------------------------------------------------------------------------------- 1 | { 2 | "presubmit": [ 3 | { 4 | "name": "EmailTests" 5 | } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /assets/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/assets/loading.gif -------------------------------------------------------------------------------- /assets/loading.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 |
6 | Loading... 7 |
8 |
9 |
10 |
11 |
12 | 13 |
16 | 17 | -------------------------------------------------------------------------------- /emailcommon/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 | # Build the com.android.emailcommon static library. At the moment, this includes 18 | # the emailcommon files themselves plus everything under src/org (apache code). All of our 19 | # AIDL files are also compiled into the static library 20 | 21 | include $(CLEAR_VARS) 22 | 23 | unified_email_unified_src_dir := ../../UnifiedEmail/unified_src 24 | unified_email_src_dir := ../../UnifiedEmail/src 25 | apache_src_dir := ../../UnifiedEmail/src/org 26 | 27 | imported_unified_email_files := \ 28 | $(unified_email_src_dir)/com/android/mail/utils/LogTag.java \ 29 | $(unified_email_src_dir)/com/android/mail/utils/LogUtils.java \ 30 | $(unified_email_src_dir)/com/android/mail/providers/UIProvider.java 31 | 32 | LOCAL_MODULE := com.android.emailcommon 33 | 34 | LOCAL_STATIC_JAVA_LIBRARIES := \ 35 | guava \ 36 | android-common \ 37 | androidx.annotation_annotation 38 | 39 | LOCAL_JAVA_LIBRARIES := \ 40 | org.apache.http.legacy 41 | 42 | LOCAL_STATIC_ANDROID_LIBRARIES += androidx.core_core 43 | 44 | LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/emailcommon) 45 | LOCAL_SRC_FILES += \ 46 | src/com/android/emailcommon/service/IEmailService.aidl \ 47 | src/com/android/emailcommon/service/IEmailServiceCallback.aidl \ 48 | src/com/android/emailcommon/service/IPolicyService.aidl \ 49 | src/com/android/emailcommon/service/IAccountService.aidl 50 | LOCAL_SRC_FILES += $(call all-java-files-under, $(apache_src_dir)) 51 | LOCAL_SRC_FILES += $(imported_unified_email_files) 52 | LOCAL_SRC_FILES += $(call all-java-files-under, $(unified_email_src_dir)/com/android/emailcommon) 53 | 54 | LOCAL_SDK_VERSION := current 55 | 56 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 57 | LOCAL_USE_AAPT2 := true 58 | 59 | include $(BUILD_STATIC_JAVA_LIBRARY) 60 | -------------------------------------------------------------------------------- /emailcommon/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /emailcommon/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 24 | 25 | Inbox 26 | 27 | Outbox 28 | 29 | Drafts 30 | 31 | Trash 32 | 33 | Sent 34 | 35 | Junk 36 | 37 | Starred 38 | 39 | Unread 40 | 41 | 42 | 43 | com.android.email 44 | 45 | -------------------------------------------------------------------------------- /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/IEmailService.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2010 Marc Blank 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.emailcommon.service; 19 | 20 | import com.android.emailcommon.service.HostAuthCompat; 21 | import com.android.emailcommon.service.IEmailServiceCallback; 22 | import com.android.emailcommon.service.SearchParams; 23 | 24 | import android.os.Bundle; 25 | 26 | interface IEmailService { 27 | // Core email operations. 28 | // Many of these functions return status codes. The valid status codes are defined in 29 | // EmailServiceStatus.java 30 | oneway void loadAttachment(IEmailServiceCallback cb, long accountId, long attachmentId, 31 | boolean background); 32 | 33 | void updateFolderList(long accountId); 34 | 35 | // TODO: For Eas, sync() will also sync the outbox. We should make IMAP and POP work the same 36 | // way and get rid of sendMail(). 37 | void sendMail(long accountId); 38 | 39 | int sync(long accountId, inout Bundle syncExtras); 40 | 41 | // Push-related functionality. 42 | 43 | // Notify the service that the push configuration has changed for an account. 44 | void pushModify(long accountId); 45 | 46 | // Other email operations. 47 | Bundle validate(in HostAuthCompat hostauth); 48 | 49 | int searchMessages(long accountId, in SearchParams params, long destMailboxId); 50 | 51 | // PIM functionality (not strictly EAS specific). 52 | oneway void sendMeetingResponse(long messageId, int response); 53 | 54 | // Specific to EAS protocol. 55 | // TODO: this passes a HostAuth back in the bundle. We should be using a HostAuthCom for that. 56 | Bundle autoDiscover(String userName, String password); 57 | 58 | // Service control operations (i.e. does not generate a client-server message). 59 | // TODO: We should store the logging flags in the contentProvider, and this call should just 60 | // trigger the service to reload the flags. 61 | oneway void setLogging(int flags); 62 | 63 | void deleteExternalAccountPIMData(String emailAddress); 64 | 65 | int getApiVersion(); 66 | } 67 | -------------------------------------------------------------------------------- /emailcommon/src/com/android/emailcommon/service/IEmailServiceCallback.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2009 Marc Blank 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.emailcommon.service; 19 | 20 | oneway interface IEmailServiceCallback { 21 | /* 22 | * Ordinary results: 23 | * statuscode = 1, progress = 0: "starting" 24 | * statuscode = 0, progress = n/a: "finished" 25 | * 26 | * If there is an error, it must be reported as follows: 27 | * statuscode = err, progress = n/a: "stopping due to error" 28 | * 29 | * *Optionally* a callback can also include intermediate values from 1..99 e.g. 30 | * statuscode = 1, progress = 0: "starting" 31 | * statuscode = 1, progress = 30: "working" 32 | * statuscode = 1, progress = 60: "working" 33 | * statuscode = 0, progress = n/a: "finished" 34 | */ 35 | 36 | /** 37 | * Callback to indicate that a particular attachment is being synced 38 | * messageId = the message that owns the attachment 39 | * attachmentId = the attachment being synced 40 | * statusCode = 0 for OK, 1 for progress, other codes for error 41 | * progress = 0 for "start", 1..100 for optional progress reports 42 | */ 43 | void loadAttachmentStatus(long messageId, long attachmentId, int statusCode, int progress); 44 | } 45 | -------------------------------------------------------------------------------- /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 14; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /emailcommon/src/com/android/emailcommon/utility/CertificateRequestor.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.utility; 19 | 20 | import android.app.Activity; 21 | import android.content.Intent; 22 | import android.net.Uri; 23 | import android.os.Bundle; 24 | import android.security.KeyChain; 25 | import android.security.KeyChainAliasCallback; 26 | 27 | /** 28 | * A headless Activity which simply calls into the framework {@link KeyChain} service to select 29 | * a certificate to use for establishing secure connections in the Email app. 30 | */ 31 | public class CertificateRequestor extends Activity implements KeyChainAliasCallback { 32 | public static final String EXTRA_HOST = "CertificateRequestor.host"; 33 | public static final String EXTRA_PORT = "CertificateRequestor.port"; 34 | 35 | public static final String RESULT_ALIAS = "CertificateRequestor.alias"; 36 | 37 | public static final Uri CERTIFICATE_REQUEST_URI = 38 | Uri.parse("eas://com.android.emailcommon/certrequest"); 39 | 40 | @Override 41 | protected void onCreate(Bundle savedInstanceState) { 42 | super.onCreate(savedInstanceState); 43 | 44 | Intent i = getIntent(); 45 | String host = i.getStringExtra(EXTRA_HOST); 46 | int port = i.getIntExtra(EXTRA_PORT, -1); 47 | 48 | if (savedInstanceState == null) { 49 | KeyChain.choosePrivateKeyAlias( 50 | this, this, 51 | null /* keytypes */, null /* issuers */, 52 | host, port, 53 | null /* alias */); 54 | } 55 | } 56 | 57 | /** 58 | * Callback for the certificate request. Does not happen on the UI thread. 59 | */ 60 | @Override 61 | public void alias(String alias) { 62 | if (alias == null) { 63 | setResult(RESULT_CANCELED); 64 | } else { 65 | Intent data = new Intent(); 66 | data.putExtra(RESULT_ALIAS, alias); 67 | setResult(RESULT_OK, data); 68 | } 69 | finish(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /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 9 | -------------------------------------------------------------------------------- /provider_src/com/android/email/DebugUtils.java: -------------------------------------------------------------------------------- 1 | package com.android.email; 2 | 3 | import android.content.Context; 4 | 5 | import com.android.email.service.EmailServiceUtils; 6 | import com.android.emailcommon.service.EmailServiceProxy; 7 | import com.android.emailcommon.utility.Utility; 8 | import com.android.mail.utils.LogTag; 9 | 10 | public class DebugUtils { 11 | public static final String LOG_TAG = LogTag.getLogTag(); 12 | 13 | public static boolean DEBUG; 14 | public static boolean DEBUG_EXCHANGE; 15 | public static boolean DEBUG_FILE; 16 | 17 | public static void init(final Context context) { 18 | final Preferences prefs = Preferences.getPreferences(context); 19 | DEBUG = prefs.getEnableDebugLogging(); 20 | DEBUG_EXCHANGE = prefs.getEnableExchangeLogging(); 21 | DEBUG_FILE = prefs.getEnableExchangeFileLogging(); 22 | 23 | // Enable logging in the EAS service, so it starts up as early as possible. 24 | updateLoggingFlags(context); 25 | enableStrictMode(prefs.getEnableStrictMode()); 26 | } 27 | 28 | /** 29 | * Load enabled debug flags from the preferences and update the EAS debug flag. 30 | */ 31 | public static void updateLoggingFlags(Context context) { 32 | Preferences prefs = Preferences.getPreferences(context); 33 | int debugLogging = prefs.getEnableDebugLogging() ? EmailServiceProxy.DEBUG_BIT : 0; 34 | int exchangeLogging = 35 | prefs.getEnableExchangeLogging() ? EmailServiceProxy.DEBUG_EXCHANGE_BIT: 0; 36 | int fileLogging = 37 | prefs.getEnableExchangeFileLogging() ? EmailServiceProxy.DEBUG_FILE_BIT : 0; 38 | int enableStrictMode = 39 | prefs.getEnableStrictMode() ? EmailServiceProxy.DEBUG_ENABLE_STRICT_MODE : 0; 40 | int debugBits = debugLogging | exchangeLogging | fileLogging | enableStrictMode; 41 | EmailServiceUtils.setRemoteServicesLogging(context, debugBits); 42 | } 43 | 44 | public static void enableStrictMode(final boolean enable) { 45 | Utility.enableStrictMode(enable); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /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(); 33 | } 34 | 35 | @Override 36 | protected void onHandleWork(final Intent intent) { 37 | super.onHandleWork(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/FixedLengthInputStream.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 java.io.IOException; 20 | import java.io.InputStream; 21 | 22 | /** 23 | * A filtering InputStream that stops allowing reads after the given length has been read. This 24 | * is used to allow a client to read directly from an underlying protocol stream without reading 25 | * past where the protocol handler intended the client to read. 26 | */ 27 | public class FixedLengthInputStream extends InputStream { 28 | private final InputStream mIn; 29 | private final int mLength; 30 | private int mCount; 31 | 32 | public FixedLengthInputStream(InputStream in, int length) { 33 | this.mIn = in; 34 | this.mLength = length; 35 | } 36 | 37 | @Override 38 | public int available() throws IOException { 39 | return mLength - mCount; 40 | } 41 | 42 | @Override 43 | public int read() throws IOException { 44 | if (mCount < mLength) { 45 | mCount++; 46 | return mIn.read(); 47 | } else { 48 | return -1; 49 | } 50 | } 51 | 52 | @Override 53 | public int read(byte[] b, int offset, int length) throws IOException { 54 | if (mCount < mLength) { 55 | int d = mIn.read(b, offset, Math.min(mLength - mCount, length)); 56 | if (d == -1) { 57 | return -1; 58 | } else { 59 | mCount += d; 60 | return d; 61 | } 62 | } else { 63 | return -1; 64 | } 65 | } 66 | 67 | @Override 68 | public int read(byte[] b) throws IOException { 69 | return read(b, 0, b.length); 70 | } 71 | 72 | public int getLength() { 73 | return mLength; 74 | } 75 | 76 | @Override 77 | public String toString() { 78 | return String.format("FixedLengthInputStream(in=%s, length=%d)", mIn.toString(), mLength); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /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/PeekableInputStream.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 java.io.IOException; 20 | import java.io.InputStream; 21 | 22 | /** 23 | * A filtering InputStream that allows single byte "peeks" without consuming the byte. The 24 | * client of this stream can call peek() to see the next available byte in the stream 25 | * and a subsequent read will still return the peeked byte. 26 | */ 27 | public class PeekableInputStream extends InputStream { 28 | private final InputStream mIn; 29 | private boolean mPeeked; 30 | private int mPeekedByte; 31 | 32 | public PeekableInputStream(InputStream in) { 33 | this.mIn = in; 34 | } 35 | 36 | @Override 37 | public int read() throws IOException { 38 | if (!mPeeked) { 39 | return mIn.read(); 40 | } else { 41 | mPeeked = false; 42 | return mPeekedByte; 43 | } 44 | } 45 | 46 | public int peek() throws IOException { 47 | if (!mPeeked) { 48 | mPeekedByte = read(); 49 | mPeeked = true; 50 | } 51 | return mPeekedByte; 52 | } 53 | 54 | @Override 55 | public int read(byte[] b, int offset, int length) throws IOException { 56 | if (!mPeeked) { 57 | return mIn.read(b, offset, length); 58 | } else { 59 | b[0] = (byte)mPeekedByte; 60 | mPeeked = false; 61 | int r = mIn.read(b, offset + 1, length - 1); 62 | if (r == -1) { 63 | return 1; 64 | } else { 65 | return r + 1; 66 | } 67 | } 68 | } 69 | 70 | @Override 71 | public int read(byte[] b) throws IOException { 72 | return read(b, 0, b.length); 73 | } 74 | 75 | @Override 76 | public String toString() { 77 | return String.format("PeekableInputStream(in=%s, peeked=%b, peekedByte=%d)", 78 | mIn.toString(), mPeeked, mPeekedByte); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /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/ImapMemoryLiteral.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.FixedLengthInputStream; 20 | import com.android.emailcommon.Logging; 21 | import com.android.emailcommon.utility.Utility; 22 | import com.android.mail.utils.LogUtils; 23 | 24 | import java.io.ByteArrayInputStream; 25 | import java.io.IOException; 26 | import java.io.InputStream; 27 | 28 | /** 29 | * Subclass of {@link ImapString} used for literals backed by an in-memory byte array. 30 | */ 31 | public class ImapMemoryLiteral extends ImapString { 32 | private byte[] mData; 33 | 34 | /* package */ ImapMemoryLiteral(FixedLengthInputStream in) throws IOException { 35 | // We could use ByteArrayOutputStream and IOUtils.copy, but it'd perform an unnecessary 36 | // copy.... 37 | mData = new byte[in.getLength()]; 38 | int pos = 0; 39 | while (pos < mData.length) { 40 | int read = in.read(mData, pos, mData.length - pos); 41 | if (read < 0) { 42 | break; 43 | } 44 | pos += read; 45 | } 46 | if (pos != mData.length) { 47 | LogUtils.w(Logging.LOG_TAG, ""); 48 | } 49 | } 50 | 51 | @Override 52 | public void destroy() { 53 | mData = null; 54 | super.destroy(); 55 | } 56 | 57 | @Override 58 | public String getString() { 59 | return Utility.fromAscii(mData); 60 | } 61 | 62 | @Override 63 | public InputStream getAsStream() { 64 | return new ByteArrayInputStream(mData); 65 | } 66 | 67 | @Override 68 | public String toString() { 69 | return String.format("{%d byte literal(memory)}", mData.length); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /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/AccountBackupRestore.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.provider; 18 | 19 | import android.content.ContentResolver; 20 | import android.content.Context; 21 | 22 | /** 23 | * Helper class to facilitate EmailProvider's account backup/restore facility. 24 | * 25 | * Account backup/restore was implemented entirely for the purpose of recovering from database 26 | * corruption errors that were/are sporadic and of undetermined cause (though the prevailing wisdom 27 | * is that this is due to some kind of memory issue). Rather than have the offending database get 28 | * deleted by SQLiteDatabase and forcing the user to recreate his accounts from scratch, it was 29 | * decided to backup accounts when created/modified and then restore them if 1) there are no 30 | * accounts in the database and 2) there are backup accounts. This, at least, would cause user's 31 | * email data for IMAP/EAS to be re-synced and prevent the worst outcomes from occurring. 32 | * 33 | * To accomplish backup/restore, we use the facility now built in to EmailProvider to store a 34 | * backup version of the Account and HostAuth tables in a second database (EmailProviderBackup.db) 35 | * 36 | * TODO: We might look into having our own DatabaseErrorHandler that tries to be clever about 37 | * determining whether or not a "corrupt" database is truly corrupt; the problem here is that it 38 | * has proven impossible to reproduce the bug, and therefore any "solution" of this kind of utterly 39 | * impossible to test in the wild. 40 | */ 41 | public class AccountBackupRestore { 42 | /** 43 | * Backup user Account and HostAuth data into our backup database 44 | * 45 | * TODO Make EmailProvider do this automatically. 46 | */ 47 | public static void backup(Context context) { 48 | ContentResolver resolver = context.getContentResolver(); 49 | resolver.update(EmailProvider.ACCOUNT_BACKUP_URI, null, null, null); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /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/provider/FolderPickerSelectorAdapter.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 android.content.Context; 21 | import android.database.Cursor; 22 | 23 | import com.android.mail.providers.Folder; 24 | import com.android.mail.providers.UIProvider.FolderCapabilities; 25 | import com.android.mail.ui.HierarchicalFolderSelectorAdapter; 26 | 27 | import java.util.Set; 28 | 29 | public class FolderPickerSelectorAdapter extends HierarchicalFolderSelectorAdapter { 30 | 31 | public FolderPickerSelectorAdapter(Context context, Cursor folders, 32 | Set initiallySelected, int layout) { 33 | super(context, folders, initiallySelected, layout); 34 | } 35 | 36 | /** 37 | * Return whether the supplied folder meets the requirements to be displayed 38 | * in the folder list. 39 | */ 40 | @Override 41 | protected boolean meetsRequirements(Folder folder) { 42 | // We only want to show the non-Trash folders that can accept moved messages 43 | return folder.supportsCapability(FolderCapabilities.CAN_ACCEPT_MOVED_MESSAGES) 44 | || folder.isTrash(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /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/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/LegacyImapSyncAdapterService.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 LegacyImapSyncAdapterService extends PopImapSyncAdapterService { 20 | } -------------------------------------------------------------------------------- /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/setup/AuthenticatorSetupIntentHelper.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.setup; 18 | 19 | import android.content.ComponentName; 20 | import android.content.Context; 21 | import android.content.Intent; 22 | 23 | 24 | public class AuthenticatorSetupIntentHelper { 25 | // NORMAL is the standard entry from the Email app; EAS and POP_IMAP are used when entering via 26 | // Settings -> Accounts 27 | public static final int FLOW_MODE_UNSPECIFIED = -1; 28 | public static final int FLOW_MODE_NORMAL = 0; 29 | public static final int FLOW_MODE_ACCOUNT_MANAGER = 1; 30 | public static final int FLOW_MODE_EDIT = 3; 31 | public static final int FLOW_MODE_FORCE_CREATE = 4; 32 | 33 | public static final int FLOW_MODE_NO_ACCOUNTS = 8; 34 | 35 | 36 | public static final String EXTRA_FLOW_MODE = "FLOW_MODE"; 37 | public static final String EXTRA_FLOW_ACCOUNT_TYPE = "FLOW_ACCOUNT_TYPE"; 38 | 39 | 40 | public static Intent actionNewAccountIntent(final Context context) { 41 | final Intent i = new Intent(); 42 | i.setComponent( 43 | new ComponentName(context, "com.android.email.activity.setup.AccountSetupFinal")); 44 | i.putExtra(EXTRA_FLOW_MODE, FLOW_MODE_NORMAL); 45 | return i; 46 | } 47 | 48 | public static Intent actionNewAccountWithResultIntent(final Context context) { 49 | final Intent i = new Intent(); 50 | i.setComponent( 51 | new ComponentName(context, "com.android.email.activity.setup.AccountSetupFinal")); 52 | i.putExtra(EXTRA_FLOW_MODE, FLOW_MODE_NO_ACCOUNTS); 53 | return i; 54 | } 55 | 56 | public static Intent actionGetCreateAccountIntent( 57 | final Context context, final String accountManagerType) { 58 | final Intent i = new Intent(); 59 | i.setComponent( 60 | new ComponentName(context, "com.android.email.activity.setup.AccountSetupFinal")); 61 | i.putExtra(EXTRA_FLOW_MODE, FLOW_MODE_ACCOUNT_MANAGER); 62 | i.putExtra(EXTRA_FLOW_ACCOUNT_TYPE, accountManagerType); 63 | return i; 64 | } 65 | } -------------------------------------------------------------------------------- /res/color/buttontext.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_add_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-hdpi/ic_add_24dp.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_exchange_minitab_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-hdpi/ic_exchange_minitab_selected.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_exchange_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-hdpi/ic_exchange_selected.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_setup_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-hdpi/ic_setup_delete.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_add_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-mdpi/ic_add_24dp.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_exchange_minitab_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-mdpi/ic_exchange_minitab_selected.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_exchange_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-mdpi/ic_exchange_selected.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_setup_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-mdpi/ic_setup_delete.png -------------------------------------------------------------------------------- /res/drawable-nodpi/mail_widget_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/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/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-xhdpi/ic_add_24dp.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_exchange_minitab_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-xhdpi/ic_exchange_minitab_selected.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_exchange_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-xhdpi/ic_exchange_selected.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_setup_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-xhdpi/ic_setup_delete.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_add_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/res/drawable-xxhdpi/ic_add_24dp.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_setup_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_packages_apps_email/9822725da07cc150f2410ad5360549018c3fbb1c/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 | 22 | 23 |