From b46594fed41d6c7a1abc8f514b0ba1876c9b8201 Mon Sep 17 00:00:00 2001 From: cketti Date: Sun, 1 Jul 2018 13:39:01 +0200 Subject: [PATCH] Move UI code to ui module --- app/core/build.gradle | 25 +----- app/core/src/main/java/com/fsck/k9/Core.kt | 8 +- app/core/src/main/java/com/fsck/k9/K9.java | 3 +- .../src/main/java/com/fsck/k9/KoinModule.kt | 2 - .../com/fsck/k9/cache/EmailProviderCache.java | 4 +- .../k9/service/DatabaseUpgradeService.java | 8 +- .../MessageCryptoStructureDetectorTest.java | 6 +- .../MessageViewInfoExtractorTest.java | 20 +++-- app/k9mail/build.gradle | 11 +-- app/k9mail/src/main/java/com/fsck/k9/App.kt | 2 +- .../com/fsck/k9/DependencyInjectionTest.kt | 16 ++-- .../org.mockito.plugins.MockMaker | 1 + app/ui/build.gradle | 78 ++++++++++++++++++ app/ui/src/main/AndroidManifest.xml | 2 + .../src/main/assets/downloading.html | 0 app/{core => ui}/src/main/assets/icon.png | Bin app/{core => ui}/src/main/assets/loading.gif | Bin .../main/java/com/fsck/k9/UiKoinModules.kt | 13 +++ .../com/fsck/k9/activity/AccountList.java | 2 +- .../java/com/fsck/k9/activity/Accounts.java | 2 +- .../fsck/k9/activity/ActivityListener.java | 2 +- .../activity/AlternateRecipientAdapter.java | 2 +- .../com/fsck/k9/activity/ChooseAccount.java | 0 .../com/fsck/k9/activity/ChooseFolder.java | 2 +- .../com/fsck/k9/activity/ChooseIdentity.java | 2 +- .../com/fsck/k9/activity/ColorChipProvider.kt | 0 .../fsck/k9/activity/ConfirmationDialog.java | 0 .../com/fsck/k9/activity/EditIdentity.java | 2 +- .../fsck/k9/activity/EmailAddressList.java | 2 +- .../fsck/k9/activity/FolderInfoHolder.java | 2 +- .../java/com/fsck/k9/activity/FolderList.java | 2 +- .../fsck/k9/activity/FolderListFilter.java | 0 .../java/com/fsck/k9/activity/K9Activity.java | 0 .../fsck/k9/activity/K9ActivityCommon.java | 0 .../com/fsck/k9/activity/K9ListActivity.java | 0 .../k9/activity/K9PreferenceActivity.java | 0 .../java/com/fsck/k9/activity/KoinModule.kt | 2 +- .../fsck/k9/activity/LauncherShortcuts.java | 2 +- .../fsck/k9/activity/ManageIdentities.java | 2 +- .../com/fsck/k9/activity/MessageCompose.java | 2 +- .../com/fsck/k9/activity/MessageList.java | 2 +- .../fsck/k9/activity/MessageLoaderHelper.java | 0 .../NotificationDeleteConfirmation.java | 2 +- .../java/com/fsck/k9/activity/Search.java | 0 .../fsck/k9/activity/UpgradeDatabases.java | 2 +- .../activity/compose/AttachmentPresenter.java | 0 .../activity/compose/ComposeCryptoStatus.java | 0 .../k9/activity/compose/IdentityAdapter.java | 2 +- .../k9/activity/compose/MessageActions.java | 0 .../compose/PgpEnabledErrorDialog.java | 2 +- .../compose/PgpEncryptDescriptionDialog.java | 2 +- .../k9/activity/compose/PgpInlineDialog.java | 2 +- .../activity/compose/PgpSignOnlyDialog.java | 2 +- .../k9/activity/compose/RecipientAdapter.java | 2 +- .../k9/activity/compose/RecipientLoader.java | 2 +- .../k9/activity/compose/RecipientMvpView.java | 2 +- .../activity/compose/RecipientPresenter.java | 2 +- .../k9/activity/compose/SaveMessageTask.java | 0 .../loader/AttachmentContentLoader.java | 0 .../activity/loader/AttachmentInfoLoader.java | 0 .../com/fsck/k9/activity/misc/Attachment.java | 0 .../fsck/k9/activity/misc/ContactPicture.java | 2 +- .../activity/misc/ContactPictureLoader.java | 0 .../k9/activity/misc/ExtendedAsyncTask.java | 0 .../misc/NonConfigurationInstance.java | 0 .../activity/misc/SwipeGestureDetector.java | 0 .../setup/AccountSetupAccountType.java | 2 +- .../k9/activity/setup/AccountSetupBasics.java | 2 +- .../setup/AccountSetupCheckSettings.java | 2 +- .../setup/AccountSetupComposition.java | 2 +- .../activity/setup/AccountSetupIncoming.java | 2 +- .../k9/activity/setup/AccountSetupNames.java | 2 +- .../activity/setup/AccountSetupOptions.java | 2 +- .../activity/setup/AccountSetupOutgoing.java | 2 +- .../k9/activity/setup/AuthTypeAdapter.java | 0 .../k9/activity/setup/AuthTypeHolder.java | 2 +- .../setup/ConnectionSecurityAdapter.java | 0 .../setup/ConnectionSecurityHolder.java | 2 +- .../k9/activity/setup/FolderSettings.java | 2 +- .../k9/activity/setup/FontSizeSettings.java | 2 +- .../k9/activity/setup/SliderPreference.java | 2 +- .../fsck/k9/activity/setup/SpinnerOption.java | 0 .../k9/activity/setup/WelcomeMessage.java | 2 +- .../AttachmentDownloadDialogFragment.java | 0 .../fragment/ConfirmationDialogFragment.java | 0 .../fsck/k9/fragment/MLFProjectionInfo.java | 0 .../fsck/k9/fragment/MessageListAdapter.java | 2 +- .../fsck/k9/fragment/MessageListFragment.java | 2 +- .../MessageListFragmentComparators.java | 0 .../fsck/k9/fragment/MessageListHandler.java | 0 .../fsck/k9/fragment/MessageViewHolder.java | 2 +- .../java/com/fsck/k9/fragment/MlfUtils.java | 0 .../k9/fragment/ProgressDialogFragment.java | 0 .../java/com/fsck/k9/ui/ContactBadge.java | 2 +- .../com/fsck/k9/ui/EolConvertingEditText.java | 0 .../java/com/fsck/k9/ui/FragmentExtras.kt | 0 .../main/java/com/fsck/k9/ui/KoinModule.kt | 8 ++ .../java/com/fsck/k9/ui/LiveDataExtras.kt | 0 .../fsck/k9/ui/account/AccountsLiveData.kt | 0 .../k9/ui/compose/QuotedMessageMvpView.java | 2 +- .../k9/ui/compose/QuotedMessagePresenter.java | 0 .../k9/ui/crypto/MessageCryptoCallback.java | 0 .../k9/ui/crypto/MessageCryptoHelper.java | 0 .../fsck/k9/ui/crypto/OpenPgpApiFactory.java | 0 .../dialog/ApgDeprecationWarningDialog.java | 2 +- .../endtoend/AutocryptKeyTransferActivity.kt | 2 +- .../endtoend/AutocryptKeyTransferPresenter.kt | 0 .../endtoend/AutocryptKeyTransferViewModel.kt | 0 .../AutocryptSetupMessageLiveEvent.kt | 0 .../AutocryptSetupTransferLiveEvent.kt | 0 .../com/fsck/k9/ui/endtoend/KoinModule.kt | 0 .../fsck/k9/ui/folders/FolderNameFormatter.kt | 2 +- .../message/LocalMessageExtractorLoader.java | 0 .../k9/ui/message/LocalMessageLoader.java | 0 .../k9/ui/messagelist/MessageListViewModel.kt | 0 .../MessageListViewModelFactory.kt | 0 .../ui/messageview/AttachmentController.java | 2 +- .../k9/ui/messageview/AttachmentView.java | 2 +- .../messageview/AttachmentViewCallback.java | 0 .../k9/ui/messageview/CryptoInfoDialog.java | 2 +- .../k9/ui/messageview/DownloadImageTask.java | 2 +- .../ui/messageview/LockedAttachmentView.java | 2 +- .../ui/messageview/MessageContainerView.java | 2 +- .../messageview/MessageCryptoPresenter.java | 0 .../k9/ui/messageview/MessageTopView.java | 2 +- .../ui/messageview/MessageViewFragment.java | 2 +- .../ui/messageview/OnCryptoClickListener.java | 0 .../com/fsck/k9/ui/settings/AboutActivity.kt | 2 +- .../com/fsck/k9/ui/settings/AccountItem.kt | 2 +- .../com/fsck/k9/ui/settings/KoinModule.kt | 0 .../fsck/k9/ui/settings/PreferenceExtras.kt | 0 .../com/fsck/k9/ui/settings/SettingsAction.kt | 0 .../fsck/k9/ui/settings/SettingsActionItem.kt | 2 +- .../fsck/k9/ui/settings/SettingsActivity.kt | 2 +- .../fsck/k9/ui/settings/SettingsViewModel.kt | 0 .../account/AccountSettingsActivity.kt | 2 +- .../account/AccountSettingsDataStore.kt | 0 .../AccountSettingsDataStoreFactory.kt | 0 .../account/AccountSettingsFragment.kt | 2 +- .../account/AccountSettingsViewModel.kt | 0 .../AutocryptPreferEncryptDialogFragment.kt | 2 +- .../AutocryptPreferEncryptPreference.kt | 2 +- .../settings/account/FolderListPreference.kt | 0 .../account/HoloColorPickerDialogFragment.kt | 2 +- .../account/HoloColorPickerPreference.kt | 0 .../account/OpenPgpAppSelectDialog.java | 2 +- .../general/GeneralSettingsActivity.kt | 2 +- .../general/GeneralSettingsDataStore.kt | 0 .../general/GeneralSettingsFragment.kt | 2 +- .../ui/settings/general/LanguagePreference.kt | 2 +- .../k9/view/ClientCertificateSpinner.java | 2 +- .../main/java/com/fsck/k9/view/ColorChip.java | 0 .../fsck/k9/view/FoldableLinearLayout.java | 2 +- .../fsck/k9/view/HighlightDialogFragment.java | 2 +- .../com/fsck/k9/view/K9WebViewClient.java | 0 .../com/fsck/k9/view/LinearViewAnimator.java | 2 +- .../k9/view/MessageCryptoDisplayStatus.java | 2 +- .../fsck/k9/view/MessageCryptoStatusView.java | 2 +- .../java/com/fsck/k9/view/MessageHeader.java | 2 +- .../com/fsck/k9/view/MessageTitleView.java | 0 .../java/com/fsck/k9/view/MessageWebView.java | 2 +- .../fsck/k9/view/NonLockingScrollView.java | 0 .../com/fsck/k9/view/RecipientSelectView.java | 2 +- .../java/com/fsck/k9/view/RigidWebView.java | 0 .../com/fsck/k9/view/StatusIndicator.java | 2 +- .../java/com/fsck/k9/view/ThemeUtils.java | 0 .../fsck/k9/view/ToolableViewAnimator.java | 2 +- .../java/com/fsck/k9/view/ViewSwitcher.java | 0 .../src/main/res/anim/fade_in.xml | 0 .../src/main/res/anim/fade_in_left.xml | 0 .../src/main/res/anim/fade_in_right.xml | 0 .../src/main/res/anim/fade_out.xml | 0 .../src/main/res/anim/fade_out_left.xml | 0 .../src/main/res/anim/fade_out_right.xml | 0 .../src/main/res/anim/slide_in_left.xml | 0 .../src/main/res/anim/slide_in_right.xml | 0 .../src/main/res/anim/slide_out_left.xml | 0 .../src/main/res/anim/slide_out_right.xml | 0 .../main/res/layout-land/actionbar_custom.xml | 0 .../src/main/res/layout/about.xml | 0 .../src/main/res/layout/account_list.xml | 0 .../src/main/res/layout/account_list_item.xml | 0 .../res/layout/account_setup_account_type.xml | 0 .../main/res/layout/account_setup_basics.xml | 0 .../layout/account_setup_check_settings.xml | 0 .../res/layout/account_setup_composition.xml | 0 .../res/layout/account_setup_incoming.xml | 0 .../main/res/layout/account_setup_names.xml | 0 .../main/res/layout/account_setup_options.xml | 0 .../res/layout/account_setup_outgoing.xml | 0 .../src/main/res/layout/accounts.xml | 0 .../res/layout/accounts_folders_icons.xml | 0 .../src/main/res/layout/accounts_item.xml | 0 .../res/layout/accounts_password_prompt.xml | 0 .../src/main/res/layout/actionbar_custom.xml | 0 ...nbar_indeterminate_progress_actionview.xml | 0 .../res/layout/activity_account_settings.xml | 0 .../src/main/res/layout/activity_settings.xml | 0 .../main/res/layout/choose_account_item.xml | 0 .../main/res/layout/choose_identity_item.xml | 0 .../res/layout/client_certificate_spinner.xml | 0 .../main/res/layout/crypto_key_transfer.xml | 0 .../main/res/layout/crypto_mode_selector.xml | 0 .../main/res/layout/dialog_apg_deprecated.xml | 0 .../dialog_autocrypt_prefer_encrypt.xml | 0 .../res/layout/dialog_openkeychain_info.xml | 0 .../src/main/res/layout/edit_identity.xml | 0 .../main/res/layout/email_address_list.xml | 0 .../res/layout/email_address_list_item.xml | 0 .../main/res/layout/empty_message_view.xml | 0 .../main/res/layout/foldable_linearlayout.xml | 0 .../src/main/res/layout/folder_list.xml | 0 .../src/main/res/layout/folder_list_item.xml | 0 .../src/main/res/layout/general_settings.xml | 0 .../res/layout/holo_color_picker_dialog.xml | 0 .../main/res/layout/list_content_simple.xml | 0 .../src/main/res/layout/message.xml | 0 .../src/main/res/layout/message_compose.xml | 0 .../res/layout/message_compose_attachment.xml | 0 .../res/layout/message_compose_recipients.xml | 0 .../src/main/res/layout/message_container.xml | 0 .../message_content_crypto_cancelled.xml | 0 .../layout/message_content_crypto_error.xml | 0 .../message_content_crypto_incomplete.xml | 0 .../message_content_crypto_no_provider.xml | 0 .../res/layout/message_crypto_info_dialog.xml | 0 .../res/layout/message_crypto_status_view.xml | 0 .../src/main/res/layout/message_list.xml | 0 .../main/res/layout/message_list_fragment.xml | 0 .../src/main/res/layout/message_list_item.xml | 0 .../res/layout/message_list_item_footer.xml | 0 .../main/res/layout/message_list_loading.xml | 0 .../res/layout/message_view_attachment.xml | 0 .../layout/message_view_attachment_locked.xml | 0 .../main/res/layout/message_view_header.xml | 0 .../layout/openpgp_enabled_error_dialog.xml | 0 .../openpgp_encrypt_description_dialog.xml | 0 .../main/res/layout/openpgp_inline_dialog.xml | 0 .../res/layout/openpgp_sign_only_dialog.xml | 0 .../res/layout/recipient_alternate_item.xml | 0 .../res/layout/recipient_dropdown_item.xml | 0 .../main/res/layout/recipient_token_item.xml | 0 .../res/layout/select_openpgp_app_item.xml | 0 .../res/layout/slider_preference_dialog.xml | 0 .../main/res/layout/split_message_list.xml | 0 .../src/main/res/layout/status_indicator.xml | 0 .../src/main/res/layout/text_list_item.xml | 0 .../src/main/res/layout/upgrade_databases.xml | 0 .../src/main/res/layout/welcome_message.xml | 0 .../src/main/res/layout/wizard_cancel.xml | 0 .../src/main/res/layout/wizard_done.xml | 0 .../src/main/res/layout/wizard_next.xml | 0 .../src/main/res/layout/wizard_setup.xml | 0 .../src/main/res/layout/wizard_welcome.xml | 0 .../src/main/res/menu/about_option.xml | 0 .../src/main/res/menu/accounts_context.xml | 0 .../src/main/res/menu/accounts_option.xml | 0 .../res/menu/disabled_accounts_context.xml | 0 .../src/main/res/menu/folder_context.xml | 0 .../src/main/res/menu/folder_list_option.xml | 0 .../main/res/menu/folder_select_option.xml | 0 .../res/menu/manage_identities_context.xml | 0 .../res/menu/manage_identities_option.xml | 0 .../main/res/menu/message_compose_option.xml | 0 .../main/res/menu/message_list_context.xml | 0 .../res/menu/message_list_item_context.xml | 0 .../src/main/res/menu/message_list_option.xml | 0 .../java/com/fsck/k9/K9RobolectricTest.kt | 16 ++++ .../test/java/com/fsck/k9/RobolectricTest.kt | 17 ++++ app/ui/src/test/java/com/fsck/k9/TestApp.kt | 20 +++++ .../k9/activity/ActivityListenerTest.java | 0 .../activity/compose/RecipientLoaderTest.java | 0 .../compose/RecipientPresenterTest.java | 0 .../misc/ContactPictureLoaderTest.java | 0 .../k9/ui/crypto/MessageCryptoHelperTest.java | 6 +- .../com/fsck/k9/view/MessageHeaderTest.kt | 0 .../openpgp/util/ShadowOpenPgpAsyncTask.java | 0 build.gradle | 10 +++ .../mail}/TestMessageConstructionUtils.java | 5 +- settings.gradle | 1 + 280 files changed, 288 insertions(+), 156 deletions(-) rename app/{core => k9mail}/src/test/java/com/fsck/k9/DependencyInjectionTest.kt (64%) create mode 100644 app/k9mail/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker create mode 100644 app/ui/build.gradle create mode 100644 app/ui/src/main/AndroidManifest.xml rename app/{core => ui}/src/main/assets/downloading.html (100%) rename app/{core => ui}/src/main/assets/icon.png (100%) rename app/{core => ui}/src/main/assets/loading.gif (100%) create mode 100644 app/ui/src/main/java/com/fsck/k9/UiKoinModules.kt rename app/{core => ui}/src/main/java/com/fsck/k9/activity/AccountList.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/Accounts.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/ActivityListener.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/ChooseAccount.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/ChooseFolder.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/ChooseIdentity.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/ColorChipProvider.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/ConfirmationDialog.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/EditIdentity.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/EmailAddressList.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/FolderList.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/FolderListFilter.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/K9Activity.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/K9ActivityCommon.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/K9ListActivity.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/KoinModule.kt (72%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/LauncherShortcuts.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/ManageIdentities.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/MessageCompose.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/MessageList.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/Search.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/IdentityAdapter.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/MessageActions.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/compose/SaveMessageTask.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/misc/Attachment.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/misc/ContactPicture.java (96%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/misc/ContactPictureLoader.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/misc/ExtendedAsyncTask.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/misc/NonConfigurationInstance.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/misc/SwipeGestureDetector.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AccountSetupComposition.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AccountSetupNames.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AccountSetupOptions.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AuthTypeAdapter.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/AuthTypeHolder.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityAdapter.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityHolder.java (97%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/FolderSettings.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/SpinnerOption.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/MLFProjectionInfo.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/MessageListFragment.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/MessageListFragmentComparators.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/MessageListHandler.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/MessageViewHolder.java (97%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/MlfUtils.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/ContactBadge.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/EolConvertingEditText.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/FragmentExtras.kt (100%) create mode 100644 app/ui/src/main/java/com/fsck/k9/ui/KoinModule.kt rename app/{core => ui}/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/compose/QuotedMessagePresenter.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/crypto/OpenPgpApiFactory.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/dialog/ApgDeprecationWarningDialog.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferActivity.kt (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupMessageLiveEvent.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupTransferLiveEvent.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/endtoend/KoinModule.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/folders/FolderNameFormatter.kt (94%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/AttachmentView.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/AttachmentViewCallback.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/LockedAttachmentView.java (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/messageview/OnCryptoClickListener.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/AccountItem.kt (95%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/SettingsAction.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/SettingsActionItem.kt (94%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsActivity.kt (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStoreFactory.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsViewModel.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptDialogFragment.kt (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerDialogFragment.kt (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerPreference.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsActivity.kt (98%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt (97%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/ClientCertificateSpinner.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/ColorChip.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/FoldableLinearLayout.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/K9WebViewClient.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/LinearViewAnimator.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/MessageCryptoStatusView.java (97%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/MessageHeader.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/MessageTitleView.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/MessageWebView.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/NonLockingScrollView.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/RecipientSelectView.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/RigidWebView.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/StatusIndicator.java (97%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/ThemeUtils.java (100%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java (99%) rename app/{core => ui}/src/main/java/com/fsck/k9/view/ViewSwitcher.java (100%) rename app/{core => ui}/src/main/res/anim/fade_in.xml (100%) rename app/{core => ui}/src/main/res/anim/fade_in_left.xml (100%) rename app/{core => ui}/src/main/res/anim/fade_in_right.xml (100%) rename app/{core => ui}/src/main/res/anim/fade_out.xml (100%) rename app/{core => ui}/src/main/res/anim/fade_out_left.xml (100%) rename app/{core => ui}/src/main/res/anim/fade_out_right.xml (100%) rename app/{core => ui}/src/main/res/anim/slide_in_left.xml (100%) rename app/{core => ui}/src/main/res/anim/slide_in_right.xml (100%) rename app/{core => ui}/src/main/res/anim/slide_out_left.xml (100%) rename app/{core => ui}/src/main/res/anim/slide_out_right.xml (100%) rename app/{core => ui}/src/main/res/layout-land/actionbar_custom.xml (100%) rename app/{core => ui}/src/main/res/layout/about.xml (100%) rename app/{core => ui}/src/main/res/layout/account_list.xml (100%) rename app/{core => ui}/src/main/res/layout/account_list_item.xml (100%) rename app/{core => ui}/src/main/res/layout/account_setup_account_type.xml (100%) rename app/{core => ui}/src/main/res/layout/account_setup_basics.xml (100%) rename app/{core => ui}/src/main/res/layout/account_setup_check_settings.xml (100%) rename app/{core => ui}/src/main/res/layout/account_setup_composition.xml (100%) rename app/{core => ui}/src/main/res/layout/account_setup_incoming.xml (100%) rename app/{core => ui}/src/main/res/layout/account_setup_names.xml (100%) rename app/{core => ui}/src/main/res/layout/account_setup_options.xml (100%) rename app/{core => ui}/src/main/res/layout/account_setup_outgoing.xml (100%) rename app/{core => ui}/src/main/res/layout/accounts.xml (100%) rename app/{core => ui}/src/main/res/layout/accounts_folders_icons.xml (100%) rename app/{core => ui}/src/main/res/layout/accounts_item.xml (100%) rename app/{core => ui}/src/main/res/layout/accounts_password_prompt.xml (100%) rename app/{core => ui}/src/main/res/layout/actionbar_custom.xml (100%) rename app/{core => ui}/src/main/res/layout/actionbar_indeterminate_progress_actionview.xml (100%) rename app/{core => ui}/src/main/res/layout/activity_account_settings.xml (100%) rename app/{core => ui}/src/main/res/layout/activity_settings.xml (100%) rename app/{core => ui}/src/main/res/layout/choose_account_item.xml (100%) rename app/{core => ui}/src/main/res/layout/choose_identity_item.xml (100%) rename app/{core => ui}/src/main/res/layout/client_certificate_spinner.xml (100%) rename app/{core => ui}/src/main/res/layout/crypto_key_transfer.xml (100%) rename app/{core => ui}/src/main/res/layout/crypto_mode_selector.xml (100%) rename app/{core => ui}/src/main/res/layout/dialog_apg_deprecated.xml (100%) rename app/{core => ui}/src/main/res/layout/dialog_autocrypt_prefer_encrypt.xml (100%) rename app/{core => ui}/src/main/res/layout/dialog_openkeychain_info.xml (100%) rename app/{core => ui}/src/main/res/layout/edit_identity.xml (100%) rename app/{core => ui}/src/main/res/layout/email_address_list.xml (100%) rename app/{core => ui}/src/main/res/layout/email_address_list_item.xml (100%) rename app/{core => ui}/src/main/res/layout/empty_message_view.xml (100%) rename app/{core => ui}/src/main/res/layout/foldable_linearlayout.xml (100%) rename app/{core => ui}/src/main/res/layout/folder_list.xml (100%) rename app/{core => ui}/src/main/res/layout/folder_list_item.xml (100%) rename app/{core => ui}/src/main/res/layout/general_settings.xml (100%) rename app/{core => ui}/src/main/res/layout/holo_color_picker_dialog.xml (100%) rename app/{core => ui}/src/main/res/layout/list_content_simple.xml (100%) rename app/{core => ui}/src/main/res/layout/message.xml (100%) rename app/{core => ui}/src/main/res/layout/message_compose.xml (100%) rename app/{core => ui}/src/main/res/layout/message_compose_attachment.xml (100%) rename app/{core => ui}/src/main/res/layout/message_compose_recipients.xml (100%) rename app/{core => ui}/src/main/res/layout/message_container.xml (100%) rename app/{core => ui}/src/main/res/layout/message_content_crypto_cancelled.xml (100%) rename app/{core => ui}/src/main/res/layout/message_content_crypto_error.xml (100%) rename app/{core => ui}/src/main/res/layout/message_content_crypto_incomplete.xml (100%) rename app/{core => ui}/src/main/res/layout/message_content_crypto_no_provider.xml (100%) rename app/{core => ui}/src/main/res/layout/message_crypto_info_dialog.xml (100%) rename app/{core => ui}/src/main/res/layout/message_crypto_status_view.xml (100%) rename app/{core => ui}/src/main/res/layout/message_list.xml (100%) rename app/{core => ui}/src/main/res/layout/message_list_fragment.xml (100%) rename app/{core => ui}/src/main/res/layout/message_list_item.xml (100%) rename app/{core => ui}/src/main/res/layout/message_list_item_footer.xml (100%) rename app/{core => ui}/src/main/res/layout/message_list_loading.xml (100%) rename app/{core => ui}/src/main/res/layout/message_view_attachment.xml (100%) rename app/{core => ui}/src/main/res/layout/message_view_attachment_locked.xml (100%) rename app/{core => ui}/src/main/res/layout/message_view_header.xml (100%) rename app/{core => ui}/src/main/res/layout/openpgp_enabled_error_dialog.xml (100%) rename app/{core => ui}/src/main/res/layout/openpgp_encrypt_description_dialog.xml (100%) rename app/{core => ui}/src/main/res/layout/openpgp_inline_dialog.xml (100%) rename app/{core => ui}/src/main/res/layout/openpgp_sign_only_dialog.xml (100%) rename app/{core => ui}/src/main/res/layout/recipient_alternate_item.xml (100%) rename app/{core => ui}/src/main/res/layout/recipient_dropdown_item.xml (100%) rename app/{core => ui}/src/main/res/layout/recipient_token_item.xml (100%) rename app/{core => ui}/src/main/res/layout/select_openpgp_app_item.xml (100%) rename app/{core => ui}/src/main/res/layout/slider_preference_dialog.xml (100%) rename app/{core => ui}/src/main/res/layout/split_message_list.xml (100%) rename app/{core => ui}/src/main/res/layout/status_indicator.xml (100%) rename app/{core => ui}/src/main/res/layout/text_list_item.xml (100%) rename app/{core => ui}/src/main/res/layout/upgrade_databases.xml (100%) rename app/{core => ui}/src/main/res/layout/welcome_message.xml (100%) rename app/{core => ui}/src/main/res/layout/wizard_cancel.xml (100%) rename app/{core => ui}/src/main/res/layout/wizard_done.xml (100%) rename app/{core => ui}/src/main/res/layout/wizard_next.xml (100%) rename app/{core => ui}/src/main/res/layout/wizard_setup.xml (100%) rename app/{core => ui}/src/main/res/layout/wizard_welcome.xml (100%) rename app/{core => ui}/src/main/res/menu/about_option.xml (100%) rename app/{core => ui}/src/main/res/menu/accounts_context.xml (100%) rename app/{core => ui}/src/main/res/menu/accounts_option.xml (100%) rename app/{core => ui}/src/main/res/menu/disabled_accounts_context.xml (100%) rename app/{core => ui}/src/main/res/menu/folder_context.xml (100%) rename app/{core => ui}/src/main/res/menu/folder_list_option.xml (100%) rename app/{core => ui}/src/main/res/menu/folder_select_option.xml (100%) rename app/{core => ui}/src/main/res/menu/manage_identities_context.xml (100%) rename app/{core => ui}/src/main/res/menu/manage_identities_option.xml (100%) rename app/{core => ui}/src/main/res/menu/message_compose_option.xml (100%) rename app/{core => ui}/src/main/res/menu/message_list_context.xml (100%) rename app/{core => ui}/src/main/res/menu/message_list_item_context.xml (100%) rename app/{core => ui}/src/main/res/menu/message_list_option.xml (100%) create mode 100644 app/ui/src/test/java/com/fsck/k9/K9RobolectricTest.kt create mode 100644 app/ui/src/test/java/com/fsck/k9/RobolectricTest.kt create mode 100644 app/ui/src/test/java/com/fsck/k9/TestApp.kt rename app/{core => ui}/src/test/java/com/fsck/k9/activity/ActivityListenerTest.java (100%) rename app/{core => ui}/src/test/java/com/fsck/k9/activity/compose/RecipientLoaderTest.java (100%) rename app/{core => ui}/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.java (100%) rename app/{core => ui}/src/test/java/com/fsck/k9/activity/misc/ContactPictureLoaderTest.java (100%) rename app/{core => ui}/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java (98%) rename app/{core => ui}/src/test/java/com/fsck/k9/view/MessageHeaderTest.kt (100%) rename app/{core => ui}/src/test/java/org/openintents/openpgp/util/ShadowOpenPgpAsyncTask.java (100%) rename {app/core/src/test/java/com/fsck/k9/message => mail/testing/src/main/java/com/fsck/k9/mail}/TestMessageConstructionUtils.java (94%) diff --git a/app/core/build.gradle b/app/core/build.gradle index f3e36698e..1c6786847 100644 --- a/app/core/build.gradle +++ b/app/core/build.gradle @@ -5,14 +5,6 @@ apply plugin: 'org.jetbrains.kotlin.android.extensions' apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle" apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle" -//noinspection GroovyAssignabilityCheck -configurations.all { - resolutionStrategy { - force "com.android.support:support-annotations:${versions.supportLibrary}" - force "com.android.support:design:${versions.supportLibrary}" - } -} - dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}" @@ -31,31 +23,16 @@ dependencies { api "com.squareup.okio:okio:${versions.okio}" api "commons-io:commons-io:${versions.commonsIo}" - api "com.android.support:support-v4:${versions.supportLibrary}" - api "com.android.support:appcompat-v7:${versions.supportLibrary}" - api "com.takisoft.fix:preference-v7:${versions.preferencesFix}" - api "com.takisoft.fix:preference-v7-datetimepicker:${versions.preferencesFix}" - api "com.takisoft.fix:preference-v7-colorpicker:${versions.preferencesFix}" - api "com.takisoft.fix:preference-v7-ringtone:${versions.preferencesFix}" - api "com.android.support:recyclerview-v7:${versions.supportLibrary}" - api "android.arch.lifecycle:extensions:${versions.lifecycleExtensions}" api "androidx.core:core-ktx:0.3" api "org.jsoup:jsoup:1.11.2" - api "de.cketti.library.changelog:ckchangelog:1.2.1" - api "com.github.bumptech.glide:glide:3.6.1" - api "com.splitwise:tokenautocomplete:2.0.7" - api "de.cketti.safecontentresolver:safe-content-resolver-v14:0.9.0" - api "com.github.amlcurran.showcaseview:library:5.4.1" api "com.squareup.moshi:moshi:1.2.0" api "com.jakewharton.timber:timber:${versions.timber}" api "net.jcip:jcip-annotations:1.0" api "org.apache.james:apache-mime4j-core:0.8.1" - api "com.xwray:groupie:2.1.0" - api "com.xwray:groupie-kotlin-android-extensions:2.1.0" api "org.jetbrains.anko:anko-coroutines:0.10.4" api "org.koin:koin-android-architecture:${versions.koin}" - api 'com.mikepenz:materialdrawer:6.0.7' + testImplementation project(':mail:testing') testImplementation "org.robolectric:robolectric:${versions.robolectric}" testImplementation "junit:junit:${versions.junit}" testImplementation "com.google.truth:truth:${versions.truth}" diff --git a/app/core/src/main/java/com/fsck/k9/Core.kt b/app/core/src/main/java/com/fsck/k9/Core.kt index 1f262b92c..191c3de8c 100644 --- a/app/core/src/main/java/com/fsck/k9/Core.kt +++ b/app/core/src/main/java/com/fsck/k9/Core.kt @@ -8,7 +8,6 @@ import android.content.pm.PackageManager import android.os.Handler import android.os.Looper import android.os.StrictMode -import com.fsck.k9.activity.uiModule import com.fsck.k9.autocrypt.autocryptModule import com.fsck.k9.backend.backendModule import com.fsck.k9.crypto.openPgpModule @@ -22,8 +21,6 @@ import com.fsck.k9.service.BootReceiver import com.fsck.k9.service.MailService import com.fsck.k9.service.ShutdownReceiver import com.fsck.k9.service.StorageGoneReceiver -import com.fsck.k9.ui.endtoend.endToEndUiModule -import com.fsck.k9.ui.settings.settingsUiModule import org.koin.standalone.KoinComponent import org.koin.standalone.inject import timber.log.Timber @@ -37,15 +34,12 @@ object Core : KoinComponent { @JvmStatic val coreModules = listOf( mainModule, - settingsUiModule, - endToEndUiModule, openPgpModule, autocryptModule, mailStoreModule, backendModule, extractorModule, - htmlModule, - uiModule + htmlModule ) /** diff --git a/app/core/src/main/java/com/fsck/k9/K9.java b/app/core/src/main/java/com/fsck/k9/K9.java index 7087c22c2..1b3837c73 100644 --- a/app/core/src/main/java/com/fsck/k9/K9.java +++ b/app/core/src/main/java/com/fsck/k9/K9.java @@ -13,7 +13,6 @@ import android.os.AsyncTask; import android.os.Environment; import com.fsck.k9.Account.SortType; -import com.fsck.k9.activity.UpgradeDatabases; import com.fsck.k9.core.BuildConfig; import com.fsck.k9.core.R; import com.fsck.k9.mail.K9MailLib; @@ -36,7 +35,7 @@ public class K9 { * accounts' databases. * *

- * See {@link UpgradeDatabases} for a detailed explanation of the database upgrade process. + * See {@code UpgradeDatabases} for a detailed explanation of the database upgrade process. *

*/ private static final String DATABASE_VERSION_CACHE = "database_version_cache"; diff --git a/app/core/src/main/java/com/fsck/k9/KoinModule.kt b/app/core/src/main/java/com/fsck/k9/KoinModule.kt index 1dd6e00b2..8580ce06f 100644 --- a/app/core/src/main/java/com/fsck/k9/KoinModule.kt +++ b/app/core/src/main/java/com/fsck/k9/KoinModule.kt @@ -6,7 +6,6 @@ import com.fsck.k9.mail.TransportProvider import com.fsck.k9.mail.power.PowerManager import com.fsck.k9.mailstore.StorageManager import com.fsck.k9.power.TracingPowerManager -import com.fsck.k9.ui.folders.FolderNameFormatter import org.koin.dsl.module.applicationContext val mainModule = applicationContext { @@ -15,6 +14,5 @@ val mainModule = applicationContext { bean { TransportProvider() } bean { get().resources } bean { StorageManager.getInstance(get()) } - bean { FolderNameFormatter(get()) } bean { TracingPowerManager.getPowerManager(get()) as PowerManager } } diff --git a/app/core/src/main/java/com/fsck/k9/cache/EmailProviderCache.java b/app/core/src/main/java/com/fsck/k9/cache/EmailProviderCache.java index 66ec2afec..449d6eace 100644 --- a/app/core/src/main/java/com/fsck/k9/cache/EmailProviderCache.java +++ b/app/core/src/main/java/com/fsck/k9/cache/EmailProviderCache.java @@ -9,9 +9,7 @@ import android.content.Intent; import android.net.Uri; import android.support.v4.content.LocalBroadcastManager; -import com.fsck.k9.fragment.MessageListFragment; import com.fsck.k9.mail.Message; -import com.fsck.k9.mailstore.LocalFolder; import com.fsck.k9.mailstore.LocalMessage; import com.fsck.k9.provider.EmailProvider; @@ -161,7 +159,7 @@ public class EmailProviderCache { * *

Note: * Notifying the content resolver of the change will cause the {@code CursorLoader} in - * {@link MessageListFragment} to reload the cursor. But especially with flag changes this will + * {@code MessageListFragment} to reload the cursor. But especially with flag changes this will * block because of the DB write operation to update the flags. So additionally we use * {@link LocalBroadcastManager} to send a {@link #ACTION_CACHE_UPDATED} broadcast. This way * {@code MessageListFragment} can update the view without reloading the cursor. diff --git a/app/core/src/main/java/com/fsck/k9/service/DatabaseUpgradeService.java b/app/core/src/main/java/com/fsck/k9/service/DatabaseUpgradeService.java index e94da954f..9109caecf 100644 --- a/app/core/src/main/java/com/fsck/k9/service/DatabaseUpgradeService.java +++ b/app/core/src/main/java/com/fsck/k9/service/DatabaseUpgradeService.java @@ -1,5 +1,6 @@ package com.fsck.k9.service; + import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; @@ -9,21 +10,20 @@ import android.content.Intent; import android.os.IBinder; import android.os.PowerManager; import android.support.v4.content.LocalBroadcastManager; -import timber.log.Timber; import com.fsck.k9.Account; import com.fsck.k9.K9; import com.fsck.k9.Preferences; -import com.fsck.k9.activity.UpgradeDatabases; +import com.fsck.k9.mailstore.UnavailableStorageException; import com.fsck.k9.power.TracingPowerManager; import com.fsck.k9.power.TracingPowerManager.TracingWakeLock; -import com.fsck.k9.mailstore.UnavailableStorageException; +import timber.log.Timber; /** * Service used to upgrade the accounts' databases and/or track the progress of the upgrade. * *

- * See {@link UpgradeDatabases} for a detailed explanation of the database upgrade process. + * See {@code UpgradeDatabases} for a detailed explanation of the database upgrade process. *

*/ public class DatabaseUpgradeService extends Service { diff --git a/app/core/src/test/java/com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java b/app/core/src/test/java/com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java index 1c28b017b..376363ab0 100644 --- a/app/core/src/test/java/com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java +++ b/app/core/src/test/java/com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java @@ -14,9 +14,9 @@ import com.fsck.k9.mail.internet.TextBody; import com.fsck.k9.mailstore.MessageCryptoAnnotations; import org.junit.Test; -import static com.fsck.k9.message.TestMessageConstructionUtils.bodypart; -import static com.fsck.k9.message.TestMessageConstructionUtils.messageFromBody; -import static com.fsck.k9.message.TestMessageConstructionUtils.multipart; +import static com.fsck.k9.mail.TestMessageConstructionUtils.bodypart; +import static com.fsck.k9.mail.TestMessageConstructionUtils.messageFromBody; +import static com.fsck.k9.mail.TestMessageConstructionUtils.multipart; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; diff --git a/app/core/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java b/app/core/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java index da2a9388f..1b2033583 100644 --- a/app/core/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java +++ b/app/core/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java @@ -9,11 +9,12 @@ import java.util.Locale; import java.util.TimeZone; import android.app.Application; +import android.content.res.Configuration; +import android.content.res.Resources; import android.support.annotation.NonNull; import com.fsck.k9.DI; import com.fsck.k9.K9RobolectricTest; -import com.fsck.k9.activity.K9ActivityCommon; import com.fsck.k9.mail.Address; import com.fsck.k9.mail.BodyPart; import com.fsck.k9.mail.Message; @@ -40,9 +41,9 @@ import org.mockito.stubbing.Answer; import org.openintents.openpgp.OpenPgpDecryptionResult; import org.robolectric.RuntimeEnvironment; -import static com.fsck.k9.message.TestMessageConstructionUtils.bodypart; -import static com.fsck.k9.message.TestMessageConstructionUtils.messageFromBody; -import static com.fsck.k9.message.TestMessageConstructionUtils.multipart; +import static com.fsck.k9.mail.TestMessageConstructionUtils.bodypart; +import static com.fsck.k9.mail.TestMessageConstructionUtils.messageFromBody; +import static com.fsck.k9.mail.TestMessageConstructionUtils.multipart; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNull; import static junit.framework.Assert.assertSame; @@ -225,7 +226,7 @@ public class MessageViewInfoExtractorTest extends K9RobolectricTest { @Test public void testTextPlusRfc822Message() throws MessagingException { - K9ActivityCommon.setLanguage(context, "en"); + setLanguage("en"); Locale.setDefault(Locale.US); TimeZone.setDefault(TimeZone.getTimeZone("GMT+01:00")); @@ -627,4 +628,13 @@ public class MessageViewInfoExtractorTest extends K9RobolectricTest { return htmlProcessor; } + + private void setLanguage(String language) { + Locale locale = new Locale(language); + + Resources resources = context.getResources(); + Configuration config = resources.getConfiguration(); + config.locale = locale; + resources.updateConfiguration(config, resources.getDisplayMetrics()); + } } diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle index 31db2365e..723f96dde 100644 --- a/app/k9mail/build.gradle +++ b/app/k9mail/build.gradle @@ -9,19 +9,14 @@ if (rootProject.testCoverage) { apply plugin: 'jacoco' } -//noinspection GroovyAssignabilityCheck -configurations.all { - resolutionStrategy { - force "com.android.support:support-annotations:${versions.supportLibrary}" - force "com.android.support:design:${versions.supportLibrary}" - } -} - dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}" + implementation project(":app:ui") implementation project(":app:core") + implementation "com.android.support:appcompat-v7:${versions.supportLibrary}" + testImplementation "org.robolectric:robolectric:${versions.robolectric}" testImplementation "junit:junit:${versions.junit}" testImplementation "com.google.truth:truth:${versions.truth}" diff --git a/app/k9mail/src/main/java/com/fsck/k9/App.kt b/app/k9mail/src/main/java/com/fsck/k9/App.kt index 6f7f92df8..9c2ba8279 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/App.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/App.kt @@ -16,7 +16,7 @@ class App : Application() { super.onCreate() - DI.start(this, Core.coreModules + appModules) + DI.start(this, Core.coreModules + uiModules + appModules) K9.init(this) Core.init(this) diff --git a/app/core/src/test/java/com/fsck/k9/DependencyInjectionTest.kt b/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt similarity index 64% rename from app/core/src/test/java/com/fsck/k9/DependencyInjectionTest.kt rename to app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt index 597319f6c..8c8203fa2 100644 --- a/app/core/src/test/java/com/fsck/k9/DependencyInjectionTest.kt +++ b/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt @@ -2,18 +2,21 @@ package com.fsck.k9 import android.arch.lifecycle.Lifecycle import android.arch.lifecycle.LifecycleOwner -import com.fsck.k9.notification.NotificationActionCreator import com.fsck.k9.ui.endtoend.AutocryptKeyTransferActivity import com.nhaarman.mockito_kotlin.doReturn import com.nhaarman.mockito_kotlin.mock import org.junit.Test +import org.junit.runner.RunWith import org.koin.Koin -import org.koin.dsl.module.applicationContext import org.koin.log.PrintLogger -import org.koin.standalone.StandAloneContext +import org.koin.test.AutoCloseKoinTest import org.koin.test.dryRun +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config -class DependencyInjectionTest : K9RobolectricTest() { +@RunWith(RobolectricTestRunner::class) +@Config(application = App::class) +class DependencyInjectionTest : AutoCloseKoinTest() { val lifecycleOwner = mock { on { lifecycle } doReturn mock() } @@ -22,11 +25,6 @@ class DependencyInjectionTest : K9RobolectricTest() { fun testDependencyTree() { Koin.logger = PrintLogger() - // NOTE: Users of the core module will have to provide these dependencies. - StandAloneContext.loadKoinModules(applicationContext { - bean { mock() } - }) - dryRun { mapOf( "lifecycleOwner" to lifecycleOwner, diff --git a/app/k9mail/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/app/k9mail/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker new file mode 100644 index 000000000..1f0955d45 --- /dev/null +++ b/app/k9mail/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker @@ -0,0 +1 @@ +mock-maker-inline diff --git a/app/ui/build.gradle b/app/ui/build.gradle new file mode 100644 index 000000000..229ccba97 --- /dev/null +++ b/app/ui/build.gradle @@ -0,0 +1,78 @@ +apply plugin: 'com.android.library' +apply plugin: 'org.jetbrains.kotlin.android' +apply plugin: 'org.jetbrains.kotlin.android.extensions' + +apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle" +apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle" + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}" + + implementation project(":app:core") + implementation project(":mail:common") + + implementation project(':plugins:HoloColorPicker') + implementation project(':plugins:openpgp-api-lib:openpgp-api') + + implementation "com.android.support:appcompat-v7:${versions.supportLibrary}" + implementation "com.takisoft.fix:preference-v7:${versions.preferencesFix}" + implementation "com.takisoft.fix:preference-v7-datetimepicker:${versions.preferencesFix}" + implementation "com.takisoft.fix:preference-v7-colorpicker:${versions.preferencesFix}" + implementation "com.takisoft.fix:preference-v7-ringtone:${versions.preferencesFix}" + implementation "com.android.support:recyclerview-v7:${versions.supportLibrary}" + implementation "android.arch.lifecycle:extensions:${versions.lifecycleExtensions}" + implementation "de.cketti.library.changelog:ckchangelog:1.2.1" + implementation "com.github.bumptech.glide:glide:3.6.1" + implementation "com.splitwise:tokenautocomplete:2.0.7" + implementation "de.cketti.safecontentresolver:safe-content-resolver-v14:0.9.0" + implementation "com.github.amlcurran.showcaseview:library:5.4.1" + implementation "com.xwray:groupie:2.1.0" + implementation "com.xwray:groupie-kotlin-android-extensions:2.1.0" + implementation 'com.mikepenz:materialdrawer:6.0.7' + + testImplementation project(':mail:testing') + testImplementation "org.robolectric:robolectric:${versions.robolectric}" + testImplementation "junit:junit:${versions.junit}" + testImplementation "com.google.truth:truth:${versions.truth}" + testImplementation "org.mockito:mockito-core:${versions.mockito}" + testImplementation "com.nhaarman:mockito-kotlin:${versions.mockitoKotlin}" + testImplementation "org.jdom:jdom2:2.0.6" + testImplementation "org.koin:koin-test:${versions.koin}" +} + +android { + compileSdkVersion buildConfig.compileSdk + buildToolsVersion buildConfig.buildTools + + defaultConfig { + minSdkVersion buildConfig.minSdk + // For Robolectric tests + targetSdkVersion 22 + } + + lintOptions { + abortOnError false + lintConfig file("$rootProject.projectDir/config/lint/lint.xml") + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + testOptions { + unitTests { + includeAndroidResources = true + } + } +} + +androidExtensions { + experimental = true +} + +kotlin { + experimental { + coroutines "enable" + } +} diff --git a/app/ui/src/main/AndroidManifest.xml b/app/ui/src/main/AndroidManifest.xml new file mode 100644 index 000000000..13dc11d98 --- /dev/null +++ b/app/ui/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/app/core/src/main/assets/downloading.html b/app/ui/src/main/assets/downloading.html similarity index 100% rename from app/core/src/main/assets/downloading.html rename to app/ui/src/main/assets/downloading.html diff --git a/app/core/src/main/assets/icon.png b/app/ui/src/main/assets/icon.png similarity index 100% rename from app/core/src/main/assets/icon.png rename to app/ui/src/main/assets/icon.png diff --git a/app/core/src/main/assets/loading.gif b/app/ui/src/main/assets/loading.gif similarity index 100% rename from app/core/src/main/assets/loading.gif rename to app/ui/src/main/assets/loading.gif diff --git a/app/ui/src/main/java/com/fsck/k9/UiKoinModules.kt b/app/ui/src/main/java/com/fsck/k9/UiKoinModules.kt new file mode 100644 index 000000000..6c373c87b --- /dev/null +++ b/app/ui/src/main/java/com/fsck/k9/UiKoinModules.kt @@ -0,0 +1,13 @@ +package com.fsck.k9 + +import com.fsck.k9.activity.activityModule +import com.fsck.k9.ui.endtoend.endToEndUiModule +import com.fsck.k9.ui.settings.settingsUiModule +import com.fsck.k9.ui.uiModule + +val uiModules = listOf( + activityModule, + uiModule, + settingsUiModule, + endToEndUiModule +) diff --git a/app/core/src/main/java/com/fsck/k9/activity/AccountList.java b/app/ui/src/main/java/com/fsck/k9/activity/AccountList.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/AccountList.java rename to app/ui/src/main/java/com/fsck/k9/activity/AccountList.java index 62d72f1d9..485b2d53b 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/AccountList.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/AccountList.java @@ -18,7 +18,7 @@ import com.fsck.k9.BaseAccount; import com.fsck.k9.FontSizes; import com.fsck.k9.K9; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.search.SearchAccount; diff --git a/app/core/src/main/java/com/fsck/k9/activity/Accounts.java b/app/ui/src/main/java/com/fsck/k9/activity/Accounts.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/Accounts.java rename to app/ui/src/main/java/com/fsck/k9/activity/Accounts.java index 541ea98ae..923b78bc7 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/Accounts.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/Accounts.java @@ -66,7 +66,7 @@ import com.fsck.k9.DI; import com.fsck.k9.FontSizes; import com.fsck.k9.K9; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.compose.MessageActions; import com.fsck.k9.activity.misc.ExtendedAsyncTask; import com.fsck.k9.activity.misc.NonConfigurationInstance; diff --git a/app/core/src/main/java/com/fsck/k9/activity/ActivityListener.java b/app/ui/src/main/java/com/fsck/k9/activity/ActivityListener.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/ActivityListener.java rename to app/ui/src/main/java/com/fsck/k9/activity/ActivityListener.java index 33bcbb0c8..9c5904d83 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/ActivityListener.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/ActivityListener.java @@ -10,7 +10,7 @@ import android.text.format.DateUtils; import com.fsck.k9.Account; import com.fsck.k9.AccountStats; import com.fsck.k9.K9; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.controller.SimpleMessagingListener; import com.fsck.k9.service.MailService; import net.jcip.annotations.GuardedBy; diff --git a/app/core/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java b/app/ui/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java rename to app/ui/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java index 9514ba928..8caa8b313 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java @@ -19,9 +19,9 @@ import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; -import com.fsck.k9.core.R; import com.fsck.k9.activity.compose.RecipientAdapter; import com.fsck.k9.ui.ContactBadge; +import com.fsck.k9.ui.R; import com.fsck.k9.view.RecipientSelectView.Recipient; import com.fsck.k9.view.ThemeUtils; diff --git a/app/core/src/main/java/com/fsck/k9/activity/ChooseAccount.java b/app/ui/src/main/java/com/fsck/k9/activity/ChooseAccount.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/ChooseAccount.java rename to app/ui/src/main/java/com/fsck/k9/activity/ChooseAccount.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/ChooseFolder.java b/app/ui/src/main/java/com/fsck/k9/activity/ChooseFolder.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/ChooseFolder.java rename to app/ui/src/main/java/com/fsck/k9/activity/ChooseFolder.java index f4ad9adb7..d77431ac0 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/ChooseFolder.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/ChooseFolder.java @@ -24,7 +24,7 @@ import com.fsck.k9.Account.FolderMode; import com.fsck.k9.K9; import com.fsck.k9.Preferences; import com.fsck.k9.controller.MessageReference; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.controller.MessagingListener; import com.fsck.k9.controller.SimpleMessagingListener; diff --git a/app/core/src/main/java/com/fsck/k9/activity/ChooseIdentity.java b/app/ui/src/main/java/com/fsck/k9/activity/ChooseIdentity.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/ChooseIdentity.java rename to app/ui/src/main/java/com/fsck/k9/activity/ChooseIdentity.java index 2877d59a0..9e87bff54 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/ChooseIdentity.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/ChooseIdentity.java @@ -12,7 +12,7 @@ import android.widget.Toast; import com.fsck.k9.Account; import com.fsck.k9.Identity; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import java.util.List; public class ChooseIdentity extends K9ListActivity { diff --git a/app/core/src/main/java/com/fsck/k9/activity/ColorChipProvider.kt b/app/ui/src/main/java/com/fsck/k9/activity/ColorChipProvider.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/ColorChipProvider.kt rename to app/ui/src/main/java/com/fsck/k9/activity/ColorChipProvider.kt diff --git a/app/core/src/main/java/com/fsck/k9/activity/ConfirmationDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/ConfirmationDialog.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/ConfirmationDialog.java rename to app/ui/src/main/java/com/fsck/k9/activity/ConfirmationDialog.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/EditIdentity.java b/app/ui/src/main/java/com/fsck/k9/activity/EditIdentity.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/EditIdentity.java rename to app/ui/src/main/java/com/fsck/k9/activity/EditIdentity.java index bcb14bc2f..49343d879 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/EditIdentity.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/EditIdentity.java @@ -9,7 +9,7 @@ import android.widget.LinearLayout; import com.fsck.k9.Account; import com.fsck.k9.Identity; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import java.util.List; public class EditIdentity extends K9Activity { diff --git a/app/core/src/main/java/com/fsck/k9/activity/EmailAddressList.java b/app/ui/src/main/java/com/fsck/k9/activity/EmailAddressList.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/activity/EmailAddressList.java rename to app/ui/src/main/java/com/fsck/k9/activity/EmailAddressList.java index 58dbfd9f8..8046195cd 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/EmailAddressList.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/EmailAddressList.java @@ -9,7 +9,7 @@ import android.widget.ListView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.helper.ContactItem; public class EmailAddressList extends K9ListActivity implements OnItemClickListener { diff --git a/app/core/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java b/app/ui/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java rename to app/ui/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java index a0131c593..d7bf62a3c 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java @@ -3,7 +3,7 @@ package com.fsck.k9.activity; import android.content.Context; import com.fsck.k9.Account; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mail.Folder; import com.fsck.k9.mailstore.LocalFolder; diff --git a/app/core/src/main/java/com/fsck/k9/activity/FolderList.java b/app/ui/src/main/java/com/fsck/k9/activity/FolderList.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/FolderList.java rename to app/ui/src/main/java/com/fsck/k9/activity/FolderList.java index 2c73283be..85c00ec26 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/FolderList.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/FolderList.java @@ -44,7 +44,7 @@ import com.fsck.k9.DI; import com.fsck.k9.FontSizes; import com.fsck.k9.K9; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.compose.MessageActions; import com.fsck.k9.activity.setup.FolderSettings; import com.fsck.k9.controller.MessagingController; diff --git a/app/core/src/main/java/com/fsck/k9/activity/FolderListFilter.java b/app/ui/src/main/java/com/fsck/k9/activity/FolderListFilter.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/FolderListFilter.java rename to app/ui/src/main/java/com/fsck/k9/activity/FolderListFilter.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/K9Activity.java b/app/ui/src/main/java/com/fsck/k9/activity/K9Activity.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/K9Activity.java rename to app/ui/src/main/java/com/fsck/k9/activity/K9Activity.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/K9ActivityCommon.java b/app/ui/src/main/java/com/fsck/k9/activity/K9ActivityCommon.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/K9ActivityCommon.java rename to app/ui/src/main/java/com/fsck/k9/activity/K9ActivityCommon.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/K9ListActivity.java b/app/ui/src/main/java/com/fsck/k9/activity/K9ListActivity.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/K9ListActivity.java rename to app/ui/src/main/java/com/fsck/k9/activity/K9ListActivity.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java b/app/ui/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java rename to app/ui/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/KoinModule.kt b/app/ui/src/main/java/com/fsck/k9/activity/KoinModule.kt similarity index 72% rename from app/core/src/main/java/com/fsck/k9/activity/KoinModule.kt rename to app/ui/src/main/java/com/fsck/k9/activity/KoinModule.kt index 15441143f..319193595 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/KoinModule.kt +++ b/app/ui/src/main/java/com/fsck/k9/activity/KoinModule.kt @@ -2,6 +2,6 @@ package com.fsck.k9.activity import org.koin.dsl.module.applicationContext -val uiModule = applicationContext { +val activityModule = applicationContext { bean { ColorChipProvider() } } diff --git a/app/core/src/main/java/com/fsck/k9/activity/LauncherShortcuts.java b/app/ui/src/main/java/com/fsck/k9/activity/LauncherShortcuts.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/activity/LauncherShortcuts.java rename to app/ui/src/main/java/com/fsck/k9/activity/LauncherShortcuts.java index 4de3b7610..01408d5d0 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/LauncherShortcuts.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/LauncherShortcuts.java @@ -6,7 +6,7 @@ import android.os.Parcelable; import com.fsck.k9.Account; import com.fsck.k9.BaseAccount; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.search.SearchAccount; public class LauncherShortcuts extends AccountList { diff --git a/app/core/src/main/java/com/fsck/k9/activity/ManageIdentities.java b/app/ui/src/main/java/com/fsck/k9/activity/ManageIdentities.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/ManageIdentities.java rename to app/ui/src/main/java/com/fsck/k9/activity/ManageIdentities.java index 3e4e11fdf..2198dc390 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/ManageIdentities.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/ManageIdentities.java @@ -14,7 +14,7 @@ import android.widget.Toast; import com.fsck.k9.Identity; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; public class ManageIdentities extends ChooseIdentity { private boolean mIdentitiesChanged = false; diff --git a/app/core/src/main/java/com/fsck/k9/activity/MessageCompose.java b/app/ui/src/main/java/com/fsck/k9/activity/MessageCompose.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/MessageCompose.java rename to app/ui/src/main/java/com/fsck/k9/activity/MessageCompose.java index 7161e3fa1..4d25e16ce 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/MessageCompose.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/MessageCompose.java @@ -49,7 +49,7 @@ import com.fsck.k9.Identity; import com.fsck.k9.K9; import com.fsck.k9.Preferences; import com.fsck.k9.controller.MessageReference; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.MessageLoaderHelper.MessageLoaderCallbacks; import com.fsck.k9.activity.compose.AttachmentPresenter; import com.fsck.k9.activity.compose.AttachmentPresenter.AttachmentMvpView; diff --git a/app/core/src/main/java/com/fsck/k9/activity/MessageList.java b/app/ui/src/main/java/com/fsck/k9/activity/MessageList.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/MessageList.java rename to app/ui/src/main/java/com/fsck/k9/activity/MessageList.java index 7dc8703ce..83905e64f 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/MessageList.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/MessageList.java @@ -47,7 +47,7 @@ import com.fsck.k9.K9; import com.fsck.k9.K9.SplitViewMode; import com.fsck.k9.Preferences; import com.fsck.k9.controller.MessageReference; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.compose.MessageActions; import com.fsck.k9.activity.misc.SwipeGestureDetector.OnSwipeGestureListener; import com.fsck.k9.fragment.MessageListFragment; diff --git a/app/core/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java b/app/ui/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java rename to app/ui/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java b/app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java rename to app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java index 686579106..2815f1a72 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java @@ -16,7 +16,7 @@ import com.fsck.k9.Account; import com.fsck.k9.K9; import com.fsck.k9.Preferences; import com.fsck.k9.controller.MessageReference; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.notification.NotificationActionService; diff --git a/app/core/src/main/java/com/fsck/k9/activity/Search.java b/app/ui/src/main/java/com/fsck/k9/activity/Search.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/Search.java rename to app/ui/src/main/java/com/fsck/k9/activity/Search.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java b/app/ui/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java rename to app/ui/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java index 53fe57cfd..8b27104d2 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java @@ -14,7 +14,7 @@ import android.widget.TextView; import com.fsck.k9.Account; import com.fsck.k9.K9; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.mailstore.LocalStore; import com.fsck.k9.service.DatabaseUpgradeService; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/IdentityAdapter.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/IdentityAdapter.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/compose/IdentityAdapter.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/IdentityAdapter.java index 9338ced4b..36c18bb6a 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/IdentityAdapter.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/IdentityAdapter.java @@ -10,7 +10,7 @@ import android.widget.TextView; import com.fsck.k9.Account; import com.fsck.k9.Identity; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import java.util.ArrayList; import java.util.Collection; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/MessageActions.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/MessageActions.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/compose/MessageActions.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/MessageActions.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java index 6d13463b6..7ffc339f8 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java @@ -12,7 +12,7 @@ import android.support.annotation.IdRes; import android.view.LayoutInflater; import android.view.View; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.view.HighlightDialogFragment; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java index 095a14e3d..cef9c0b8a 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java @@ -12,7 +12,7 @@ import android.support.annotation.IdRes; import android.view.LayoutInflater; import android.view.View; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.view.HighlightDialogFragment; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java index d1376b51e..ee2eab84f 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java @@ -12,7 +12,7 @@ import android.support.annotation.IdRes; import android.view.LayoutInflater; import android.view.View; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.view.HighlightDialogFragment; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java index bd91a1914..e0a9637c3 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java @@ -12,7 +12,7 @@ import android.support.annotation.IdRes; import android.view.LayoutInflater; import android.view.View; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.view.HighlightDialogFragment; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java index 4b4b1216e..53b121350 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java @@ -21,7 +21,7 @@ import android.widget.ImageView; import android.widget.TextView; import com.fsck.k9.activity.misc.ContactPicture; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.view.RecipientSelectView.Recipient; import com.fsck.k9.view.RecipientSelectView.RecipientCryptoStatus; import com.fsck.k9.view.ThemeUtils; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java index 1cb414288..376fb66e9 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java @@ -20,7 +20,7 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.content.AsyncTaskLoader; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mail.Address; import com.fsck.k9.view.RecipientSelectView.Recipient; import com.fsck.k9.view.RecipientSelectView.RecipientCryptoStatus; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java index b998d14bd..60b9a70f0 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java @@ -16,7 +16,7 @@ import android.widget.Toast; import android.widget.ViewAnimator; import com.fsck.k9.FontSizes; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.MessageCompose; import com.fsck.k9.mail.Address; import com.fsck.k9.mail.Message.RecipientType; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java index 386e2403c..5423f49bb 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java @@ -22,7 +22,7 @@ import android.view.Menu; import com.fsck.k9.Account; import com.fsck.k9.Identity; import com.fsck.k9.K9; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.compose.ComposeCryptoStatus.AttachErrorState; import com.fsck.k9.activity.compose.ComposeCryptoStatus.ComposeCryptoStatusBuilder; import com.fsck.k9.activity.compose.ComposeCryptoStatus.SendErrorState; diff --git a/app/core/src/main/java/com/fsck/k9/activity/compose/SaveMessageTask.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/SaveMessageTask.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/compose/SaveMessageTask.java rename to app/ui/src/main/java/com/fsck/k9/activity/compose/SaveMessageTask.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java b/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java rename to app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java b/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java rename to app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/misc/Attachment.java b/app/ui/src/main/java/com/fsck/k9/activity/misc/Attachment.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/misc/Attachment.java rename to app/ui/src/main/java/com/fsck/k9/activity/misc/Attachment.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/misc/ContactPicture.java b/app/ui/src/main/java/com/fsck/k9/activity/misc/ContactPicture.java similarity index 96% rename from app/core/src/main/java/com/fsck/k9/activity/misc/ContactPicture.java rename to app/ui/src/main/java/com/fsck/k9/activity/misc/ContactPicture.java index cd524ebcb..d74d9c1ad 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/misc/ContactPicture.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/misc/ContactPicture.java @@ -4,7 +4,7 @@ import android.content.Context; import android.util.TypedValue; import com.fsck.k9.K9; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; public class ContactPicture { diff --git a/app/core/src/main/java/com/fsck/k9/activity/misc/ContactPictureLoader.java b/app/ui/src/main/java/com/fsck/k9/activity/misc/ContactPictureLoader.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/misc/ContactPictureLoader.java rename to app/ui/src/main/java/com/fsck/k9/activity/misc/ContactPictureLoader.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/misc/ExtendedAsyncTask.java b/app/ui/src/main/java/com/fsck/k9/activity/misc/ExtendedAsyncTask.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/misc/ExtendedAsyncTask.java rename to app/ui/src/main/java/com/fsck/k9/activity/misc/ExtendedAsyncTask.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/misc/NonConfigurationInstance.java b/app/ui/src/main/java/com/fsck/k9/activity/misc/NonConfigurationInstance.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/misc/NonConfigurationInstance.java rename to app/ui/src/main/java/com/fsck/k9/activity/misc/NonConfigurationInstance.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/misc/SwipeGestureDetector.java b/app/ui/src/main/java/com/fsck/k9/activity/misc/SwipeGestureDetector.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/misc/SwipeGestureDetector.java rename to app/ui/src/main/java/com/fsck/k9/activity/misc/SwipeGestureDetector.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java index 2866e66c1..612ef8924 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java @@ -10,7 +10,7 @@ import android.view.View.OnClickListener; import android.widget.Toast; import com.fsck.k9.Account; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.K9Activity; import com.fsck.k9.helper.EmailHelper; import com.fsck.k9.mail.ServerSettings.Type; diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java index 2b285af80..daab3b168 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java @@ -28,7 +28,7 @@ import com.fsck.k9.Account; import com.fsck.k9.Core; import com.fsck.k9.EmailAddressValidator; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.account.AccountCreator; import com.fsck.k9.activity.K9Activity; import com.fsck.k9.activity.setup.AccountSetupCheckSettings.CheckDirection; diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java index 05995f3d6..fe84588aa 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java @@ -30,7 +30,7 @@ import android.widget.TextView; import com.fsck.k9.Account; import com.fsck.k9.DI; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.K9Activity; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.fragment.ConfirmationDialogFragment; diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupComposition.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupComposition.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupComposition.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupComposition.java index 7ce0d545a..e8bb60496 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupComposition.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupComposition.java @@ -11,7 +11,7 @@ import android.widget.LinearLayout; import android.widget.RadioButton; import com.fsck.k9.Account; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.K9Activity; public class AccountSetupComposition extends K9Activity { diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java index 7af03171a..78554ce67 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java @@ -31,7 +31,7 @@ import com.fsck.k9.Account; import com.fsck.k9.Account.FolderMode; import com.fsck.k9.DI; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.account.AccountCreator; import com.fsck.k9.activity.K9Activity; import com.fsck.k9.activity.setup.AccountSetupCheckSettings.CheckDirection; diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupNames.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupNames.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupNames.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupNames.java index a03334703..9c11d918f 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupNames.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupNames.java @@ -18,7 +18,7 @@ import com.fsck.k9.Account; import com.fsck.k9.Preferences; import com.fsck.k9.activity.Accounts; import com.fsck.k9.activity.K9Activity; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.helper.Utility; public class AccountSetupNames extends K9Activity implements OnClickListener { diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupOptions.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupOptions.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupOptions.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupOptions.java index eb1312c4b..59a6b6985 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupOptions.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupOptions.java @@ -15,7 +15,7 @@ import com.fsck.k9.Account; import com.fsck.k9.Core; import com.fsck.k9.DI; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.K9Activity; import com.fsck.k9.controller.MessagingController; diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java index 2424f312e..f4f41b13b 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java @@ -27,7 +27,7 @@ import android.widget.Toast; import com.fsck.k9.Account; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.account.AccountCreator; import com.fsck.k9.activity.K9Activity; import com.fsck.k9.activity.setup.AccountSetupCheckSettings.CheckDirection; diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AuthTypeAdapter.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AuthTypeAdapter.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AuthTypeAdapter.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AuthTypeAdapter.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/AuthTypeHolder.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AuthTypeHolder.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/activity/setup/AuthTypeHolder.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/AuthTypeHolder.java index 0872a5ae1..998068d13 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/AuthTypeHolder.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AuthTypeHolder.java @@ -2,7 +2,7 @@ package com.fsck.k9.activity.setup; import android.content.res.Resources; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mail.AuthType; class AuthTypeHolder { diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityAdapter.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityAdapter.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityAdapter.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityAdapter.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityHolder.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityHolder.java similarity index 97% rename from app/core/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityHolder.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityHolder.java index a696c4b0c..67ac19093 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityHolder.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/ConnectionSecurityHolder.java @@ -2,7 +2,7 @@ package com.fsck.k9.activity.setup; import android.content.res.Resources; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mail.ConnectionSecurity; class ConnectionSecurityHolder { diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/FolderSettings.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/FolderSettings.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/FolderSettings.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/FolderSettings.java index 7982c910f..aa8db70ce 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/FolderSettings.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/FolderSettings.java @@ -12,7 +12,7 @@ import android.preference.Preference; import com.fsck.k9.Account; import com.fsck.k9.DI; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.FolderInfoHolder; import com.fsck.k9.activity.K9PreferenceActivity; import com.fsck.k9.controller.MessagingController; diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java index 70b7699b2..e78f2d7d0 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java @@ -11,7 +11,7 @@ import com.fsck.k9.FontSizes; import com.fsck.k9.K9; import com.fsck.k9.Preferences; import com.fsck.k9.activity.K9PreferenceActivity; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.preferences.Storage; import com.fsck.k9.preferences.StorageEditor; diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java index 94fbe025b..816b977d0 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java @@ -35,7 +35,7 @@ import android.util.AttributeSet; import android.view.View; import android.widget.SeekBar; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; /** diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/SpinnerOption.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/SpinnerOption.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/activity/setup/SpinnerOption.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/SpinnerOption.java diff --git a/app/core/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java rename to app/ui/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java index 575bafdc5..958e3fda0 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java @@ -8,7 +8,7 @@ import android.view.View; import android.view.View.OnClickListener; import android.widget.TextView; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.Accounts; import com.fsck.k9.activity.K9Activity; import com.fsck.k9.message.html.HtmlConverter; diff --git a/app/core/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java b/app/ui/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java rename to app/ui/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java diff --git a/app/core/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java b/app/ui/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java rename to app/ui/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java diff --git a/app/core/src/main/java/com/fsck/k9/fragment/MLFProjectionInfo.java b/app/ui/src/main/java/com/fsck/k9/fragment/MLFProjectionInfo.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/fragment/MLFProjectionInfo.java rename to app/ui/src/main/java/com/fsck/k9/fragment/MLFProjectionInfo.java diff --git a/app/core/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java b/app/ui/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java rename to app/ui/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java index b6b29cd56..1646dabb8 100644 --- a/app/core/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java +++ b/app/ui/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java @@ -21,7 +21,7 @@ import android.widget.TextView; import com.fsck.k9.Account; import com.fsck.k9.FontSizes; import com.fsck.k9.K9; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mail.Address; import com.fsck.k9.mailstore.DatabasePreviewType; import com.fsck.k9.ui.ContactBadge; diff --git a/app/core/src/main/java/com/fsck/k9/fragment/MessageListFragment.java b/app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragment.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/fragment/MessageListFragment.java rename to app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragment.java index 00cfeb1fc..6473e821e 100644 --- a/app/core/src/main/java/com/fsck/k9/fragment/MessageListFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragment.java @@ -63,7 +63,7 @@ import com.fsck.k9.cache.EmailProviderCache; import com.fsck.k9.controller.MessageReference; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.core.BuildConfig; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.fragment.ConfirmationDialogFragment.ConfirmationDialogFragmentListener; import com.fsck.k9.fragment.MessageListFragmentComparators.ArrivalComparator; import com.fsck.k9.fragment.MessageListFragmentComparators.AttachmentComparator; diff --git a/app/core/src/main/java/com/fsck/k9/fragment/MessageListFragmentComparators.java b/app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragmentComparators.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/fragment/MessageListFragmentComparators.java rename to app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragmentComparators.java diff --git a/app/core/src/main/java/com/fsck/k9/fragment/MessageListHandler.java b/app/ui/src/main/java/com/fsck/k9/fragment/MessageListHandler.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/fragment/MessageListHandler.java rename to app/ui/src/main/java/com/fsck/k9/fragment/MessageListHandler.java diff --git a/app/core/src/main/java/com/fsck/k9/fragment/MessageViewHolder.java b/app/ui/src/main/java/com/fsck/k9/fragment/MessageViewHolder.java similarity index 97% rename from app/core/src/main/java/com/fsck/k9/fragment/MessageViewHolder.java rename to app/ui/src/main/java/com/fsck/k9/fragment/MessageViewHolder.java index b38e9a8fb..130f3d2ed 100644 --- a/app/core/src/main/java/com/fsck/k9/fragment/MessageViewHolder.java +++ b/app/ui/src/main/java/com/fsck/k9/fragment/MessageViewHolder.java @@ -5,7 +5,7 @@ import android.view.View; import android.widget.CheckBox; import android.widget.TextView; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.ui.ContactBadge; diff --git a/app/core/src/main/java/com/fsck/k9/fragment/MlfUtils.java b/app/ui/src/main/java/com/fsck/k9/fragment/MlfUtils.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/fragment/MlfUtils.java rename to app/ui/src/main/java/com/fsck/k9/fragment/MlfUtils.java diff --git a/app/core/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java b/app/ui/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java rename to app/ui/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/ContactBadge.java b/app/ui/src/main/java/com/fsck/k9/ui/ContactBadge.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/ContactBadge.java rename to app/ui/src/main/java/com/fsck/k9/ui/ContactBadge.java index 3485a578a..81e431568 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/ContactBadge.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/ContactBadge.java @@ -25,7 +25,7 @@ import android.view.accessibility.AccessibilityNodeInfo; import android.widget.ImageView; import android.widget.Toast; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mail.Address; diff --git a/app/core/src/main/java/com/fsck/k9/ui/EolConvertingEditText.java b/app/ui/src/main/java/com/fsck/k9/ui/EolConvertingEditText.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/EolConvertingEditText.java rename to app/ui/src/main/java/com/fsck/k9/ui/EolConvertingEditText.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/FragmentExtras.kt b/app/ui/src/main/java/com/fsck/k9/ui/FragmentExtras.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/FragmentExtras.kt rename to app/ui/src/main/java/com/fsck/k9/ui/FragmentExtras.kt diff --git a/app/ui/src/main/java/com/fsck/k9/ui/KoinModule.kt b/app/ui/src/main/java/com/fsck/k9/ui/KoinModule.kt new file mode 100644 index 000000000..05c99914d --- /dev/null +++ b/app/ui/src/main/java/com/fsck/k9/ui/KoinModule.kt @@ -0,0 +1,8 @@ +package com.fsck.k9.ui + +import com.fsck.k9.ui.folders.FolderNameFormatter +import org.koin.dsl.module.applicationContext + +val uiModule = applicationContext { + bean { FolderNameFormatter(get()) } +} diff --git a/app/core/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt b/app/ui/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt rename to app/ui/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt b/app/ui/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt rename to app/ui/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java b/app/ui/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java rename to app/ui/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java index ba6fb73ff..a2f02b010 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java @@ -10,7 +10,7 @@ import android.widget.Button; import android.widget.ImageButton; import com.fsck.k9.FontSizes; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.MessageCompose; import com.fsck.k9.message.html.HtmlConverter; import com.fsck.k9.mailstore.AttachmentResolver; diff --git a/app/core/src/main/java/com/fsck/k9/ui/compose/QuotedMessagePresenter.java b/app/ui/src/main/java/com/fsck/k9/ui/compose/QuotedMessagePresenter.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/compose/QuotedMessagePresenter.java rename to app/ui/src/main/java/com/fsck/k9/ui/compose/QuotedMessagePresenter.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java b/app/ui/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java rename to app/ui/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java b/app/ui/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java rename to app/ui/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/crypto/OpenPgpApiFactory.java b/app/ui/src/main/java/com/fsck/k9/ui/crypto/OpenPgpApiFactory.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/crypto/OpenPgpApiFactory.java rename to app/ui/src/main/java/com/fsck/k9/ui/crypto/OpenPgpApiFactory.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/dialog/ApgDeprecationWarningDialog.java b/app/ui/src/main/java/com/fsck/k9/ui/dialog/ApgDeprecationWarningDialog.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/ui/dialog/ApgDeprecationWarningDialog.java rename to app/ui/src/main/java/com/fsck/k9/ui/dialog/ApgDeprecationWarningDialog.java index 2bca1e272..e0fdbd62c 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/dialog/ApgDeprecationWarningDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/dialog/ApgDeprecationWarningDialog.java @@ -11,7 +11,7 @@ import android.view.LayoutInflater; import android.view.View; import android.widget.TextView; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; public class ApgDeprecationWarningDialog extends AlertDialog { diff --git a/app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferActivity.kt b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferActivity.kt similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferActivity.kt rename to app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferActivity.kt index 3d6f7839b..a3836fb44 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferActivity.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferActivity.kt @@ -11,9 +11,9 @@ import android.transition.TransitionInflater import android.transition.TransitionManager import android.view.MenuItem import android.view.View -import com.fsck.k9.core.R import com.fsck.k9.activity.K9Activity import com.fsck.k9.finishWithErrorToast +import com.fsck.k9.ui.R import com.fsck.k9.view.StatusIndicator import kotlinx.android.synthetic.main.crypto_key_transfer.* import kotlinx.coroutines.experimental.delay diff --git a/app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt rename to app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt rename to app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupMessageLiveEvent.kt b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupMessageLiveEvent.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupMessageLiveEvent.kt rename to app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupMessageLiveEvent.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupTransferLiveEvent.kt b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupTransferLiveEvent.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupTransferLiveEvent.kt rename to app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptSetupTransferLiveEvent.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/endtoend/KoinModule.kt b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/KoinModule.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/endtoend/KoinModule.kt rename to app/ui/src/main/java/com/fsck/k9/ui/endtoend/KoinModule.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/folders/FolderNameFormatter.kt b/app/ui/src/main/java/com/fsck/k9/ui/folders/FolderNameFormatter.kt similarity index 94% rename from app/core/src/main/java/com/fsck/k9/ui/folders/FolderNameFormatter.kt rename to app/ui/src/main/java/com/fsck/k9/ui/folders/FolderNameFormatter.kt index 33fd7e9b4..ab3e03a22 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/folders/FolderNameFormatter.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/folders/FolderNameFormatter.kt @@ -1,7 +1,7 @@ package com.fsck.k9.ui.folders import android.content.res.Resources -import com.fsck.k9.core.R +import com.fsck.k9.ui.R import com.fsck.k9.mailstore.Folder import com.fsck.k9.mailstore.FolderType diff --git a/app/core/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java b/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java rename to app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java b/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java rename to app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt b/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt rename to app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt b/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt rename to app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java index fb35033d3..94e50c047 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java @@ -24,7 +24,7 @@ import android.widget.Toast; import com.fsck.k9.Account; import com.fsck.k9.K9; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.cache.TemporaryAttachmentStore; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.controller.SimpleMessagingListener; diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/AttachmentView.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentView.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/AttachmentView.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentView.java index 249084b2b..10a2e1ca6 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/messageview/AttachmentView.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentView.java @@ -13,7 +13,7 @@ import android.widget.TextView; import com.bumptech.glide.Glide; import com.fsck.k9.K9; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.helper.SizeFormatter; import com.fsck.k9.mailstore.AttachmentViewInfo; diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/AttachmentViewCallback.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentViewCallback.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/AttachmentViewCallback.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentViewCallback.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java index 8919e8254..25234b5d2 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java @@ -19,7 +19,7 @@ import android.view.View; import android.widget.ImageView; import android.widget.TextView; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.view.MessageCryptoDisplayStatus; import com.fsck.k9.view.ThemeUtils; diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java index cea73caa0..587afe4ae 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java @@ -17,7 +17,7 @@ import timber.log.Timber; import android.widget.Toast; import com.fsck.k9.K9; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.helper.FileHelper; import com.fsck.k9.helper.UrlEncodingHelper; import com.fsck.k9.mail.internet.MimeUtility; diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/LockedAttachmentView.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/LockedAttachmentView.java similarity index 98% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/LockedAttachmentView.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/LockedAttachmentView.java index a83f62d02..a79edaf85 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/messageview/LockedAttachmentView.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/LockedAttachmentView.java @@ -7,7 +7,7 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.ViewStub; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mailstore.AttachmentViewInfo; import com.fsck.k9.view.ToolableViewAnimator; diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java index d6bce15ad..cfa198533 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java @@ -25,7 +25,7 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.helper.ClipboardManager; import com.fsck.k9.helper.Contacts; import com.fsck.k9.message.html.HtmlConverter; diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java index b0fc72044..6d13e19bf 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java @@ -21,7 +21,7 @@ import android.widget.TextView; import com.fsck.k9.Account; import com.fsck.k9.Account.ShowPictures; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.helper.Contacts; import com.fsck.k9.mail.Address; import com.fsck.k9.mail.Message; diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java index 9820d22bb..2bc7a88bc 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java @@ -31,7 +31,7 @@ import android.widget.Toast; import com.fsck.k9.Account; import com.fsck.k9.K9; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.ChooseFolder; import com.fsck.k9.activity.MessageLoaderHelper; import com.fsck.k9.activity.MessageLoaderHelper.MessageLoaderCallbacks; diff --git a/app/core/src/main/java/com/fsck/k9/ui/messageview/OnCryptoClickListener.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/OnCryptoClickListener.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/messageview/OnCryptoClickListener.java rename to app/ui/src/main/java/com/fsck/k9/ui/messageview/OnCryptoClickListener.java diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt index ba752dc2c..a813d986c 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt @@ -7,8 +7,8 @@ import android.os.Bundle import android.view.Menu import android.view.MenuItem import android.webkit.WebView -import com.fsck.k9.core.R import com.fsck.k9.activity.K9Activity +import com.fsck.k9.ui.R import de.cketti.library.changelog.ChangeLog import timber.log.Timber import java.util.Calendar diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/AccountItem.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/AccountItem.kt similarity index 95% rename from app/core/src/main/java/com/fsck/k9/ui/settings/AccountItem.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/AccountItem.kt index f77f086b6..94ad11e32 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/AccountItem.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/AccountItem.kt @@ -1,7 +1,7 @@ package com.fsck.k9.ui.settings import com.fsck.k9.Account -import com.fsck.k9.core.R +import com.fsck.k9.ui.R import com.xwray.groupie.kotlinandroidextensions.Item import com.xwray.groupie.kotlinandroidextensions.ViewHolder import kotlinx.android.synthetic.main.account_list_item.* diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/SettingsAction.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsAction.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/SettingsAction.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsAction.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/SettingsActionItem.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActionItem.kt similarity index 94% rename from app/core/src/main/java/com/fsck/k9/ui/settings/SettingsActionItem.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActionItem.kt index c2b417570..241ca6b4d 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/SettingsActionItem.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActionItem.kt @@ -1,6 +1,6 @@ package com.fsck.k9.ui.settings -import com.fsck.k9.core.R +import com.fsck.k9.ui.R import com.xwray.groupie.kotlinandroidextensions.Item import com.xwray.groupie.kotlinandroidextensions.ViewHolder import kotlinx.android.synthetic.main.text_list_item.* diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt index 5ad7045c4..1d4104524 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt @@ -6,8 +6,8 @@ import android.os.Bundle import android.support.v7.widget.LinearLayoutManager import android.view.MenuItem import com.fsck.k9.Account -import com.fsck.k9.core.R import com.fsck.k9.activity.K9Activity +import com.fsck.k9.ui.R import com.fsck.k9.ui.observeNotNull import com.fsck.k9.ui.settings.account.AccountSettingsActivity import com.xwray.groupie.GroupAdapter diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsActivity.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsActivity.kt similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsActivity.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsActivity.kt index 98bb19866..c70db1b7e 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsActivity.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsActivity.kt @@ -7,8 +7,8 @@ import android.support.v7.preference.PreferenceFragmentCompat import android.support.v7.preference.PreferenceFragmentCompat.OnPreferenceStartScreenCallback import android.support.v7.preference.PreferenceScreen import android.view.MenuItem -import com.fsck.k9.core.R import com.fsck.k9.activity.K9Activity +import com.fsck.k9.ui.R import com.fsck.k9.ui.fragmentTransaction import com.fsck.k9.ui.fragmentTransactionWithBackStack import com.fsck.k9.ui.observe diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStoreFactory.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStoreFactory.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStoreFactory.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStoreFactory.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt index 3d62776b1..150a5934c 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt @@ -6,7 +6,7 @@ import android.support.v14.preference.SwitchPreference import android.support.v7.preference.ListPreference import android.widget.Toast import com.fsck.k9.Account -import com.fsck.k9.core.R +import com.fsck.k9.ui.R import com.fsck.k9.activity.ManageIdentities import com.fsck.k9.activity.setup.AccountSetupComposition import com.fsck.k9.activity.setup.AccountSetupIncoming diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsViewModel.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsViewModel.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsViewModel.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsViewModel.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptDialogFragment.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptDialogFragment.kt similarity index 98% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptDialogFragment.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptDialogFragment.kt index 6adb4ed5a..20160aefb 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptDialogFragment.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptDialogFragment.kt @@ -11,7 +11,7 @@ import android.view.LayoutInflater import android.view.View import android.widget.CheckBox import android.widget.TextView -import com.fsck.k9.core.R +import com.fsck.k9.ui.R class AutocryptPreferEncryptDialogFragment : DialogFragment() { private val preference: AutocryptPreferEncryptPreference by lazy { diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt similarity index 98% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt index bd49c4c05..3f84e8368 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt @@ -6,7 +6,7 @@ import android.support.v4.content.res.TypedArrayUtils import android.support.v7.preference.PreferenceViewHolder import android.support.v7.preference.TwoStatePreference import android.util.AttributeSet -import com.fsck.k9.core.R +import com.fsck.k9.ui.R import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat @SuppressLint("RestrictedApi") diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerDialogFragment.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerDialogFragment.kt similarity index 98% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerDialogFragment.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerDialogFragment.kt index f70dd23db..9a3090b4e 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerDialogFragment.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerDialogFragment.kt @@ -6,7 +6,7 @@ import android.os.Bundle import android.support.v7.app.AlertDialog import android.support.v7.preference.PreferenceDialogFragmentCompat import android.view.LayoutInflater -import com.fsck.k9.core.R +import com.fsck.k9.ui.R import com.larswerkman.colorpicker.ColorPicker class HoloColorPickerDialogFragment : PreferenceDialogFragmentCompat() { diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerPreference.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerPreference.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerPreference.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/HoloColorPickerPreference.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java rename to app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java index ccbc53c39..faff931b1 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java @@ -29,7 +29,7 @@ import android.widget.ListAdapter; import com.fsck.k9.Account; import com.fsck.k9.K9; import com.fsck.k9.Preferences; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.ui.dialog.ApgDeprecationWarningDialog; import org.openintents.openpgp.util.OpenPgpApi; import org.openintents.openpgp.util.OpenPgpProviderUtil; diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsActivity.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsActivity.kt similarity index 98% rename from app/core/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsActivity.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsActivity.kt index dcb8014de..d6de02d62 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsActivity.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsActivity.kt @@ -7,8 +7,8 @@ import android.support.v7.preference.PreferenceFragmentCompat import android.support.v7.preference.PreferenceFragmentCompat.OnPreferenceStartScreenCallback import android.support.v7.preference.PreferenceScreen import android.view.MenuItem -import com.fsck.k9.core.R import com.fsck.k9.activity.K9Activity +import com.fsck.k9.ui.R import com.fsck.k9.ui.fragmentTransaction import com.fsck.k9.ui.fragmentTransactionWithBackStack diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt similarity index 100% rename from app/core/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt similarity index 99% rename from app/core/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt index 7fadead96..9aa3a31c9 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt @@ -5,7 +5,7 @@ import android.content.Intent import android.os.Bundle import android.support.v14.preference.MultiSelectListPreference import android.support.v7.preference.Preference -import com.fsck.k9.core.R +import com.fsck.k9.ui.R import com.fsck.k9.helper.FileBrowserHelper import com.fsck.k9.notification.NotificationController import com.fsck.k9.ui.settings.onClick diff --git a/app/core/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt similarity index 97% rename from app/core/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt rename to app/ui/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt index d1182e8ca..bd972621b 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt @@ -6,7 +6,7 @@ import android.content.Context import android.support.v4.content.res.TypedArrayUtils import android.support.v7.preference.ListPreference import android.util.AttributeSet -import com.fsck.k9.core.R +import com.fsck.k9.ui.R class LanguagePreference diff --git a/app/core/src/main/java/com/fsck/k9/view/ClientCertificateSpinner.java b/app/ui/src/main/java/com/fsck/k9/view/ClientCertificateSpinner.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/ClientCertificateSpinner.java rename to app/ui/src/main/java/com/fsck/k9/view/ClientCertificateSpinner.java index bc787be2f..750ffe3c6 100644 --- a/app/core/src/main/java/com/fsck/k9/view/ClientCertificateSpinner.java +++ b/app/ui/src/main/java/com/fsck/k9/view/ClientCertificateSpinner.java @@ -1,7 +1,7 @@ package com.fsck.k9.view; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import android.app.Activity; import android.content.Context; diff --git a/app/core/src/main/java/com/fsck/k9/view/ColorChip.java b/app/ui/src/main/java/com/fsck/k9/view/ColorChip.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/view/ColorChip.java rename to app/ui/src/main/java/com/fsck/k9/view/ColorChip.java diff --git a/app/core/src/main/java/com/fsck/k9/view/FoldableLinearLayout.java b/app/ui/src/main/java/com/fsck/k9/view/FoldableLinearLayout.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/FoldableLinearLayout.java rename to app/ui/src/main/java/com/fsck/k9/view/FoldableLinearLayout.java index 5b3b976a3..70aa8c773 100644 --- a/app/core/src/main/java/com/fsck/k9/view/FoldableLinearLayout.java +++ b/app/ui/src/main/java/com/fsck/k9/view/FoldableLinearLayout.java @@ -1,6 +1,6 @@ package com.fsck.k9.view; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import android.content.Context; import android.content.res.Resources.Theme; diff --git a/app/core/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java b/app/ui/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java rename to app/ui/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java index 3eaa411d0..15c0eea48 100644 --- a/app/core/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java @@ -9,7 +9,7 @@ import android.support.v4.app.DialogFragment; import android.view.View; import android.view.inputmethod.InputMethodManager; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.github.amlcurran.showcaseview.ShowcaseView; import com.github.amlcurran.showcaseview.ShowcaseView.Builder; import com.github.amlcurran.showcaseview.targets.ViewTarget; diff --git a/app/core/src/main/java/com/fsck/k9/view/K9WebViewClient.java b/app/ui/src/main/java/com/fsck/k9/view/K9WebViewClient.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/view/K9WebViewClient.java rename to app/ui/src/main/java/com/fsck/k9/view/K9WebViewClient.java diff --git a/app/core/src/main/java/com/fsck/k9/view/LinearViewAnimator.java b/app/ui/src/main/java/com/fsck/k9/view/LinearViewAnimator.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/LinearViewAnimator.java rename to app/ui/src/main/java/com/fsck/k9/view/LinearViewAnimator.java index 29fdff045..a3cd40ade 100644 --- a/app/core/src/main/java/com/fsck/k9/view/LinearViewAnimator.java +++ b/app/ui/src/main/java/com/fsck/k9/view/LinearViewAnimator.java @@ -8,7 +8,7 @@ import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ViewAnimator; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; /** This view extends the common ViewAnimator, allowing different sets of animations diff --git a/app/core/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java b/app/ui/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java rename to app/ui/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java index b84838936..29bf6948b 100644 --- a/app/core/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java +++ b/app/ui/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java @@ -6,7 +6,7 @@ import android.support.annotation.DrawableRes; import android.support.annotation.NonNull; import android.support.annotation.StringRes; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mailstore.CryptoResultAnnotation; import org.openintents.openpgp.OpenPgpDecryptionResult; import org.openintents.openpgp.OpenPgpSignatureResult; diff --git a/app/core/src/main/java/com/fsck/k9/view/MessageCryptoStatusView.java b/app/ui/src/main/java/com/fsck/k9/view/MessageCryptoStatusView.java similarity index 97% rename from app/core/src/main/java/com/fsck/k9/view/MessageCryptoStatusView.java rename to app/ui/src/main/java/com/fsck/k9/view/MessageCryptoStatusView.java index 59f9bc73e..ceb0e3f74 100644 --- a/app/core/src/main/java/com/fsck/k9/view/MessageCryptoStatusView.java +++ b/app/ui/src/main/java/com/fsck/k9/view/MessageCryptoStatusView.java @@ -7,7 +7,7 @@ import android.util.AttributeSet; import android.widget.FrameLayout; import android.widget.ImageView; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; public class MessageCryptoStatusView extends FrameLayout { diff --git a/app/core/src/main/java/com/fsck/k9/view/MessageHeader.java b/app/ui/src/main/java/com/fsck/k9/view/MessageHeader.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/MessageHeader.java rename to app/ui/src/main/java/com/fsck/k9/view/MessageHeader.java index 41f11c7ea..f018b5188 100644 --- a/app/core/src/main/java/com/fsck/k9/view/MessageHeader.java +++ b/app/ui/src/main/java/com/fsck/k9/view/MessageHeader.java @@ -32,7 +32,7 @@ import com.fsck.k9.FontSizes; import com.fsck.k9.K9; import com.fsck.k9.activity.misc.ContactPicture; import com.fsck.k9.activity.misc.ContactPictureLoader; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.helper.ClipboardManager; import com.fsck.k9.helper.Contacts; import com.fsck.k9.helper.MessageHelper; diff --git a/app/core/src/main/java/com/fsck/k9/view/MessageTitleView.java b/app/ui/src/main/java/com/fsck/k9/view/MessageTitleView.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/view/MessageTitleView.java rename to app/ui/src/main/java/com/fsck/k9/view/MessageTitleView.java diff --git a/app/core/src/main/java/com/fsck/k9/view/MessageWebView.java b/app/ui/src/main/java/com/fsck/k9/view/MessageWebView.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/MessageWebView.java rename to app/ui/src/main/java/com/fsck/k9/view/MessageWebView.java index 9c0b3d95c..e2d6c410a 100644 --- a/app/core/src/main/java/com/fsck/k9/view/MessageWebView.java +++ b/app/ui/src/main/java/com/fsck/k9/view/MessageWebView.java @@ -16,7 +16,7 @@ import android.widget.Toast; import com.fsck.k9.K9; import com.fsck.k9.K9.Theme; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.mailstore.AttachmentResolver; diff --git a/app/core/src/main/java/com/fsck/k9/view/NonLockingScrollView.java b/app/ui/src/main/java/com/fsck/k9/view/NonLockingScrollView.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/view/NonLockingScrollView.java rename to app/ui/src/main/java/com/fsck/k9/view/NonLockingScrollView.java diff --git a/app/core/src/main/java/com/fsck/k9/view/RecipientSelectView.java b/app/ui/src/main/java/com/fsck/k9/view/RecipientSelectView.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/RecipientSelectView.java rename to app/ui/src/main/java/com/fsck/k9/view/RecipientSelectView.java index 2addcb45e..85ab9ec11 100644 --- a/app/core/src/main/java/com/fsck/k9/view/RecipientSelectView.java +++ b/app/ui/src/main/java/com/fsck/k9/view/RecipientSelectView.java @@ -33,7 +33,7 @@ import android.widget.ListView; import android.widget.TextView; import com.fsck.k9.K9; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; import com.fsck.k9.activity.AlternateRecipientAdapter; import com.fsck.k9.activity.AlternateRecipientAdapter.AlternateRecipientListener; import com.fsck.k9.activity.compose.RecipientAdapter; diff --git a/app/core/src/main/java/com/fsck/k9/view/RigidWebView.java b/app/ui/src/main/java/com/fsck/k9/view/RigidWebView.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/view/RigidWebView.java rename to app/ui/src/main/java/com/fsck/k9/view/RigidWebView.java diff --git a/app/core/src/main/java/com/fsck/k9/view/StatusIndicator.java b/app/ui/src/main/java/com/fsck/k9/view/StatusIndicator.java similarity index 97% rename from app/core/src/main/java/com/fsck/k9/view/StatusIndicator.java rename to app/ui/src/main/java/com/fsck/k9/view/StatusIndicator.java index 45e22b3ee..44d359952 100644 --- a/app/core/src/main/java/com/fsck/k9/view/StatusIndicator.java +++ b/app/ui/src/main/java/com/fsck/k9/view/StatusIndicator.java @@ -6,7 +6,7 @@ import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.animation.AnimationUtils; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; public class StatusIndicator extends ToolableViewAnimator { diff --git a/app/core/src/main/java/com/fsck/k9/view/ThemeUtils.java b/app/ui/src/main/java/com/fsck/k9/view/ThemeUtils.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/view/ThemeUtils.java rename to app/ui/src/main/java/com/fsck/k9/view/ThemeUtils.java diff --git a/app/core/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java b/app/ui/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java similarity index 99% rename from app/core/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java rename to app/ui/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java index d99d2e30d..ffbfc8e7d 100644 --- a/app/core/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java +++ b/app/ui/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java @@ -34,7 +34,7 @@ import android.view.ViewGroup; import android.view.animation.Animation; import android.widget.ViewAnimator; -import com.fsck.k9.core.R; +import com.fsck.k9.ui.R; /** This view is essentially identical to ViewAnimator, but allows specifying the initial view diff --git a/app/core/src/main/java/com/fsck/k9/view/ViewSwitcher.java b/app/ui/src/main/java/com/fsck/k9/view/ViewSwitcher.java similarity index 100% rename from app/core/src/main/java/com/fsck/k9/view/ViewSwitcher.java rename to app/ui/src/main/java/com/fsck/k9/view/ViewSwitcher.java diff --git a/app/core/src/main/res/anim/fade_in.xml b/app/ui/src/main/res/anim/fade_in.xml similarity index 100% rename from app/core/src/main/res/anim/fade_in.xml rename to app/ui/src/main/res/anim/fade_in.xml diff --git a/app/core/src/main/res/anim/fade_in_left.xml b/app/ui/src/main/res/anim/fade_in_left.xml similarity index 100% rename from app/core/src/main/res/anim/fade_in_left.xml rename to app/ui/src/main/res/anim/fade_in_left.xml diff --git a/app/core/src/main/res/anim/fade_in_right.xml b/app/ui/src/main/res/anim/fade_in_right.xml similarity index 100% rename from app/core/src/main/res/anim/fade_in_right.xml rename to app/ui/src/main/res/anim/fade_in_right.xml diff --git a/app/core/src/main/res/anim/fade_out.xml b/app/ui/src/main/res/anim/fade_out.xml similarity index 100% rename from app/core/src/main/res/anim/fade_out.xml rename to app/ui/src/main/res/anim/fade_out.xml diff --git a/app/core/src/main/res/anim/fade_out_left.xml b/app/ui/src/main/res/anim/fade_out_left.xml similarity index 100% rename from app/core/src/main/res/anim/fade_out_left.xml rename to app/ui/src/main/res/anim/fade_out_left.xml diff --git a/app/core/src/main/res/anim/fade_out_right.xml b/app/ui/src/main/res/anim/fade_out_right.xml similarity index 100% rename from app/core/src/main/res/anim/fade_out_right.xml rename to app/ui/src/main/res/anim/fade_out_right.xml diff --git a/app/core/src/main/res/anim/slide_in_left.xml b/app/ui/src/main/res/anim/slide_in_left.xml similarity index 100% rename from app/core/src/main/res/anim/slide_in_left.xml rename to app/ui/src/main/res/anim/slide_in_left.xml diff --git a/app/core/src/main/res/anim/slide_in_right.xml b/app/ui/src/main/res/anim/slide_in_right.xml similarity index 100% rename from app/core/src/main/res/anim/slide_in_right.xml rename to app/ui/src/main/res/anim/slide_in_right.xml diff --git a/app/core/src/main/res/anim/slide_out_left.xml b/app/ui/src/main/res/anim/slide_out_left.xml similarity index 100% rename from app/core/src/main/res/anim/slide_out_left.xml rename to app/ui/src/main/res/anim/slide_out_left.xml diff --git a/app/core/src/main/res/anim/slide_out_right.xml b/app/ui/src/main/res/anim/slide_out_right.xml similarity index 100% rename from app/core/src/main/res/anim/slide_out_right.xml rename to app/ui/src/main/res/anim/slide_out_right.xml diff --git a/app/core/src/main/res/layout-land/actionbar_custom.xml b/app/ui/src/main/res/layout-land/actionbar_custom.xml similarity index 100% rename from app/core/src/main/res/layout-land/actionbar_custom.xml rename to app/ui/src/main/res/layout-land/actionbar_custom.xml diff --git a/app/core/src/main/res/layout/about.xml b/app/ui/src/main/res/layout/about.xml similarity index 100% rename from app/core/src/main/res/layout/about.xml rename to app/ui/src/main/res/layout/about.xml diff --git a/app/core/src/main/res/layout/account_list.xml b/app/ui/src/main/res/layout/account_list.xml similarity index 100% rename from app/core/src/main/res/layout/account_list.xml rename to app/ui/src/main/res/layout/account_list.xml diff --git a/app/core/src/main/res/layout/account_list_item.xml b/app/ui/src/main/res/layout/account_list_item.xml similarity index 100% rename from app/core/src/main/res/layout/account_list_item.xml rename to app/ui/src/main/res/layout/account_list_item.xml diff --git a/app/core/src/main/res/layout/account_setup_account_type.xml b/app/ui/src/main/res/layout/account_setup_account_type.xml similarity index 100% rename from app/core/src/main/res/layout/account_setup_account_type.xml rename to app/ui/src/main/res/layout/account_setup_account_type.xml diff --git a/app/core/src/main/res/layout/account_setup_basics.xml b/app/ui/src/main/res/layout/account_setup_basics.xml similarity index 100% rename from app/core/src/main/res/layout/account_setup_basics.xml rename to app/ui/src/main/res/layout/account_setup_basics.xml diff --git a/app/core/src/main/res/layout/account_setup_check_settings.xml b/app/ui/src/main/res/layout/account_setup_check_settings.xml similarity index 100% rename from app/core/src/main/res/layout/account_setup_check_settings.xml rename to app/ui/src/main/res/layout/account_setup_check_settings.xml diff --git a/app/core/src/main/res/layout/account_setup_composition.xml b/app/ui/src/main/res/layout/account_setup_composition.xml similarity index 100% rename from app/core/src/main/res/layout/account_setup_composition.xml rename to app/ui/src/main/res/layout/account_setup_composition.xml diff --git a/app/core/src/main/res/layout/account_setup_incoming.xml b/app/ui/src/main/res/layout/account_setup_incoming.xml similarity index 100% rename from app/core/src/main/res/layout/account_setup_incoming.xml rename to app/ui/src/main/res/layout/account_setup_incoming.xml diff --git a/app/core/src/main/res/layout/account_setup_names.xml b/app/ui/src/main/res/layout/account_setup_names.xml similarity index 100% rename from app/core/src/main/res/layout/account_setup_names.xml rename to app/ui/src/main/res/layout/account_setup_names.xml diff --git a/app/core/src/main/res/layout/account_setup_options.xml b/app/ui/src/main/res/layout/account_setup_options.xml similarity index 100% rename from app/core/src/main/res/layout/account_setup_options.xml rename to app/ui/src/main/res/layout/account_setup_options.xml diff --git a/app/core/src/main/res/layout/account_setup_outgoing.xml b/app/ui/src/main/res/layout/account_setup_outgoing.xml similarity index 100% rename from app/core/src/main/res/layout/account_setup_outgoing.xml rename to app/ui/src/main/res/layout/account_setup_outgoing.xml diff --git a/app/core/src/main/res/layout/accounts.xml b/app/ui/src/main/res/layout/accounts.xml similarity index 100% rename from app/core/src/main/res/layout/accounts.xml rename to app/ui/src/main/res/layout/accounts.xml diff --git a/app/core/src/main/res/layout/accounts_folders_icons.xml b/app/ui/src/main/res/layout/accounts_folders_icons.xml similarity index 100% rename from app/core/src/main/res/layout/accounts_folders_icons.xml rename to app/ui/src/main/res/layout/accounts_folders_icons.xml diff --git a/app/core/src/main/res/layout/accounts_item.xml b/app/ui/src/main/res/layout/accounts_item.xml similarity index 100% rename from app/core/src/main/res/layout/accounts_item.xml rename to app/ui/src/main/res/layout/accounts_item.xml diff --git a/app/core/src/main/res/layout/accounts_password_prompt.xml b/app/ui/src/main/res/layout/accounts_password_prompt.xml similarity index 100% rename from app/core/src/main/res/layout/accounts_password_prompt.xml rename to app/ui/src/main/res/layout/accounts_password_prompt.xml diff --git a/app/core/src/main/res/layout/actionbar_custom.xml b/app/ui/src/main/res/layout/actionbar_custom.xml similarity index 100% rename from app/core/src/main/res/layout/actionbar_custom.xml rename to app/ui/src/main/res/layout/actionbar_custom.xml diff --git a/app/core/src/main/res/layout/actionbar_indeterminate_progress_actionview.xml b/app/ui/src/main/res/layout/actionbar_indeterminate_progress_actionview.xml similarity index 100% rename from app/core/src/main/res/layout/actionbar_indeterminate_progress_actionview.xml rename to app/ui/src/main/res/layout/actionbar_indeterminate_progress_actionview.xml diff --git a/app/core/src/main/res/layout/activity_account_settings.xml b/app/ui/src/main/res/layout/activity_account_settings.xml similarity index 100% rename from app/core/src/main/res/layout/activity_account_settings.xml rename to app/ui/src/main/res/layout/activity_account_settings.xml diff --git a/app/core/src/main/res/layout/activity_settings.xml b/app/ui/src/main/res/layout/activity_settings.xml similarity index 100% rename from app/core/src/main/res/layout/activity_settings.xml rename to app/ui/src/main/res/layout/activity_settings.xml diff --git a/app/core/src/main/res/layout/choose_account_item.xml b/app/ui/src/main/res/layout/choose_account_item.xml similarity index 100% rename from app/core/src/main/res/layout/choose_account_item.xml rename to app/ui/src/main/res/layout/choose_account_item.xml diff --git a/app/core/src/main/res/layout/choose_identity_item.xml b/app/ui/src/main/res/layout/choose_identity_item.xml similarity index 100% rename from app/core/src/main/res/layout/choose_identity_item.xml rename to app/ui/src/main/res/layout/choose_identity_item.xml diff --git a/app/core/src/main/res/layout/client_certificate_spinner.xml b/app/ui/src/main/res/layout/client_certificate_spinner.xml similarity index 100% rename from app/core/src/main/res/layout/client_certificate_spinner.xml rename to app/ui/src/main/res/layout/client_certificate_spinner.xml diff --git a/app/core/src/main/res/layout/crypto_key_transfer.xml b/app/ui/src/main/res/layout/crypto_key_transfer.xml similarity index 100% rename from app/core/src/main/res/layout/crypto_key_transfer.xml rename to app/ui/src/main/res/layout/crypto_key_transfer.xml diff --git a/app/core/src/main/res/layout/crypto_mode_selector.xml b/app/ui/src/main/res/layout/crypto_mode_selector.xml similarity index 100% rename from app/core/src/main/res/layout/crypto_mode_selector.xml rename to app/ui/src/main/res/layout/crypto_mode_selector.xml diff --git a/app/core/src/main/res/layout/dialog_apg_deprecated.xml b/app/ui/src/main/res/layout/dialog_apg_deprecated.xml similarity index 100% rename from app/core/src/main/res/layout/dialog_apg_deprecated.xml rename to app/ui/src/main/res/layout/dialog_apg_deprecated.xml diff --git a/app/core/src/main/res/layout/dialog_autocrypt_prefer_encrypt.xml b/app/ui/src/main/res/layout/dialog_autocrypt_prefer_encrypt.xml similarity index 100% rename from app/core/src/main/res/layout/dialog_autocrypt_prefer_encrypt.xml rename to app/ui/src/main/res/layout/dialog_autocrypt_prefer_encrypt.xml diff --git a/app/core/src/main/res/layout/dialog_openkeychain_info.xml b/app/ui/src/main/res/layout/dialog_openkeychain_info.xml similarity index 100% rename from app/core/src/main/res/layout/dialog_openkeychain_info.xml rename to app/ui/src/main/res/layout/dialog_openkeychain_info.xml diff --git a/app/core/src/main/res/layout/edit_identity.xml b/app/ui/src/main/res/layout/edit_identity.xml similarity index 100% rename from app/core/src/main/res/layout/edit_identity.xml rename to app/ui/src/main/res/layout/edit_identity.xml diff --git a/app/core/src/main/res/layout/email_address_list.xml b/app/ui/src/main/res/layout/email_address_list.xml similarity index 100% rename from app/core/src/main/res/layout/email_address_list.xml rename to app/ui/src/main/res/layout/email_address_list.xml diff --git a/app/core/src/main/res/layout/email_address_list_item.xml b/app/ui/src/main/res/layout/email_address_list_item.xml similarity index 100% rename from app/core/src/main/res/layout/email_address_list_item.xml rename to app/ui/src/main/res/layout/email_address_list_item.xml diff --git a/app/core/src/main/res/layout/empty_message_view.xml b/app/ui/src/main/res/layout/empty_message_view.xml similarity index 100% rename from app/core/src/main/res/layout/empty_message_view.xml rename to app/ui/src/main/res/layout/empty_message_view.xml diff --git a/app/core/src/main/res/layout/foldable_linearlayout.xml b/app/ui/src/main/res/layout/foldable_linearlayout.xml similarity index 100% rename from app/core/src/main/res/layout/foldable_linearlayout.xml rename to app/ui/src/main/res/layout/foldable_linearlayout.xml diff --git a/app/core/src/main/res/layout/folder_list.xml b/app/ui/src/main/res/layout/folder_list.xml similarity index 100% rename from app/core/src/main/res/layout/folder_list.xml rename to app/ui/src/main/res/layout/folder_list.xml diff --git a/app/core/src/main/res/layout/folder_list_item.xml b/app/ui/src/main/res/layout/folder_list_item.xml similarity index 100% rename from app/core/src/main/res/layout/folder_list_item.xml rename to app/ui/src/main/res/layout/folder_list_item.xml diff --git a/app/core/src/main/res/layout/general_settings.xml b/app/ui/src/main/res/layout/general_settings.xml similarity index 100% rename from app/core/src/main/res/layout/general_settings.xml rename to app/ui/src/main/res/layout/general_settings.xml diff --git a/app/core/src/main/res/layout/holo_color_picker_dialog.xml b/app/ui/src/main/res/layout/holo_color_picker_dialog.xml similarity index 100% rename from app/core/src/main/res/layout/holo_color_picker_dialog.xml rename to app/ui/src/main/res/layout/holo_color_picker_dialog.xml diff --git a/app/core/src/main/res/layout/list_content_simple.xml b/app/ui/src/main/res/layout/list_content_simple.xml similarity index 100% rename from app/core/src/main/res/layout/list_content_simple.xml rename to app/ui/src/main/res/layout/list_content_simple.xml diff --git a/app/core/src/main/res/layout/message.xml b/app/ui/src/main/res/layout/message.xml similarity index 100% rename from app/core/src/main/res/layout/message.xml rename to app/ui/src/main/res/layout/message.xml diff --git a/app/core/src/main/res/layout/message_compose.xml b/app/ui/src/main/res/layout/message_compose.xml similarity index 100% rename from app/core/src/main/res/layout/message_compose.xml rename to app/ui/src/main/res/layout/message_compose.xml diff --git a/app/core/src/main/res/layout/message_compose_attachment.xml b/app/ui/src/main/res/layout/message_compose_attachment.xml similarity index 100% rename from app/core/src/main/res/layout/message_compose_attachment.xml rename to app/ui/src/main/res/layout/message_compose_attachment.xml diff --git a/app/core/src/main/res/layout/message_compose_recipients.xml b/app/ui/src/main/res/layout/message_compose_recipients.xml similarity index 100% rename from app/core/src/main/res/layout/message_compose_recipients.xml rename to app/ui/src/main/res/layout/message_compose_recipients.xml diff --git a/app/core/src/main/res/layout/message_container.xml b/app/ui/src/main/res/layout/message_container.xml similarity index 100% rename from app/core/src/main/res/layout/message_container.xml rename to app/ui/src/main/res/layout/message_container.xml diff --git a/app/core/src/main/res/layout/message_content_crypto_cancelled.xml b/app/ui/src/main/res/layout/message_content_crypto_cancelled.xml similarity index 100% rename from app/core/src/main/res/layout/message_content_crypto_cancelled.xml rename to app/ui/src/main/res/layout/message_content_crypto_cancelled.xml diff --git a/app/core/src/main/res/layout/message_content_crypto_error.xml b/app/ui/src/main/res/layout/message_content_crypto_error.xml similarity index 100% rename from app/core/src/main/res/layout/message_content_crypto_error.xml rename to app/ui/src/main/res/layout/message_content_crypto_error.xml diff --git a/app/core/src/main/res/layout/message_content_crypto_incomplete.xml b/app/ui/src/main/res/layout/message_content_crypto_incomplete.xml similarity index 100% rename from app/core/src/main/res/layout/message_content_crypto_incomplete.xml rename to app/ui/src/main/res/layout/message_content_crypto_incomplete.xml diff --git a/app/core/src/main/res/layout/message_content_crypto_no_provider.xml b/app/ui/src/main/res/layout/message_content_crypto_no_provider.xml similarity index 100% rename from app/core/src/main/res/layout/message_content_crypto_no_provider.xml rename to app/ui/src/main/res/layout/message_content_crypto_no_provider.xml diff --git a/app/core/src/main/res/layout/message_crypto_info_dialog.xml b/app/ui/src/main/res/layout/message_crypto_info_dialog.xml similarity index 100% rename from app/core/src/main/res/layout/message_crypto_info_dialog.xml rename to app/ui/src/main/res/layout/message_crypto_info_dialog.xml diff --git a/app/core/src/main/res/layout/message_crypto_status_view.xml b/app/ui/src/main/res/layout/message_crypto_status_view.xml similarity index 100% rename from app/core/src/main/res/layout/message_crypto_status_view.xml rename to app/ui/src/main/res/layout/message_crypto_status_view.xml diff --git a/app/core/src/main/res/layout/message_list.xml b/app/ui/src/main/res/layout/message_list.xml similarity index 100% rename from app/core/src/main/res/layout/message_list.xml rename to app/ui/src/main/res/layout/message_list.xml diff --git a/app/core/src/main/res/layout/message_list_fragment.xml b/app/ui/src/main/res/layout/message_list_fragment.xml similarity index 100% rename from app/core/src/main/res/layout/message_list_fragment.xml rename to app/ui/src/main/res/layout/message_list_fragment.xml diff --git a/app/core/src/main/res/layout/message_list_item.xml b/app/ui/src/main/res/layout/message_list_item.xml similarity index 100% rename from app/core/src/main/res/layout/message_list_item.xml rename to app/ui/src/main/res/layout/message_list_item.xml diff --git a/app/core/src/main/res/layout/message_list_item_footer.xml b/app/ui/src/main/res/layout/message_list_item_footer.xml similarity index 100% rename from app/core/src/main/res/layout/message_list_item_footer.xml rename to app/ui/src/main/res/layout/message_list_item_footer.xml diff --git a/app/core/src/main/res/layout/message_list_loading.xml b/app/ui/src/main/res/layout/message_list_loading.xml similarity index 100% rename from app/core/src/main/res/layout/message_list_loading.xml rename to app/ui/src/main/res/layout/message_list_loading.xml diff --git a/app/core/src/main/res/layout/message_view_attachment.xml b/app/ui/src/main/res/layout/message_view_attachment.xml similarity index 100% rename from app/core/src/main/res/layout/message_view_attachment.xml rename to app/ui/src/main/res/layout/message_view_attachment.xml diff --git a/app/core/src/main/res/layout/message_view_attachment_locked.xml b/app/ui/src/main/res/layout/message_view_attachment_locked.xml similarity index 100% rename from app/core/src/main/res/layout/message_view_attachment_locked.xml rename to app/ui/src/main/res/layout/message_view_attachment_locked.xml diff --git a/app/core/src/main/res/layout/message_view_header.xml b/app/ui/src/main/res/layout/message_view_header.xml similarity index 100% rename from app/core/src/main/res/layout/message_view_header.xml rename to app/ui/src/main/res/layout/message_view_header.xml diff --git a/app/core/src/main/res/layout/openpgp_enabled_error_dialog.xml b/app/ui/src/main/res/layout/openpgp_enabled_error_dialog.xml similarity index 100% rename from app/core/src/main/res/layout/openpgp_enabled_error_dialog.xml rename to app/ui/src/main/res/layout/openpgp_enabled_error_dialog.xml diff --git a/app/core/src/main/res/layout/openpgp_encrypt_description_dialog.xml b/app/ui/src/main/res/layout/openpgp_encrypt_description_dialog.xml similarity index 100% rename from app/core/src/main/res/layout/openpgp_encrypt_description_dialog.xml rename to app/ui/src/main/res/layout/openpgp_encrypt_description_dialog.xml diff --git a/app/core/src/main/res/layout/openpgp_inline_dialog.xml b/app/ui/src/main/res/layout/openpgp_inline_dialog.xml similarity index 100% rename from app/core/src/main/res/layout/openpgp_inline_dialog.xml rename to app/ui/src/main/res/layout/openpgp_inline_dialog.xml diff --git a/app/core/src/main/res/layout/openpgp_sign_only_dialog.xml b/app/ui/src/main/res/layout/openpgp_sign_only_dialog.xml similarity index 100% rename from app/core/src/main/res/layout/openpgp_sign_only_dialog.xml rename to app/ui/src/main/res/layout/openpgp_sign_only_dialog.xml diff --git a/app/core/src/main/res/layout/recipient_alternate_item.xml b/app/ui/src/main/res/layout/recipient_alternate_item.xml similarity index 100% rename from app/core/src/main/res/layout/recipient_alternate_item.xml rename to app/ui/src/main/res/layout/recipient_alternate_item.xml diff --git a/app/core/src/main/res/layout/recipient_dropdown_item.xml b/app/ui/src/main/res/layout/recipient_dropdown_item.xml similarity index 100% rename from app/core/src/main/res/layout/recipient_dropdown_item.xml rename to app/ui/src/main/res/layout/recipient_dropdown_item.xml diff --git a/app/core/src/main/res/layout/recipient_token_item.xml b/app/ui/src/main/res/layout/recipient_token_item.xml similarity index 100% rename from app/core/src/main/res/layout/recipient_token_item.xml rename to app/ui/src/main/res/layout/recipient_token_item.xml diff --git a/app/core/src/main/res/layout/select_openpgp_app_item.xml b/app/ui/src/main/res/layout/select_openpgp_app_item.xml similarity index 100% rename from app/core/src/main/res/layout/select_openpgp_app_item.xml rename to app/ui/src/main/res/layout/select_openpgp_app_item.xml diff --git a/app/core/src/main/res/layout/slider_preference_dialog.xml b/app/ui/src/main/res/layout/slider_preference_dialog.xml similarity index 100% rename from app/core/src/main/res/layout/slider_preference_dialog.xml rename to app/ui/src/main/res/layout/slider_preference_dialog.xml diff --git a/app/core/src/main/res/layout/split_message_list.xml b/app/ui/src/main/res/layout/split_message_list.xml similarity index 100% rename from app/core/src/main/res/layout/split_message_list.xml rename to app/ui/src/main/res/layout/split_message_list.xml diff --git a/app/core/src/main/res/layout/status_indicator.xml b/app/ui/src/main/res/layout/status_indicator.xml similarity index 100% rename from app/core/src/main/res/layout/status_indicator.xml rename to app/ui/src/main/res/layout/status_indicator.xml diff --git a/app/core/src/main/res/layout/text_list_item.xml b/app/ui/src/main/res/layout/text_list_item.xml similarity index 100% rename from app/core/src/main/res/layout/text_list_item.xml rename to app/ui/src/main/res/layout/text_list_item.xml diff --git a/app/core/src/main/res/layout/upgrade_databases.xml b/app/ui/src/main/res/layout/upgrade_databases.xml similarity index 100% rename from app/core/src/main/res/layout/upgrade_databases.xml rename to app/ui/src/main/res/layout/upgrade_databases.xml diff --git a/app/core/src/main/res/layout/welcome_message.xml b/app/ui/src/main/res/layout/welcome_message.xml similarity index 100% rename from app/core/src/main/res/layout/welcome_message.xml rename to app/ui/src/main/res/layout/welcome_message.xml diff --git a/app/core/src/main/res/layout/wizard_cancel.xml b/app/ui/src/main/res/layout/wizard_cancel.xml similarity index 100% rename from app/core/src/main/res/layout/wizard_cancel.xml rename to app/ui/src/main/res/layout/wizard_cancel.xml diff --git a/app/core/src/main/res/layout/wizard_done.xml b/app/ui/src/main/res/layout/wizard_done.xml similarity index 100% rename from app/core/src/main/res/layout/wizard_done.xml rename to app/ui/src/main/res/layout/wizard_done.xml diff --git a/app/core/src/main/res/layout/wizard_next.xml b/app/ui/src/main/res/layout/wizard_next.xml similarity index 100% rename from app/core/src/main/res/layout/wizard_next.xml rename to app/ui/src/main/res/layout/wizard_next.xml diff --git a/app/core/src/main/res/layout/wizard_setup.xml b/app/ui/src/main/res/layout/wizard_setup.xml similarity index 100% rename from app/core/src/main/res/layout/wizard_setup.xml rename to app/ui/src/main/res/layout/wizard_setup.xml diff --git a/app/core/src/main/res/layout/wizard_welcome.xml b/app/ui/src/main/res/layout/wizard_welcome.xml similarity index 100% rename from app/core/src/main/res/layout/wizard_welcome.xml rename to app/ui/src/main/res/layout/wizard_welcome.xml diff --git a/app/core/src/main/res/menu/about_option.xml b/app/ui/src/main/res/menu/about_option.xml similarity index 100% rename from app/core/src/main/res/menu/about_option.xml rename to app/ui/src/main/res/menu/about_option.xml diff --git a/app/core/src/main/res/menu/accounts_context.xml b/app/ui/src/main/res/menu/accounts_context.xml similarity index 100% rename from app/core/src/main/res/menu/accounts_context.xml rename to app/ui/src/main/res/menu/accounts_context.xml diff --git a/app/core/src/main/res/menu/accounts_option.xml b/app/ui/src/main/res/menu/accounts_option.xml similarity index 100% rename from app/core/src/main/res/menu/accounts_option.xml rename to app/ui/src/main/res/menu/accounts_option.xml diff --git a/app/core/src/main/res/menu/disabled_accounts_context.xml b/app/ui/src/main/res/menu/disabled_accounts_context.xml similarity index 100% rename from app/core/src/main/res/menu/disabled_accounts_context.xml rename to app/ui/src/main/res/menu/disabled_accounts_context.xml diff --git a/app/core/src/main/res/menu/folder_context.xml b/app/ui/src/main/res/menu/folder_context.xml similarity index 100% rename from app/core/src/main/res/menu/folder_context.xml rename to app/ui/src/main/res/menu/folder_context.xml diff --git a/app/core/src/main/res/menu/folder_list_option.xml b/app/ui/src/main/res/menu/folder_list_option.xml similarity index 100% rename from app/core/src/main/res/menu/folder_list_option.xml rename to app/ui/src/main/res/menu/folder_list_option.xml diff --git a/app/core/src/main/res/menu/folder_select_option.xml b/app/ui/src/main/res/menu/folder_select_option.xml similarity index 100% rename from app/core/src/main/res/menu/folder_select_option.xml rename to app/ui/src/main/res/menu/folder_select_option.xml diff --git a/app/core/src/main/res/menu/manage_identities_context.xml b/app/ui/src/main/res/menu/manage_identities_context.xml similarity index 100% rename from app/core/src/main/res/menu/manage_identities_context.xml rename to app/ui/src/main/res/menu/manage_identities_context.xml diff --git a/app/core/src/main/res/menu/manage_identities_option.xml b/app/ui/src/main/res/menu/manage_identities_option.xml similarity index 100% rename from app/core/src/main/res/menu/manage_identities_option.xml rename to app/ui/src/main/res/menu/manage_identities_option.xml diff --git a/app/core/src/main/res/menu/message_compose_option.xml b/app/ui/src/main/res/menu/message_compose_option.xml similarity index 100% rename from app/core/src/main/res/menu/message_compose_option.xml rename to app/ui/src/main/res/menu/message_compose_option.xml diff --git a/app/core/src/main/res/menu/message_list_context.xml b/app/ui/src/main/res/menu/message_list_context.xml similarity index 100% rename from app/core/src/main/res/menu/message_list_context.xml rename to app/ui/src/main/res/menu/message_list_context.xml diff --git a/app/core/src/main/res/menu/message_list_item_context.xml b/app/ui/src/main/res/menu/message_list_item_context.xml similarity index 100% rename from app/core/src/main/res/menu/message_list_item_context.xml rename to app/ui/src/main/res/menu/message_list_item_context.xml diff --git a/app/core/src/main/res/menu/message_list_option.xml b/app/ui/src/main/res/menu/message_list_option.xml similarity index 100% rename from app/core/src/main/res/menu/message_list_option.xml rename to app/ui/src/main/res/menu/message_list_option.xml diff --git a/app/ui/src/test/java/com/fsck/k9/K9RobolectricTest.kt b/app/ui/src/test/java/com/fsck/k9/K9RobolectricTest.kt new file mode 100644 index 000000000..4eb912f41 --- /dev/null +++ b/app/ui/src/test/java/com/fsck/k9/K9RobolectricTest.kt @@ -0,0 +1,16 @@ +package com.fsck.k9 + +import android.app.Application +import org.junit.runner.RunWith +import org.koin.test.AutoCloseKoinTest +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +/** + * A Robolectric test that creates an instance of our [Application] test class [TestApp]. + * + * See also [RobolectricTest]. + */ +@RunWith(RobolectricTestRunner::class) +@Config(application = TestApp::class) +abstract class K9RobolectricTest : AutoCloseKoinTest() diff --git a/app/ui/src/test/java/com/fsck/k9/RobolectricTest.kt b/app/ui/src/test/java/com/fsck/k9/RobolectricTest.kt new file mode 100644 index 000000000..8dde7f563 --- /dev/null +++ b/app/ui/src/test/java/com/fsck/k9/RobolectricTest.kt @@ -0,0 +1,17 @@ +package com.fsck.k9 + +import android.app.Application +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +/** + * A Robolectric test that does not create an instance of our [Application] class [K9]. + * + * See also [K9RobolectricTest]. + */ +@RunWith(RobolectricTestRunner::class) +@Config(application = EmptyApplication::class) +abstract class RobolectricTest + +class EmptyApplication : Application() diff --git a/app/ui/src/test/java/com/fsck/k9/TestApp.kt b/app/ui/src/test/java/com/fsck/k9/TestApp.kt new file mode 100644 index 000000000..eacbcf852 --- /dev/null +++ b/app/ui/src/test/java/com/fsck/k9/TestApp.kt @@ -0,0 +1,20 @@ +package com.fsck.k9 + +import android.app.Application +import org.koin.dsl.module.applicationContext + +class TestApp : Application() { + override fun onCreate() { + Core.earlyInit(this) + + super.onCreate() + DI.start(this, Core.coreModules + testModule) + + K9.init(this) + Core.init(this) + } +} + +val testModule = applicationContext { + bean { AppConfig(emptyList()) } +} diff --git a/app/core/src/test/java/com/fsck/k9/activity/ActivityListenerTest.java b/app/ui/src/test/java/com/fsck/k9/activity/ActivityListenerTest.java similarity index 100% rename from app/core/src/test/java/com/fsck/k9/activity/ActivityListenerTest.java rename to app/ui/src/test/java/com/fsck/k9/activity/ActivityListenerTest.java diff --git a/app/core/src/test/java/com/fsck/k9/activity/compose/RecipientLoaderTest.java b/app/ui/src/test/java/com/fsck/k9/activity/compose/RecipientLoaderTest.java similarity index 100% rename from app/core/src/test/java/com/fsck/k9/activity/compose/RecipientLoaderTest.java rename to app/ui/src/test/java/com/fsck/k9/activity/compose/RecipientLoaderTest.java diff --git a/app/core/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.java b/app/ui/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.java similarity index 100% rename from app/core/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.java rename to app/ui/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.java diff --git a/app/core/src/test/java/com/fsck/k9/activity/misc/ContactPictureLoaderTest.java b/app/ui/src/test/java/com/fsck/k9/activity/misc/ContactPictureLoaderTest.java similarity index 100% rename from app/core/src/test/java/com/fsck/k9/activity/misc/ContactPictureLoaderTest.java rename to app/ui/src/test/java/com/fsck/k9/activity/misc/ContactPictureLoaderTest.java diff --git a/app/core/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java b/app/ui/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java similarity index 98% rename from app/core/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java rename to app/ui/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java index 6420f8b7b..b9cdbf179 100644 --- a/app/core/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java +++ b/app/ui/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java @@ -33,9 +33,9 @@ import org.openintents.openpgp.util.OpenPgpApi.OpenPgpDataSink; import org.openintents.openpgp.util.OpenPgpApi.OpenPgpDataSource; import org.robolectric.RuntimeEnvironment; -import static com.fsck.k9.message.TestMessageConstructionUtils.bodypart; -import static com.fsck.k9.message.TestMessageConstructionUtils.messageFromBody; -import static com.fsck.k9.message.TestMessageConstructionUtils.multipart; +import static com.fsck.k9.mail.TestMessageConstructionUtils.bodypart; +import static com.fsck.k9.mail.TestMessageConstructionUtils.messageFromBody; +import static com.fsck.k9.mail.TestMessageConstructionUtils.multipart; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertSame; import static junit.framework.Assert.assertTrue; diff --git a/app/core/src/test/java/com/fsck/k9/view/MessageHeaderTest.kt b/app/ui/src/test/java/com/fsck/k9/view/MessageHeaderTest.kt similarity index 100% rename from app/core/src/test/java/com/fsck/k9/view/MessageHeaderTest.kt rename to app/ui/src/test/java/com/fsck/k9/view/MessageHeaderTest.kt diff --git a/app/core/src/test/java/org/openintents/openpgp/util/ShadowOpenPgpAsyncTask.java b/app/ui/src/test/java/org/openintents/openpgp/util/ShadowOpenPgpAsyncTask.java similarity index 100% rename from app/core/src/test/java/org/openintents/openpgp/util/ShadowOpenPgpAsyncTask.java rename to app/ui/src/test/java/org/openintents/openpgp/util/ShadowOpenPgpAsyncTask.java diff --git a/build.gradle b/build.gradle index 3087c1b34..1fe624e22 100644 --- a/build.gradle +++ b/build.gradle @@ -45,4 +45,14 @@ subprojects { jcenter() google() } + + configurations.all { + exclude group: "com.android.support", module: "support-media-compat" + + resolutionStrategy { + force "com.android.support:support-annotations:${versions.supportLibrary}" + force "com.android.support:design:${versions.supportLibrary}" + force "com.android.support:support-fragment:${versions.supportLibrary}" + } + } } diff --git a/app/core/src/test/java/com/fsck/k9/message/TestMessageConstructionUtils.java b/mail/testing/src/main/java/com/fsck/k9/mail/TestMessageConstructionUtils.java similarity index 94% rename from app/core/src/test/java/com/fsck/k9/message/TestMessageConstructionUtils.java rename to mail/testing/src/main/java/com/fsck/k9/mail/TestMessageConstructionUtils.java index 22b4c1a4b..9ce33aab7 100644 --- a/app/core/src/test/java/com/fsck/k9/message/TestMessageConstructionUtils.java +++ b/mail/testing/src/main/java/com/fsck/k9/mail/TestMessageConstructionUtils.java @@ -1,9 +1,6 @@ -package com.fsck.k9.message; +package com.fsck.k9.mail; -import com.fsck.k9.mail.Body; -import com.fsck.k9.mail.BodyPart; -import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.internet.MimeBodyPart; import com.fsck.k9.mail.internet.MimeHeader; import com.fsck.k9.mail.internet.MimeMessage; diff --git a/settings.gradle b/settings.gradle index e84c8309b..ef4c0cc30 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,5 @@ include ':app:k9mail' +include ':app:ui' include ':app:core' include ':mail:common' include ':mail:testing'