diff --git a/.travis.yml b/.travis.yml index 5c9f92452..7b0db982d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,12 @@ android: components: - tools - build-tools-28.0.3 - - android-27 + - android-28 - extra-android-m2repository jdk: oraclejdk8 before_install: -- yes | sdkmanager "platforms;android-27" +- yes | sdkmanager "platforms;android-28" script: ./gradlew testDebug diff --git a/app/core/src/main/java/com/fsck/k9/Account.java b/app/core/src/main/java/com/fsck/k9/Account.java index 5ba2633b9..f17f061ec 100644 --- a/app/core/src/main/java/com/fsck/k9/Account.java +++ b/app/core/src/main/java/com/fsck/k9/Account.java @@ -12,7 +12,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import android.content.Context; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.text.TextUtils; import com.fsck.k9.backend.api.SyncConfig.ExpungePolicy; diff --git a/app/core/src/main/java/com/fsck/k9/ActivityExtensions.kt b/app/core/src/main/java/com/fsck/k9/ActivityExtensions.kt index 57bdb66ba..eee9d0056 100644 --- a/app/core/src/main/java/com/fsck/k9/ActivityExtensions.kt +++ b/app/core/src/main/java/com/fsck/k9/ActivityExtensions.kt @@ -1,7 +1,7 @@ package com.fsck.k9 import android.app.Activity -import android.support.annotation.StringRes +import androidx.annotation.StringRes import android.widget.Toast fun Activity.finishWithErrorToast(@StringRes errorRes: Int, vararg formatArgs: String) { diff --git a/app/core/src/main/java/com/fsck/k9/Preferences.java b/app/core/src/main/java/com/fsck/k9/Preferences.java index 029bd2b66..e1f06997f 100644 --- a/app/core/src/main/java/com/fsck/k9/Preferences.java +++ b/app/core/src/main/java/com/fsck/k9/Preferences.java @@ -13,10 +13,10 @@ import java.util.UUID; import java.util.concurrent.CopyOnWriteArrayList; import android.content.Context; -import android.support.annotation.GuardedBy; -import android.support.annotation.NonNull; -import android.support.annotation.RestrictTo; -import android.support.annotation.RestrictTo.Scope; +import androidx.annotation.GuardedBy; +import androidx.annotation.NonNull; +import androidx.annotation.RestrictTo; +import androidx.annotation.RestrictTo.Scope; import com.fsck.k9.backend.BackendManager; import com.fsck.k9.mail.MessagingException; diff --git a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptGossipHeader.java b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptGossipHeader.java index d7ac930cd..91d9b7883 100644 --- a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptGossipHeader.java +++ b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptGossipHeader.java @@ -3,7 +3,7 @@ package com.fsck.k9.autocrypt; import java.util.Arrays; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; class AutocryptGossipHeader { diff --git a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptGossipHeaderParser.java b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptGossipHeaderParser.java index d5f299454..27378a555 100644 --- a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptGossipHeaderParser.java +++ b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptGossipHeaderParser.java @@ -6,9 +6,9 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.mail.Part; import com.fsck.k9.mail.internet.MimeUtility; diff --git a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeader.java b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeader.java index 7a71b0fe0..d5d667103 100644 --- a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeader.java +++ b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeader.java @@ -4,7 +4,7 @@ package com.fsck.k9.autocrypt; import java.util.Arrays; import java.util.Map; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import okio.ByteString; diff --git a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeaderParser.java b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeaderParser.java index 686924478..26aa5b342 100644 --- a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeaderParser.java +++ b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeaderParser.java @@ -4,9 +4,9 @@ package com.fsck.k9.autocrypt; import java.util.ArrayList; import java.util.Map; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.mail.Message; import com.fsck.k9.mail.internet.MimeUtility; diff --git a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptOperations.java b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptOperations.java index ffe4b2466..ddece0ad9 100644 --- a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptOperations.java +++ b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptOperations.java @@ -8,7 +8,7 @@ import java.util.List; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.fsck.k9.mail.Address; import com.fsck.k9.mail.Message; 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 26155e5e4..f12bf1d7c 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 @@ -7,7 +7,7 @@ import java.util.Map; import android.content.Context; import android.content.Intent; import android.net.Uri; -import android.support.v4.content.LocalBroadcastManager; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import com.fsck.k9.mail.Message; import com.fsck.k9.mailstore.LocalMessage; diff --git a/app/core/src/main/java/com/fsck/k9/controller/MessageReference.java b/app/core/src/main/java/com/fsck/k9/controller/MessageReference.java index 560d1467a..c26e67e78 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/MessageReference.java +++ b/app/core/src/main/java/com/fsck/k9/controller/MessageReference.java @@ -3,7 +3,7 @@ package com.fsck.k9.controller; import java.util.StringTokenizer; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.fsck.k9.mail.Flag; import com.fsck.k9.mail.filter.Base64; diff --git a/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java b/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java index 3495edc5f..b3d0d3686 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java +++ b/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java @@ -30,8 +30,8 @@ import android.content.Intent; import android.os.PowerManager; import android.os.Process; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.Account; import com.fsck.k9.Account.DeletePolicy; diff --git a/app/core/src/main/java/com/fsck/k9/crypto/MessageCryptoStructureDetector.java b/app/core/src/main/java/com/fsck/k9/crypto/MessageCryptoStructureDetector.java index 2778a3d5f..33c33ffe7 100644 --- a/app/core/src/main/java/com/fsck/k9/crypto/MessageCryptoStructureDetector.java +++ b/app/core/src/main/java/com/fsck/k9/crypto/MessageCryptoStructureDetector.java @@ -7,8 +7,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Stack; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.helper.StringHelper; import com.fsck.k9.mail.Body; diff --git a/app/core/src/main/java/com/fsck/k9/helper/Contacts.java b/app/core/src/main/java/com/fsck/k9/helper/Contacts.java index 56e4e08b0..e9de1f814 100644 --- a/app/core/src/main/java/com/fsck/k9/helper/Contacts.java +++ b/app/core/src/main/java/com/fsck/k9/helper/Contacts.java @@ -12,7 +12,7 @@ import android.net.Uri; import android.provider.ContactsContract; import timber.log.Timber; import android.provider.ContactsContract.CommonDataKinds.Photo; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import com.fsck.k9.mail.Address; diff --git a/app/core/src/main/java/com/fsck/k9/helper/K9AlarmManager.java b/app/core/src/main/java/com/fsck/k9/helper/K9AlarmManager.java index 5921477fa..2220a5660 100644 --- a/app/core/src/main/java/com/fsck/k9/helper/K9AlarmManager.java +++ b/app/core/src/main/java/com/fsck/k9/helper/K9AlarmManager.java @@ -5,8 +5,8 @@ import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.os.Build; -import android.support.annotation.RequiresApi; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.RequiresApi; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.power.DozeChecker; diff --git a/app/core/src/main/java/com/fsck/k9/helper/ReplyToParser.java b/app/core/src/main/java/com/fsck/k9/helper/ReplyToParser.java index 2358189ac..7cbb15e71 100644 --- a/app/core/src/main/java/com/fsck/k9/helper/ReplyToParser.java +++ b/app/core/src/main/java/com/fsck/k9/helper/ReplyToParser.java @@ -6,7 +6,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.Account; import com.fsck.k9.mail.Address; diff --git a/app/core/src/main/java/com/fsck/k9/helper/RetainFragment.java b/app/core/src/main/java/com/fsck/k9/helper/RetainFragment.java index 7c63c340d..8d3521e6e 100644 --- a/app/core/src/main/java/com/fsck/k9/helper/RetainFragment.java +++ b/app/core/src/main/java/com/fsck/k9/helper/RetainFragment.java @@ -2,8 +2,8 @@ package com.fsck.k9.helper; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; public class RetainFragment extends Fragment { diff --git a/app/core/src/main/java/com/fsck/k9/helper/SingleLiveEvent.java b/app/core/src/main/java/com/fsck/k9/helper/SingleLiveEvent.java index 075c53df2..4eb44ddf1 100644 --- a/app/core/src/main/java/com/fsck/k9/helper/SingleLiveEvent.java +++ b/app/core/src/main/java/com/fsck/k9/helper/SingleLiveEvent.java @@ -19,12 +19,12 @@ package com.fsck.k9.helper; import java.util.concurrent.atomic.AtomicBoolean; -import android.arch.lifecycle.LifecycleOwner; -import android.arch.lifecycle.MutableLiveData; -import android.arch.lifecycle.Observer; -import android.support.annotation.MainThread; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.lifecycle.LifecycleOwner; +import androidx.lifecycle.MutableLiveData; +import androidx.lifecycle.Observer; +import androidx.annotation.MainThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import timber.log.Timber; @@ -43,7 +43,7 @@ public class SingleLiveEvent extends MutableLiveData { private final AtomicBoolean pending = new AtomicBoolean(false); @MainThread - public void observe(@NonNull LifecycleOwner owner, @NonNull final Observer observer) { + public void observe(@NonNull LifecycleOwner owner, @NonNull final Observer observer) { if (hasActiveObservers()) { Timber.w("Multiple observers registered but only one will be notified of changes."); @@ -73,4 +73,4 @@ public class SingleLiveEvent extends MutableLiveData { public void recall() { setValue(getValue()); } -} \ No newline at end of file +} diff --git a/app/core/src/main/java/com/fsck/k9/helper/jsoup/NodeFilter.java b/app/core/src/main/java/com/fsck/k9/helper/jsoup/NodeFilter.java index 8fb22e7d5..be1a881c1 100644 --- a/app/core/src/main/java/com/fsck/k9/helper/jsoup/NodeFilter.java +++ b/app/core/src/main/java/com/fsck/k9/helper/jsoup/NodeFilter.java @@ -1,7 +1,7 @@ package com.fsck.k9.helper.jsoup; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.jsoup.nodes.Node; diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/AttachmentResolver.java b/app/core/src/main/java/com/fsck/k9/mailstore/AttachmentResolver.java index ead83acb5..d5914e82a 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/AttachmentResolver.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/AttachmentResolver.java @@ -7,9 +7,9 @@ import java.util.Map; import java.util.Stack; import android.net.Uri; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; -import android.support.annotation.WorkerThread; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.annotation.WorkerThread; import com.fsck.k9.DI; import timber.log.Timber; diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/CryptoResultAnnotation.java b/app/core/src/main/java/com/fsck/k9/mailstore/CryptoResultAnnotation.java index f74d3950e..7991dcd92 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/CryptoResultAnnotation.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/CryptoResultAnnotation.java @@ -2,8 +2,8 @@ package com.fsck.k9.mailstore; import android.app.PendingIntent; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.fsck.k9.mail.internet.MimeBodyPart; diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/DeferredFileBody.java b/app/core/src/main/java/com/fsck/k9/mailstore/DeferredFileBody.java index d9bf3b100..8129e71c5 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/DeferredFileBody.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/DeferredFileBody.java @@ -10,8 +10,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import timber.log.Timber; import com.fsck.k9.mail.MessagingException; diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/LocalFolder.java b/app/core/src/main/java/com/fsck/k9/mailstore/LocalFolder.java index 6a7861f24..55f4fcd93 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/LocalFolder.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/LocalFolder.java @@ -24,7 +24,7 @@ import java.util.UUID; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.Account; import com.fsck.k9.DI; diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/LocalMessage.java b/app/core/src/main/java/com/fsck/k9/mailstore/LocalMessage.java index 69213bc9f..3c9b96644 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/LocalMessage.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/LocalMessage.java @@ -9,7 +9,7 @@ import java.util.Date; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.Account; import com.fsck.k9.core.BuildConfig; diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/LocalStore.java b/app/core/src/main/java/com/fsck/k9/mailstore/LocalStore.java index 49713098b..c3a117a66 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/LocalStore.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/LocalStore.java @@ -24,7 +24,7 @@ import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.text.TextUtils; import com.fsck.k9.Account; diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java b/app/core/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java index fd16aee2a..3d902654e 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java @@ -6,9 +6,9 @@ import java.util.Collections; import java.util.Date; import java.util.List; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; -import android.support.annotation.WorkerThread; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.annotation.WorkerThread; import com.fsck.k9.CoreResourceProvider; import com.fsck.k9.crypto.MessageCryptoStructureDetector; diff --git a/app/core/src/main/java/com/fsck/k9/message/AutocryptStatusInteractor.java b/app/core/src/main/java/com/fsck/k9/message/AutocryptStatusInteractor.java index f76e998be..d5692b2bf 100644 --- a/app/core/src/main/java/com/fsck/k9/message/AutocryptStatusInteractor.java +++ b/app/core/src/main/java/com/fsck/k9/message/AutocryptStatusInteractor.java @@ -5,10 +5,10 @@ import java.io.InputStream; import android.app.PendingIntent; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; -import android.support.annotation.WorkerThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.annotation.WorkerThread; import org.openintents.openpgp.OpenPgpError; import org.openintents.openpgp.util.OpenPgpApi; diff --git a/app/core/src/main/java/com/fsck/k9/message/PgpMessageBuilder.java b/app/core/src/main/java/com/fsck/k9/message/PgpMessageBuilder.java index 64d844c1f..4d5849839 100644 --- a/app/core/src/main/java/com/fsck/k9/message/PgpMessageBuilder.java +++ b/app/core/src/main/java/com/fsck/k9/message/PgpMessageBuilder.java @@ -9,9 +9,9 @@ import java.util.Arrays; import android.app.PendingIntent; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.CoreResourceProvider; import com.fsck.k9.DI; diff --git a/app/core/src/main/java/com/fsck/k9/message/SimpleMessageBuilder.java b/app/core/src/main/java/com/fsck/k9/message/SimpleMessageBuilder.java index 601efb799..f9d51c15e 100644 --- a/app/core/src/main/java/com/fsck/k9/message/SimpleMessageBuilder.java +++ b/app/core/src/main/java/com/fsck/k9/message/SimpleMessageBuilder.java @@ -2,7 +2,7 @@ package com.fsck.k9.message; import android.content.Intent; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.CoreResourceProvider; import com.fsck.k9.DI; diff --git a/app/core/src/main/java/com/fsck/k9/message/extractors/AttachmentInfoExtractor.java b/app/core/src/main/java/com/fsck/k9/message/extractors/AttachmentInfoExtractor.java index 316cee57d..3f47997ab 100644 --- a/app/core/src/main/java/com/fsck/k9/message/extractors/AttachmentInfoExtractor.java +++ b/app/core/src/main/java/com/fsck/k9/message/extractors/AttachmentInfoExtractor.java @@ -9,11 +9,11 @@ import java.util.Locale; import android.content.Context; import android.net.Uri; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import timber.log.Timber; -import android.support.annotation.WorkerThread; +import androidx.annotation.WorkerThread; import com.fsck.k9.mail.Body; import com.fsck.k9.mail.MessagingException; diff --git a/app/core/src/main/java/com/fsck/k9/message/extractors/MessageFulltextCreator.java b/app/core/src/main/java/com/fsck/k9/message/extractors/MessageFulltextCreator.java index c596477d7..7182f4eca 100644 --- a/app/core/src/main/java/com/fsck/k9/message/extractors/MessageFulltextCreator.java +++ b/app/core/src/main/java/com/fsck/k9/message/extractors/MessageFulltextCreator.java @@ -1,7 +1,7 @@ package com.fsck.k9.message.extractors; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.message.html.HtmlConverter; import com.fsck.k9.mail.Message; diff --git a/app/core/src/main/java/com/fsck/k9/message/extractors/MessagePreviewCreator.java b/app/core/src/main/java/com/fsck/k9/message/extractors/MessagePreviewCreator.java index 43cdcaacc..267a8fdea 100644 --- a/app/core/src/main/java/com/fsck/k9/message/extractors/MessagePreviewCreator.java +++ b/app/core/src/main/java/com/fsck/k9/message/extractors/MessagePreviewCreator.java @@ -1,7 +1,7 @@ package com.fsck.k9.message.extractors; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.mail.Message; import com.fsck.k9.mail.Part; diff --git a/app/core/src/main/java/com/fsck/k9/message/extractors/PreviewResult.java b/app/core/src/main/java/com/fsck/k9/message/extractors/PreviewResult.java index e557af8f4..72051ab8b 100644 --- a/app/core/src/main/java/com/fsck/k9/message/extractors/PreviewResult.java +++ b/app/core/src/main/java/com/fsck/k9/message/extractors/PreviewResult.java @@ -1,7 +1,7 @@ package com.fsck.k9.message.extractors; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; public class PreviewResult { diff --git a/app/core/src/main/java/com/fsck/k9/message/extractors/PreviewTextExtractor.java b/app/core/src/main/java/com/fsck/k9/message/extractors/PreviewTextExtractor.java index 7e51ab5ab..db96ca8e0 100644 --- a/app/core/src/main/java/com/fsck/k9/message/extractors/PreviewTextExtractor.java +++ b/app/core/src/main/java/com/fsck/k9/message/extractors/PreviewTextExtractor.java @@ -1,7 +1,7 @@ package com.fsck.k9.message.extractors; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.message.html.HtmlConverter; import com.fsck.k9.mail.Part; diff --git a/app/core/src/main/java/com/fsck/k9/message/extractors/TextPartFinder.java b/app/core/src/main/java/com/fsck/k9/message/extractors/TextPartFinder.java index 56548cd16..2168da54f 100644 --- a/app/core/src/main/java/com/fsck/k9/message/extractors/TextPartFinder.java +++ b/app/core/src/main/java/com/fsck/k9/message/extractors/TextPartFinder.java @@ -1,8 +1,8 @@ package com.fsck.k9.message.extractors; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.fsck.k9.mail.Body; import com.fsck.k9.mail.BodyPart; diff --git a/app/core/src/main/java/com/fsck/k9/message/signature/HtmlSignatureRemover.java b/app/core/src/main/java/com/fsck/k9/message/signature/HtmlSignatureRemover.java index 50a10f0d2..86e59ba96 100644 --- a/app/core/src/main/java/com/fsck/k9/message/signature/HtmlSignatureRemover.java +++ b/app/core/src/main/java/com/fsck/k9/message/signature/HtmlSignatureRemover.java @@ -3,7 +3,7 @@ package com.fsck.k9.message.signature; import java.util.regex.Pattern; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.helper.jsoup.AdvancedNodeTraversor; import com.fsck.k9.helper.jsoup.NodeFilter; diff --git a/app/core/src/main/java/com/fsck/k9/notification/AuthenticationErrorNotifications.java b/app/core/src/main/java/com/fsck/k9/notification/AuthenticationErrorNotifications.java index c7211130c..302199d4d 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/AuthenticationErrorNotifications.java +++ b/app/core/src/main/java/com/fsck/k9/notification/AuthenticationErrorNotifications.java @@ -2,9 +2,9 @@ package com.fsck.k9.notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.BigTextStyle; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.BigTextStyle; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; diff --git a/app/core/src/main/java/com/fsck/k9/notification/BaseNotifications.java b/app/core/src/main/java/com/fsck/k9/notification/BaseNotifications.java index 980665aef..5534372de 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/BaseNotifications.java +++ b/app/core/src/main/java/com/fsck/k9/notification/BaseNotifications.java @@ -3,9 +3,9 @@ package com.fsck.k9.notification; import android.app.PendingIntent; import android.content.Context; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.BigTextStyle; -import android.support.v4.app.NotificationCompat.Builder; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.BigTextStyle; +import androidx.core.app.NotificationCompat.Builder; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/core/src/main/java/com/fsck/k9/notification/CertificateErrorNotifications.java b/app/core/src/main/java/com/fsck/k9/notification/CertificateErrorNotifications.java index 40c4784b7..a8f4f865f 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/CertificateErrorNotifications.java +++ b/app/core/src/main/java/com/fsck/k9/notification/CertificateErrorNotifications.java @@ -2,8 +2,8 @@ package com.fsck.k9.notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; diff --git a/app/core/src/main/java/com/fsck/k9/notification/CoreKoinModule.kt b/app/core/src/main/java/com/fsck/k9/notification/CoreKoinModule.kt index 19b5a2bf8..60842853e 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/CoreKoinModule.kt +++ b/app/core/src/main/java/com/fsck/k9/notification/CoreKoinModule.kt @@ -2,7 +2,7 @@ package com.fsck.k9.notification import android.app.NotificationManager import android.content.Context -import android.support.v4.app.NotificationManagerCompat +import androidx.core.app.NotificationManagerCompat import com.fsck.k9.AccountPreferenceSerializer import com.fsck.k9.LocalKeyStoreManager import com.fsck.k9.mail.ssl.LocalKeyStore diff --git a/app/core/src/main/java/com/fsck/k9/notification/DeviceNotifications.java b/app/core/src/main/java/com/fsck/k9/notification/DeviceNotifications.java index f633dacca..d9b7af54b 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/DeviceNotifications.java +++ b/app/core/src/main/java/com/fsck/k9/notification/DeviceNotifications.java @@ -8,9 +8,9 @@ import android.app.KeyguardManager; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationCompat.InboxStyle; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationCompat.InboxStyle; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/core/src/main/java/com/fsck/k9/notification/LockScreenNotification.java b/app/core/src/main/java/com/fsck/k9/notification/LockScreenNotification.java index 30c6ed6b0..337435557 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/LockScreenNotification.java +++ b/app/core/src/main/java/com/fsck/k9/notification/LockScreenNotification.java @@ -6,8 +6,8 @@ import java.util.List; import java.util.Set; import android.app.Notification; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; import android.text.TextUtils; import com.fsck.k9.Account; diff --git a/app/core/src/main/java/com/fsck/k9/notification/NewMailNotifications.java b/app/core/src/main/java/com/fsck/k9/notification/NewMailNotifications.java index 23fd34616..8fc8ae5e2 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/NewMailNotifications.java +++ b/app/core/src/main/java/com/fsck/k9/notification/NewMailNotifications.java @@ -2,7 +2,7 @@ package com.fsck.k9.notification; import android.app.Notification; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationManagerCompat; import android.util.SparseArray; import com.fsck.k9.Account; diff --git a/app/core/src/main/java/com/fsck/k9/notification/NotificationChannelManager.kt b/app/core/src/main/java/com/fsck/k9/notification/NotificationChannelManager.kt index 7f78632c4..39d70c37e 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/NotificationChannelManager.kt +++ b/app/core/src/main/java/com/fsck/k9/notification/NotificationChannelManager.kt @@ -5,7 +5,7 @@ import android.app.NotificationChannel import android.app.NotificationChannelGroup import android.app.NotificationManager import android.os.Build -import android.support.annotation.RequiresApi +import androidx.annotation.RequiresApi import com.fsck.k9.Account import com.fsck.k9.Preferences import java.util.concurrent.Executor diff --git a/app/core/src/main/java/com/fsck/k9/notification/NotificationHelper.kt b/app/core/src/main/java/com/fsck/k9/notification/NotificationHelper.kt index d46014bec..9e0004dcb 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/NotificationHelper.kt +++ b/app/core/src/main/java/com/fsck/k9/notification/NotificationHelper.kt @@ -2,8 +2,8 @@ package com.fsck.k9.notification import android.content.Context import android.net.Uri -import android.support.v4.app.NotificationCompat -import android.support.v4.app.NotificationManagerCompat +import androidx.core.app.NotificationCompat +import androidx.core.app.NotificationManagerCompat import android.text.TextUtils import com.fsck.k9.Account import com.fsck.k9.K9 diff --git a/app/core/src/main/java/com/fsck/k9/notification/SendFailedNotifications.java b/app/core/src/main/java/com/fsck/k9/notification/SendFailedNotifications.java index c86255a68..660a50b9f 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/SendFailedNotifications.java +++ b/app/core/src/main/java/com/fsck/k9/notification/SendFailedNotifications.java @@ -2,8 +2,8 @@ package com.fsck.k9.notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; import com.fsck.k9.helper.ExceptionHelper; diff --git a/app/core/src/main/java/com/fsck/k9/notification/SyncNotifications.java b/app/core/src/main/java/com/fsck/k9/notification/SyncNotifications.java index 65027fc93..6a0ed7ae7 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/SyncNotifications.java +++ b/app/core/src/main/java/com/fsck/k9/notification/SyncNotifications.java @@ -2,8 +2,8 @@ package com.fsck.k9.notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; import com.fsck.k9.mail.Folder; diff --git a/app/core/src/main/java/com/fsck/k9/notification/WearNotifications.java b/app/core/src/main/java/com/fsck/k9/notification/WearNotifications.java index 09a3dcee6..5645f9007 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/WearNotifications.java +++ b/app/core/src/main/java/com/fsck/k9/notification/WearNotifications.java @@ -5,9 +5,9 @@ import java.util.ArrayList; import android.app.Notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationCompat.WearableExtender; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationCompat.WearableExtender; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/core/src/main/java/com/fsck/k9/power/DozeChecker.java b/app/core/src/main/java/com/fsck/k9/power/DozeChecker.java index 7953dbb13..9acb97bf0 100644 --- a/app/core/src/main/java/com/fsck/k9/power/DozeChecker.java +++ b/app/core/src/main/java/com/fsck/k9/power/DozeChecker.java @@ -4,7 +4,7 @@ package com.fsck.k9.power; import android.content.Context; import android.os.Build; import android.os.PowerManager; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; public class DozeChecker { diff --git a/app/core/src/main/java/com/fsck/k9/preferences/SettingsImporter.java b/app/core/src/main/java/com/fsck/k9/preferences/SettingsImporter.java index 253e98ee8..003ccda7e 100644 --- a/app/core/src/main/java/com/fsck/k9/preferences/SettingsImporter.java +++ b/app/core/src/main/java/com/fsck/k9/preferences/SettingsImporter.java @@ -14,7 +14,7 @@ import java.util.UUID; import android.content.Context; import android.content.SharedPreferences; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import android.text.TextUtils; import com.fsck.k9.Account; diff --git a/app/core/src/main/java/com/fsck/k9/preferences/StoragePersister.kt b/app/core/src/main/java/com/fsck/k9/preferences/StoragePersister.kt index 4b8987364..d112dfa3c 100644 --- a/app/core/src/main/java/com/fsck/k9/preferences/StoragePersister.kt +++ b/app/core/src/main/java/com/fsck/k9/preferences/StoragePersister.kt @@ -1,6 +1,6 @@ package com.fsck.k9.preferences -import android.support.annotation.CheckResult +import androidx.annotation.CheckResult interface StoragePersister { diff --git a/app/core/src/main/java/com/fsck/k9/provider/AttachmentProvider.java b/app/core/src/main/java/com/fsck/k9/provider/AttachmentProvider.java index 5ed8904c6..bee162ae0 100644 --- a/app/core/src/main/java/com/fsck/k9/provider/AttachmentProvider.java +++ b/app/core/src/main/java/com/fsck/k9/provider/AttachmentProvider.java @@ -11,8 +11,8 @@ import android.database.Cursor; import android.database.MatrixCursor; import android.net.Uri; import android.os.ParcelFileDescriptor; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.fsck.k9.DI; import com.fsck.k9.mailstore.LocalStoreProvider; diff --git a/app/core/src/main/java/com/fsck/k9/provider/AttachmentTempFileProvider.java b/app/core/src/main/java/com/fsck/k9/provider/AttachmentTempFileProvider.java index 809baccf4..ae55592dc 100644 --- a/app/core/src/main/java/com/fsck/k9/provider/AttachmentTempFileProvider.java +++ b/app/core/src/main/java/com/fsck/k9/provider/AttachmentTempFileProvider.java @@ -13,10 +13,10 @@ import android.content.Intent; import android.content.IntentFilter; import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.MainThread; -import android.support.annotation.NonNull; -import android.support.annotation.WorkerThread; -import android.support.v4.content.FileProvider; +import androidx.annotation.MainThread; +import androidx.annotation.NonNull; +import androidx.annotation.WorkerThread; +import androidx.core.content.FileProvider; import timber.log.Timber; import com.fsck.k9.K9; diff --git a/app/core/src/main/java/com/fsck/k9/provider/DecryptedFileProvider.java b/app/core/src/main/java/com/fsck/k9/provider/DecryptedFileProvider.java index 869fd8f4a..f4ce3b847 100644 --- a/app/core/src/main/java/com/fsck/k9/provider/DecryptedFileProvider.java +++ b/app/core/src/main/java/com/fsck/k9/provider/DecryptedFileProvider.java @@ -14,10 +14,10 @@ import android.content.IntentFilter; import android.net.Uri; import android.os.AsyncTask; import android.os.ParcelFileDescriptor; -import android.support.annotation.MainThread; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.FileProvider; +import androidx.annotation.MainThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.FileProvider; import android.text.TextUtils; import timber.log.Timber; diff --git a/app/core/src/main/java/com/fsck/k9/provider/EmailProvider.java b/app/core/src/main/java/com/fsck/k9/provider/EmailProvider.java index a5b8684a6..8956d0d5b 100644 --- a/app/core/src/main/java/com/fsck/k9/provider/EmailProvider.java +++ b/app/core/src/main/java/com/fsck/k9/provider/EmailProvider.java @@ -538,7 +538,7 @@ public class EmailProvider extends ContentProvider { } /** - * This class is needed to make {@link android.support.v4.widget.CursorAdapter} work with our database schema. + * This class is needed to make {@link androidx.cursoradapter.widget.CursorAdapter} work with our database schema. * *

* {@code CursorAdapter} requires a column named {@code "_id"} containing a stable id. We use diff --git a/app/core/src/main/java/com/fsck/k9/provider/RawMessageProvider.java b/app/core/src/main/java/com/fsck/k9/provider/RawMessageProvider.java index e2af6580e..a48faa816 100644 --- a/app/core/src/main/java/com/fsck/k9/provider/RawMessageProvider.java +++ b/app/core/src/main/java/com/fsck/k9/provider/RawMessageProvider.java @@ -14,8 +14,8 @@ import android.database.MatrixCursor; import android.net.Uri; import android.os.ParcelFileDescriptor; import android.provider.OpenableColumns; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.fsck.k9.Account; import com.fsck.k9.DI; 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 c44054a91..5aa195aaa 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 @@ -9,7 +9,7 @@ import android.content.Context; import android.content.Intent; import android.os.IBinder; import android.os.PowerManager; -import android.support.v4.content.LocalBroadcastManager; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import com.fsck.k9.Account; import com.fsck.k9.DI; diff --git a/app/core/src/test/java/com/fsck/k9/controller/UidReverseComparatorTest.java b/app/core/src/test/java/com/fsck/k9/controller/UidReverseComparatorTest.java index 120f0c851..fe0c218cc 100644 --- a/app/core/src/test/java/com/fsck/k9/controller/UidReverseComparatorTest.java +++ b/app/core/src/test/java/com/fsck/k9/controller/UidReverseComparatorTest.java @@ -1,7 +1,7 @@ package com.fsck.k9.controller; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.mail.Message; import org.junit.Before; 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 eaaf13d64..90fc856f7 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 @@ -11,7 +11,7 @@ import java.util.TimeZone; import android.app.Application; import android.content.res.Configuration; import android.content.res.Resources; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.DI; import com.fsck.k9.K9RobolectricTest; diff --git a/app/core/src/test/java/com/fsck/k9/message/extractors/AttachmentInfoExtractorTest.java b/app/core/src/test/java/com/fsck/k9/message/extractors/AttachmentInfoExtractorTest.java index f374c2144..3fa4896e3 100644 --- a/app/core/src/test/java/com/fsck/k9/message/extractors/AttachmentInfoExtractorTest.java +++ b/app/core/src/test/java/com/fsck/k9/message/extractors/AttachmentInfoExtractorTest.java @@ -3,7 +3,7 @@ package com.fsck.k9.message.extractors; import android.content.Context; import android.net.Uri; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.fsck.k9.RobolectricTest; import com.fsck.k9.mail.Part; diff --git a/app/core/src/test/java/com/fsck/k9/notification/AuthenticationErrorNotificationsTest.java b/app/core/src/test/java/com/fsck/k9/notification/AuthenticationErrorNotificationsTest.java index 7d0226dd4..558b6983f 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/AuthenticationErrorNotificationsTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/AuthenticationErrorNotificationsTest.java @@ -3,9 +3,9 @@ package com.fsck.k9.notification; import android.app.Notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; import com.fsck.k9.testing.MockHelper; diff --git a/app/core/src/test/java/com/fsck/k9/notification/BaseNotificationsTest.java b/app/core/src/test/java/com/fsck/k9/notification/BaseNotificationsTest.java index 62e97c5f1..59624902f 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/BaseNotificationsTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/BaseNotificationsTest.java @@ -1,8 +1,8 @@ package com.fsck.k9.notification; -import android.support.v4.app.NotificationCompat.BigTextStyle; -import android.support.v4.app.NotificationCompat.Builder; +import androidx.core.app.NotificationCompat.BigTextStyle; +import androidx.core.app.NotificationCompat.Builder; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationsTest.java b/app/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationsTest.java index 3ac8c9f8a..c739b9395 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationsTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationsTest.java @@ -3,9 +3,9 @@ package com.fsck.k9.notification; import android.app.Notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; import com.fsck.k9.testing.MockHelper; diff --git a/app/core/src/test/java/com/fsck/k9/notification/DeviceNotificationsTest.java b/app/core/src/test/java/com/fsck/k9/notification/DeviceNotificationsTest.java index 3a20306e3..f0f0fb185 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/DeviceNotificationsTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/DeviceNotificationsTest.java @@ -6,10 +6,10 @@ import java.util.List; import android.app.Application; import android.app.Notification; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.BigTextStyle; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationCompat.InboxStyle; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.BigTextStyle; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationCompat.InboxStyle; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/core/src/test/java/com/fsck/k9/notification/LockScreenNotificationTest.java b/app/core/src/test/java/com/fsck/k9/notification/LockScreenNotificationTest.java index 6eabd3d98..8de5dc4c6 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/LockScreenNotificationTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/LockScreenNotificationTest.java @@ -5,8 +5,8 @@ import java.util.Arrays; import android.app.Notification; import android.content.Context; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/core/src/test/java/com/fsck/k9/notification/NewMailNotificationsTest.java b/app/core/src/test/java/com/fsck/k9/notification/NewMailNotificationsTest.java index 91587c513..bc11417f8 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/NewMailNotificationsTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/NewMailNotificationsTest.java @@ -2,7 +2,7 @@ package com.fsck.k9.notification; import android.app.Notification; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/core/src/test/java/com/fsck/k9/notification/SendFailedNotificationsTest.java b/app/core/src/test/java/com/fsck/k9/notification/SendFailedNotificationsTest.java index c7e005ed9..5e6f617fc 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/SendFailedNotificationsTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/SendFailedNotificationsTest.java @@ -3,9 +3,9 @@ package com.fsck.k9.notification; import android.app.Notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; import com.fsck.k9.testing.MockHelper; diff --git a/app/core/src/test/java/com/fsck/k9/notification/SyncNotificationsTest.java b/app/core/src/test/java/com/fsck/k9/notification/SyncNotificationsTest.java index 32e559463..f5366a017 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/SyncNotificationsTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/SyncNotificationsTest.java @@ -3,9 +3,9 @@ package com.fsck.k9.notification; import android.app.Notification; import android.app.PendingIntent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationManagerCompat; import com.fsck.k9.Account; import com.fsck.k9.testing.MockHelper; diff --git a/app/core/src/test/java/com/fsck/k9/notification/WearNotificationsTest.java b/app/core/src/test/java/com/fsck/k9/notification/WearNotificationsTest.java index 5e4fba7c0..9fbfa84a8 100644 --- a/app/core/src/test/java/com/fsck/k9/notification/WearNotificationsTest.java +++ b/app/core/src/test/java/com/fsck/k9/notification/WearNotificationsTest.java @@ -4,10 +4,10 @@ package com.fsck.k9.notification; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; -import android.support.v4.app.NotificationCompat.Action; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationCompat.Extender; -import android.support.v4.app.NotificationCompat.WearableExtender; +import androidx.core.app.NotificationCompat.Action; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationCompat.Extender; +import androidx.core.app.NotificationCompat.WearableExtender; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/crypto-openpgp/src/main/java/com/fsck/k9/crypto/openpgp/EncryptionDetector.java b/app/crypto-openpgp/src/main/java/com/fsck/k9/crypto/openpgp/EncryptionDetector.java index 2e0ada8b0..3605b51ca 100644 --- a/app/crypto-openpgp/src/main/java/com/fsck/k9/crypto/openpgp/EncryptionDetector.java +++ b/app/crypto-openpgp/src/main/java/com/fsck/k9/crypto/openpgp/EncryptionDetector.java @@ -1,7 +1,7 @@ package com.fsck.k9.crypto.openpgp; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.crypto.MessageCryptoStructureDetector; import com.fsck.k9.mail.Body; diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle index 1708cc24e..18c205625 100644 --- a/app/k9mail/build.gradle +++ b/app/k9mail/build.gradle @@ -20,7 +20,7 @@ dependencies { implementation project(":backend:pop3") implementation project(":backend:webdav") - implementation "com.android.support:appcompat-v7:${versions.supportLibrary}" + implementation "androidx.appcompat:appcompat:${versions.androidxAppCompat}" implementation "com.jakewharton.timber:timber:${versions.timber}" testImplementation "org.robolectric:robolectric:${versions.robolectric}" @@ -31,7 +31,7 @@ dependencies { testImplementation "org.jdom:jdom2:2.0.6" testImplementation "org.koin:koin-test:${versions.koin}" - androidTestImplementation "com.android.support.test.espresso:espresso-core:3.0.1" + androidTestImplementation "androidx.test.espresso:espresso-core:3.1.1" } android { @@ -50,7 +50,7 @@ android { generatedDensities = ['mdpi', 'hdpi', 'xhdpi'] - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } signingConfigs { diff --git a/app/k9mail/proguard-rules.pro b/app/k9mail/proguard-rules.pro index 1da117b6e..477cc433b 100644 --- a/app/k9mail/proguard-rules.pro +++ b/app/k9mail/proguard-rules.pro @@ -23,6 +23,6 @@ -keep public class org.openintents.openpgp.** --keepclassmembers class * extends android.support.v7.widget.SearchView { - public (android.content.Context); +-keepclassmembers class * extends androidx.appcompat.widget.SearchView { + public (android.content.Context); } diff --git a/app/k9mail/src/androidTest/java/com/fsck/k9/external/MessageProviderTest.java b/app/k9mail/src/androidTest/java/com/fsck/k9/external/MessageProviderTest.java index 6b4527595..9351045c9 100644 --- a/app/k9mail/src/androidTest/java/com/fsck/k9/external/MessageProviderTest.java +++ b/app/k9mail/src/androidTest/java/com/fsck/k9/external/MessageProviderTest.java @@ -5,7 +5,7 @@ import java.util.List; import android.database.Cursor; import android.net.Uri; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.runner.AndroidJUnit4; import android.test.ProviderTestCase2; import android.test.mock.MockContentResolver; diff --git a/app/k9mail/src/androidTest/java/com/fsck/k9/helper/FileHelperTest.java b/app/k9mail/src/androidTest/java/com/fsck/k9/helper/FileHelperTest.java index 343126209..21012fdaf 100644 --- a/app/k9mail/src/androidTest/java/com/fsck/k9/helper/FileHelperTest.java +++ b/app/k9mail/src/androidTest/java/com/fsck/k9/helper/FileHelperTest.java @@ -1,6 +1,6 @@ package com.fsck.k9.helper; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/app/k9mail/src/androidTest/java/com/fsck/k9/provider/EmailProviderTest.java b/app/k9mail/src/androidTest/java/com/fsck/k9/provider/EmailProviderTest.java index 20664dcb6..33645a419 100644 --- a/app/k9mail/src/androidTest/java/com/fsck/k9/provider/EmailProviderTest.java +++ b/app/k9mail/src/androidTest/java/com/fsck/k9/provider/EmailProviderTest.java @@ -8,8 +8,8 @@ import java.util.GregorianCalendar; import android.database.Cursor; import android.database.SQLException; import android.net.Uri; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.InstrumentationRegistry; +import androidx.test.runner.AndroidJUnit4; import android.test.ProviderTestCase2; import com.fsck.k9.Account; diff --git a/app/k9mail/src/main/java/com/fsck/k9/directshare/K9ChooserTargetService.java b/app/k9mail/src/main/java/com/fsck/k9/directshare/K9ChooserTargetService.java index d73e86438..c74a5ec96 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/directshare/K9ChooserTargetService.java +++ b/app/k9mail/src/main/java/com/fsck/k9/directshare/K9ChooserTargetService.java @@ -15,8 +15,8 @@ import android.os.Build; import android.os.Bundle; import android.service.chooser.ChooserTarget; import android.service.chooser.ChooserTargetService; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.fsck.k9.activity.MessageCompose; import com.fsck.k9.activity.compose.RecipientLoader; diff --git a/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationActionCreator.java b/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationActionCreator.java index bf4a94015..e20cea251 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationActionCreator.java +++ b/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationActionCreator.java @@ -6,7 +6,7 @@ import java.util.List; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; -import android.support.v4.app.TaskStackBuilder; +import androidx.core.app.TaskStackBuilder; import android.text.TextUtils; import com.fsck.k9.Account; diff --git a/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListRemoteViewFactory.java b/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListRemoteViewFactory.java index 396c33d8e..342bf1952 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListRemoteViewFactory.java +++ b/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListRemoteViewFactory.java @@ -11,7 +11,7 @@ import android.database.Cursor; import android.graphics.Typeface; import android.net.Uri; import android.os.Binder; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.text.SpannableString; import android.text.style.StyleSpan; import android.view.View; diff --git a/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt b/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt index 8c8203fa2..37b333915 100644 --- a/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt +++ b/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt @@ -1,7 +1,7 @@ package com.fsck.k9 -import android.arch.lifecycle.Lifecycle -import android.arch.lifecycle.LifecycleOwner +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleOwner import com.fsck.k9.ui.endtoend.AutocryptKeyTransferActivity import com.nhaarman.mockito_kotlin.doReturn import com.nhaarman.mockito_kotlin.mock diff --git a/app/storage/src/main/java/com/fsck/k9/preferences/K9StoragePersister.java b/app/storage/src/main/java/com/fsck/k9/preferences/K9StoragePersister.java index 778834891..fcc1c1311 100644 --- a/app/storage/src/main/java/com/fsck/k9/preferences/K9StoragePersister.java +++ b/app/storage/src/main/java/com/fsck/k9/preferences/K9StoragePersister.java @@ -10,7 +10,7 @@ import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; import android.os.SystemClock; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.fsck.k9.helper.Utility; import com.fsck.k9.preferences.migrations.StorageMigrations; diff --git a/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo51.java b/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo51.java index 2ce5c9d62..404a1166f 100644 --- a/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo51.java +++ b/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo51.java @@ -12,9 +12,9 @@ import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import android.text.TextUtils; import com.fsck.k9.Account; diff --git a/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo60.java b/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo60.java index 91599d560..ed13487c5 100644 --- a/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo60.java +++ b/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo60.java @@ -11,7 +11,7 @@ import java.util.Map; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import com.fsck.k9.controller.MessagingControllerCommands.PendingAppend; import com.fsck.k9.controller.MessagingControllerCommands.PendingCommand; diff --git a/app/ui/build.gradle b/app/ui/build.gradle index 6a0219f9b..9f4142075 100644 --- a/app/ui/build.gradle +++ b/app/ui/build.gradle @@ -18,21 +18,21 @@ dependencies { 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 "androidx.appcompat:appcompat:${versions.androidxAppCompat}" + implementation "com.takisoft.preferencex:preferencex:${versions.preferencesFix}" + implementation "com.takisoft.preferencex:preferencex-datetimepicker:${versions.preferencesFix}" + implementation "com.takisoft.preferencex:preferencex-colorpicker:${versions.preferencesFix}" + implementation "com.takisoft.preferencex:preferencex-ringtone:${versions.preferencesFix}" + implementation "androidx.recyclerview:recyclerview:${versions.androidxRecyclerView}" + implementation "androidx.lifecycle:lifecycle-extensions:${versions.androidxLifecycleExtensions}" 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' + implementation "com.xwray:groupie:2.3.0" + implementation "com.xwray:groupie-kotlin-android-extensions:2.3.0" + implementation 'com.mikepenz:materialdrawer:6.1.1' implementation 'com.mikepenz:fontawesome-typeface:5.3.1.1@aar' implementation 'com.github.ByteHamster:SearchPreference:v1.1.4' diff --git a/app/ui/src/main/java/com/fsck/k9/account/AccountRemoverService.kt b/app/ui/src/main/java/com/fsck/k9/account/AccountRemoverService.kt index c97a9550b..edb88f846 100644 --- a/app/ui/src/main/java/com/fsck/k9/account/AccountRemoverService.kt +++ b/app/ui/src/main/java/com/fsck/k9/account/AccountRemoverService.kt @@ -2,7 +2,7 @@ package com.fsck.k9.account import android.content.Context import android.content.Intent -import android.support.v4.app.JobIntentService +import androidx.core.app.JobIntentService import org.koin.standalone.KoinComponent import org.koin.standalone.inject diff --git a/app/ui/src/main/java/com/fsck/k9/activity/Accounts.java b/app/ui/src/main/java/com/fsck/k9/activity/Accounts.java index cb0b75ae0..a69990591 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/Accounts.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/Accounts.java @@ -27,7 +27,7 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Handler; -import android.support.v7.app.ActionBar; +import androidx.appcompat.app.ActionBar; import android.text.Editable; import android.text.TextWatcher; import android.util.SparseBooleanArray; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java b/app/ui/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java index 21c3c529b..45d2852af 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/AlternateRecipientAdapter.java @@ -8,8 +8,8 @@ import android.content.res.Resources; import android.graphics.PorterDuff.Mode; import android.graphics.Typeface; import android.graphics.drawable.Drawable; -import android.support.annotation.AttrRes; -import android.support.annotation.DrawableRes; +import androidx.annotation.AttrRes; +import androidx.annotation.DrawableRes; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/AppCompatPreferenceActivity.java b/app/ui/src/main/java/com/fsck/k9/activity/AppCompatPreferenceActivity.java index 7a9ca092f..ed1ad3e82 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/AppCompatPreferenceActivity.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/AppCompatPreferenceActivity.java @@ -18,11 +18,11 @@ package com.fsck.k9.activity; import android.content.res.Configuration; import android.os.Bundle; import android.preference.PreferenceActivity; -import android.support.annotation.LayoutRes; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatDelegate; -import android.support.v7.widget.Toolbar; +import androidx.annotation.LayoutRes; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.appcompat.widget.Toolbar; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/FolderList.java b/app/ui/src/main/java/com/fsck/k9/activity/FolderList.java index cee656e68..bc2f323b5 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/FolderList.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/FolderList.java @@ -7,7 +7,7 @@ import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.PowerManager; -import android.support.v7.app.ActionBar; +import androidx.appcompat.app.ActionBar; import android.text.TextUtils.TruncateAt; import android.text.format.DateUtils; import android.view.ContextMenu; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/K9Activity.java b/app/ui/src/main/java/com/fsck/k9/activity/K9Activity.java index fd76b7246..ef982c176 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/K9Activity.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/K9Activity.java @@ -4,12 +4,12 @@ package com.fsck.k9.activity; import android.Manifest; import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.annotation.LayoutRes; -import android.support.annotation.StringRes; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.LayoutRes; +import androidx.annotation.StringRes; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.MotionEvent; import android.view.View; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java b/app/ui/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java index cd23421e1..dcba30767 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java @@ -1,13 +1,13 @@ package com.fsck.k9.activity; -import android.arch.lifecycle.Lifecycle; -import android.arch.lifecycle.Lifecycle.State; -import android.arch.lifecycle.LifecycleOwner; -import android.arch.lifecycle.LifecycleRegistry; +import androidx.lifecycle.Lifecycle; +import androidx.lifecycle.Lifecycle.State; +import androidx.lifecycle.LifecycleOwner; +import androidx.lifecycle.LifecycleRegistry; import android.os.Bundle; import android.preference.ListPreference; import android.preference.Preference; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.MenuItem; import com.fsck.k9.K9; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/MessageCompose.java b/app/ui/src/main/java/com/fsck/k9/activity/MessageCompose.java index eb717f72a..a9b193b62 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/MessageCompose.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/MessageCompose.java @@ -24,9 +24,9 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.os.Parcelable; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v7.app.ActionBar; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.appcompat.app.ActionBar; import android.text.TextUtils; import android.text.TextWatcher; import android.util.TypedValue; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/MessageList.java b/app/ui/src/main/java/com/fsck/k9/activity/MessageList.java index b74e00f17..2fef14450 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/MessageList.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/MessageList.java @@ -15,12 +15,12 @@ import android.content.res.TypedArray; import android.net.Uri; import android.os.Bundle; import android.os.Parcelable; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentManager.OnBackStackChangedListener; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.ActionBar; -import android.support.v7.app.ActionBarDrawerToggle; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentManager.OnBackStackChangedListener; +import androidx.fragment.app.FragmentTransaction; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.ActionBarDrawerToggle; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.Menu; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java b/app/ui/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java index c940a482c..b7fcf8074 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java @@ -8,13 +8,13 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.LoaderManager; -import android.support.v4.app.LoaderManager.LoaderCallbacks; -import android.support.v4.content.Loader; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; +import androidx.fragment.app.FragmentManager; +import androidx.loader.app.LoaderManager; +import androidx.loader.app.LoaderManager.LoaderCallbacks; +import androidx.loader.content.Loader; import com.fsck.k9.Account; import com.fsck.k9.Preferences; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java b/app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java index 2815f1a72..f6bfb2f0f 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java @@ -10,7 +10,7 @@ import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.fsck.k9.Account; import com.fsck.k9.K9; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java b/app/ui/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java index e90c770c8..5514e0ac4 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/UpgradeDatabases.java @@ -8,7 +8,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Bundle; -import android.support.v4.content.LocalBroadcastManager; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import android.widget.TextView; import com.fsck.k9.Account; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java index caa423530..59b27ce9e 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java @@ -12,8 +12,8 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Handler; -import android.support.v4.app.LoaderManager; -import android.support.v4.content.Loader; +import androidx.loader.app.LoaderManager; +import androidx.loader.content.Loader; import com.fsck.k9.activity.compose.ComposeCryptoStatus.AttachErrorState; import com.fsck.k9.activity.loader.AttachmentContentLoader; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java index 7ffc339f8..431e9ca61 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEnabledErrorDialog.java @@ -8,7 +8,7 @@ import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; -import android.support.annotation.IdRes; +import androidx.annotation.IdRes; import android.view.LayoutInflater; import android.view.View; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java index cef9c0b8a..2858226bb 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpEncryptDescriptionDialog.java @@ -8,7 +8,7 @@ import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; -import android.support.annotation.IdRes; +import androidx.annotation.IdRes; import android.view.LayoutInflater; import android.view.View; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java index ee2eab84f..9d391d1d4 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpInlineDialog.java @@ -8,7 +8,7 @@ import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; -import android.support.annotation.IdRes; +import androidx.annotation.IdRes; import android.view.LayoutInflater; import android.view.View; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java index e0a9637c3..58b8a4855 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/PgpSignOnlyDialog.java @@ -8,7 +8,7 @@ import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; -import android.support.annotation.IdRes; +import androidx.annotation.IdRes; import android.view.LayoutInflater; import android.view.View; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java index 04fe6a40d..f033c9d81 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientAdapter.java @@ -7,8 +7,8 @@ import java.util.regex.Pattern; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; import android.text.Spannable; import android.text.style.ForegroundColorSpan; import android.view.LayoutInflater; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java index be5f77017..4ce1425c2 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java @@ -18,10 +18,10 @@ import android.provider.ContactsContract; import android.provider.ContactsContract.CommonDataKinds.Email; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Contacts.Data; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.AsyncTaskLoader; -import android.support.v4.content.ContextCompat; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.loader.content.AsyncTaskLoader; +import androidx.core.content.ContextCompat; import com.fsck.k9.helper.EmptyCursor; import com.fsck.k9.ui.R; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java index 6971dafa0..6f7f333f5 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java @@ -5,9 +5,9 @@ import java.util.Arrays; import java.util.List; import android.app.PendingIntent; -import android.support.v4.app.LoaderManager; -import android.support.v4.view.animation.FastOutLinearInInterpolator; -import android.support.v4.view.animation.LinearOutSlowInInterpolator; +import androidx.loader.app.LoaderManager; +import androidx.interpolator.view.animation.FastOutLinearInInterpolator; +import androidx.interpolator.view.animation.LinearOutSlowInInterpolator; import android.text.TextWatcher; import android.view.View; import android.view.View.OnClickListener; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java index b7e8ba555..beec0c8ea 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java @@ -15,8 +15,8 @@ import android.content.pm.ResolveInfo; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.LoaderManager; +import androidx.annotation.Nullable; +import androidx.loader.app.LoaderManager; import android.view.Menu; import com.fsck.k9.Account; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java b/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java index 7c525c6d1..67d762d36 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java @@ -7,7 +7,7 @@ import java.io.IOException; import java.io.InputStream; import android.content.Context; -import android.support.v4.content.AsyncTaskLoader; +import androidx.loader.content.AsyncTaskLoader; import com.fsck.k9.activity.misc.Attachment; import com.fsck.k9.message.Attachment.LoadingState; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java b/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java index b6a6d091b..16019086e 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/loader/AttachmentInfoLoader.java @@ -7,7 +7,7 @@ import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.provider.OpenableColumns; -import android.support.v4.content.AsyncTaskLoader; +import androidx.loader.content.AsyncTaskLoader; import com.fsck.k9.message.Attachment.LoadingState; import timber.log.Timber; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java index a294a0d20..f0df16556 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java @@ -19,8 +19,8 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentTransaction; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentTransaction; import android.view.View; import android.view.View.OnClickListener; import android.widget.ProgressBar; diff --git a/app/ui/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java b/app/ui/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java index f6c173d12..605672a5b 100644 --- a/app/ui/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java +++ b/app/ui/src/main/java/com/fsck/k9/activity/setup/SliderPreference.java @@ -30,7 +30,7 @@ import android.content.res.TypedArray; import android.os.Bundle; import android.os.Parcelable; import android.preference.DialogPreference; -import android.support.annotation.ArrayRes; +import androidx.annotation.ArrayRes; import android.util.AttributeSet; import android.view.View; import android.widget.SeekBar; diff --git a/app/ui/src/main/java/com/fsck/k9/contacts/ContactPictureLoader.kt b/app/ui/src/main/java/com/fsck/k9/contacts/ContactPictureLoader.kt index e50ff8364..cc72978b7 100644 --- a/app/ui/src/main/java/com/fsck/k9/contacts/ContactPictureLoader.kt +++ b/app/ui/src/main/java/com/fsck/k9/contacts/ContactPictureLoader.kt @@ -5,7 +5,7 @@ import android.content.Context import android.graphics.Bitmap import android.graphics.Bitmap.CompressFormat import android.net.Uri -import android.support.annotation.WorkerThread +import androidx.annotation.WorkerThread import android.widget.ImageView import com.bumptech.glide.Glide import com.bumptech.glide.Priority diff --git a/app/ui/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java b/app/ui/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java index 34e839d19..3b1ac1508 100644 --- a/app/ui/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/fragment/AttachmentDownloadDialogFragment.java @@ -6,7 +6,7 @@ import android.app.Dialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v4.app.DialogFragment; +import androidx.fragment.app.DialogFragment; import com.fsck.k9.controller.MessagingController; import com.fsck.k9.controller.MessagingListener; diff --git a/app/ui/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java b/app/ui/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java index 5f6536e3d..fc9387be5 100644 --- a/app/ui/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/fragment/ConfirmationDialogFragment.java @@ -7,7 +7,7 @@ import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; -import android.support.v4.app.DialogFragment; +import androidx.fragment.app.DialogFragment; import timber.log.Timber; diff --git a/app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragment.java b/app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragment.java index c08ddecaf..67259f371 100644 --- a/app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/fragment/MessageListFragment.java @@ -23,16 +23,16 @@ import android.graphics.Rect; import android.net.Uri; import android.os.Bundle; import android.os.Parcelable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.LoaderManager; -import android.support.v4.app.LoaderManager.LoaderCallbacks; -import android.support.v4.content.CursorLoader; -import android.support.v4.content.Loader; -import android.support.v4.content.LocalBroadcastManager; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.view.ActionMode; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.loader.app.LoaderManager; +import androidx.loader.app.LoaderManager.LoaderCallbacks; +import androidx.loader.content.CursorLoader; +import androidx.loader.content.Loader; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.view.ActionMode; import android.text.TextUtils; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; diff --git a/app/ui/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java b/app/ui/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java index a8fb460e3..80b5a27db 100644 --- a/app/ui/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/fragment/ProgressDialogFragment.java @@ -5,7 +5,7 @@ import android.app.Dialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v4.app.DialogFragment; +import androidx.fragment.app.DialogFragment; public class ProgressDialogFragment extends DialogFragment { diff --git a/app/ui/src/main/java/com/fsck/k9/ui/FragmentExtras.kt b/app/ui/src/main/java/com/fsck/k9/ui/FragmentExtras.kt index 33acb6242..14563f4f2 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/FragmentExtras.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/FragmentExtras.kt @@ -1,8 +1,8 @@ package com.fsck.k9.ui -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentActivity -import android.support.v4.app.FragmentTransaction +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentActivity +import androidx.fragment.app.FragmentTransaction import androidx.core.os.bundleOf inline fun FragmentActivity.fragmentTransaction(crossinline block: FragmentTransaction.() -> Unit) { diff --git a/app/ui/src/main/java/com/fsck/k9/ui/K9Drawer.java b/app/ui/src/main/java/com/fsck/k9/ui/K9Drawer.java index f32033f11..380f11bbb 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/K9Drawer.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/K9Drawer.java @@ -1,15 +1,15 @@ package com.fsck.k9.ui; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProvider; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProvider; +import androidx.lifecycle.ViewModelProviders; import android.graphics.Color; import android.graphics.PorterDuff; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.widget.DrawerLayout; +import androidx.annotation.Nullable; +import androidx.drawerlayout.widget.DrawerLayout; import android.util.TypedValue; import android.view.View; import com.fsck.k9.Account; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt b/app/ui/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt index dd2d3b199..9f1cbbb8e 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/LiveDataExtras.kt @@ -1,8 +1,8 @@ package com.fsck.k9.ui -import android.arch.lifecycle.LifecycleOwner -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.Observer +import androidx.lifecycle.LifecycleOwner +import androidx.lifecycle.LiveData +import androidx.lifecycle.Observer fun LiveData.observeNotNull(owner: LifecycleOwner, observer: (T) -> Unit) { this.observe(owner, Observer { observer(it!!) }) diff --git a/app/ui/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt b/app/ui/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt index b0a4a7870..2a4ef5612 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/account/AccountsLiveData.kt @@ -1,6 +1,6 @@ package com.fsck.k9.ui.account -import android.arch.lifecycle.LiveData +import androidx.lifecycle.LiveData import com.fsck.k9.Account import com.fsck.k9.AccountsChangeListener import com.fsck.k9.Preferences diff --git a/app/ui/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java b/app/ui/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java index 4586121f3..4398ead62 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java @@ -13,9 +13,9 @@ import android.app.Activity; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.WorkerThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.WorkerThread; import com.fsck.k9.autocrypt.AutocryptOperations; import com.fsck.k9.crypto.MessageCryptoStructureDetector; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt index 3942c89b7..6c837730e 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferPresenter.kt @@ -2,8 +2,8 @@ package com.fsck.k9.ui.endtoend import android.app.PendingIntent -import android.arch.lifecycle.LifecycleOwner -import android.arch.lifecycle.Observer +import androidx.lifecycle.LifecycleOwner +import androidx.lifecycle.Observer import com.fsck.k9.Account import com.fsck.k9.Preferences import kotlinx.coroutines.experimental.android.UI diff --git a/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt index 14232a1ce..4616358bb 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/endtoend/AutocryptKeyTransferViewModel.kt @@ -1,6 +1,6 @@ package com.fsck.k9.ui.endtoend -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel internal class AutocryptKeyTransferViewModel( val autocryptSetupMessageLiveEvent: AutocryptSetupMessageLiveEvent, diff --git a/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java b/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java index 9def35609..c9d5e4d07 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java @@ -2,9 +2,9 @@ package com.fsck.k9.ui.message; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.annotation.WorkerThread; -import android.support.v4.content.AsyncTaskLoader; +import androidx.annotation.Nullable; +import androidx.annotation.WorkerThread; +import androidx.loader.content.AsyncTaskLoader; import com.fsck.k9.DI; import timber.log.Timber; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java b/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java index 66895f969..e9e852b29 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/message/LocalMessageLoader.java @@ -2,7 +2,7 @@ package com.fsck.k9.ui.message; import android.content.Context; -import android.support.v4.content.AsyncTaskLoader; +import androidx.loader.content.AsyncTaskLoader; import timber.log.Timber; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt b/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt index 7e55ac351..e3d067a6d 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModel.kt @@ -1,8 +1,8 @@ package com.fsck.k9.ui.messagelist -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MutableLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.LiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel import com.fsck.k9.Account import com.fsck.k9.mailstore.Folder import com.fsck.k9.mailstore.FolderRepositoryManager diff --git a/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt b/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt index 5664bb2f6..efe98adfe 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/messagelist/MessageListViewModelFactory.kt @@ -1,7 +1,7 @@ package com.fsck.k9.ui.messagelist -import android.arch.lifecycle.ViewModel -import android.arch.lifecycle.ViewModelProvider +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelProvider import com.fsck.k9.mailstore.FolderRepositoryManager import org.koin.standalone.KoinComponent import org.koin.standalone.inject diff --git a/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java index ff3ce8a2c..9ff98e560 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/AttachmentController.java @@ -14,7 +14,7 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.WorkerThread; +import androidx.annotation.WorkerThread; import android.widget.Toast; import com.fsck.k9.Account; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java index 7c12023e1..45811c092 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/CryptoInfoDialog.java @@ -8,12 +8,12 @@ import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorInt; -import android.support.annotation.DrawableRes; -import android.support.annotation.StringRes; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; +import androidx.annotation.AttrRes; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; +import androidx.annotation.StringRes; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java index f718b02fa..6a192e5ea 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoPresenter.java @@ -9,7 +9,7 @@ import android.content.IntentSender; import android.content.pm.PackageManager.NameNotFoundException; import android.graphics.drawable.Drawable; import android.os.Parcelable; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.text.TextUtils; import com.fsck.k9.Account; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java index 6bbafd286..7b185dced 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java @@ -8,8 +8,8 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.v7.widget.PopupMenu.OnMenuItemClickListener; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.PopupMenu.OnMenuItemClickListener; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java index 36be4eea0..f19e33f80 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.java @@ -14,10 +14,10 @@ import android.os.Bundle; import android.os.Handler; import android.os.Parcelable; import android.os.SystemClock; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.widget.PopupMenu.OnMenuItemClickListener; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.appcompat.widget.PopupMenu.OnMenuItemClickListener; import android.text.TextUtils; import android.view.ContextThemeWrapper; import android.view.KeyEvent; diff --git a/app/ui/src/main/java/com/fsck/k9/ui/permissions/PermissionRationaleDialogFragment.kt b/app/ui/src/main/java/com/fsck/k9/ui/permissions/PermissionRationaleDialogFragment.kt index 6dc5e4ac9..14373c3df 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/permissions/PermissionRationaleDialogFragment.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/permissions/PermissionRationaleDialogFragment.kt @@ -3,7 +3,7 @@ package com.fsck.k9.ui.permissions import android.app.AlertDialog import android.app.Dialog import android.os.Bundle -import android.support.v4.app.DialogFragment +import androidx.fragment.app.DialogFragment import androidx.core.os.bundleOf import com.fsck.k9.activity.K9Activity import com.fsck.k9.activity.K9Activity.Permission diff --git a/app/ui/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt index 8884b067d..89b74568d 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/AboutActivity.kt @@ -7,9 +7,9 @@ import android.content.Intent import android.content.pm.PackageManager import android.net.Uri import android.os.Bundle -import android.support.v4.app.Fragment -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView +import androidx.fragment.app.Fragment +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.Menu import android.view.MenuItem diff --git a/app/ui/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt index 7cd8b432d..ff2c23e4d 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/PreferenceExtras.kt @@ -1,8 +1,8 @@ package com.fsck.k9.ui.settings -import android.support.v14.preference.MultiSelectListPreference -import android.support.v7.preference.ListPreference -import android.support.v7.preference.Preference +import androidx.preference.MultiSelectListPreference +import androidx.preference.ListPreference +import androidx.preference.Preference inline fun Preference.onClick(crossinline action: () -> Unit) = setOnPreferenceClickListener { diff --git a/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt index bac62ecef..157098ef6 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt @@ -3,7 +3,7 @@ package com.fsck.k9.ui.settings import android.app.Activity import android.content.Intent import android.os.Bundle -import android.support.v7.widget.LinearLayoutManager +import androidx.recyclerview.widget.LinearLayoutManager import android.view.MenuItem import com.fsck.k9.Account import com.fsck.k9.activity.K9Activity diff --git a/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt index c05b435a9..d42173ecd 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt @@ -1,6 +1,6 @@ package com.fsck.k9.ui.settings -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.fsck.k9.ui.account.AccountsLiveData internal class SettingsViewModel(val accounts: AccountsLiveData) : ViewModel() diff --git a/app/ui/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 index 2dced0154..c7732a087 100644 --- a/app/ui/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 @@ -3,9 +3,9 @@ package com.fsck.k9.ui.settings.account import android.content.Context import android.content.Intent import android.os.Bundle -import android.support.v7.preference.PreferenceFragmentCompat -import android.support.v7.preference.PreferenceFragmentCompat.OnPreferenceStartScreenCallback -import android.support.v7.preference.PreferenceScreen +import androidx.preference.PreferenceFragmentCompat +import androidx.preference.PreferenceFragmentCompat.OnPreferenceStartScreenCallback +import androidx.preference.PreferenceScreen import android.view.MenuItem import android.view.View import android.widget.AdapterView diff --git a/app/ui/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 index 23e9504af..9f35fc469 100644 --- a/app/ui/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 @@ -1,6 +1,6 @@ package com.fsck.k9.ui.settings.account -import android.support.v7.preference.PreferenceDataStore +import androidx.preference.PreferenceDataStore import com.fsck.k9.Account import com.fsck.k9.Account.SpecialFolderSelection import com.fsck.k9.Preferences diff --git a/app/ui/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 index b03e4fdcc..33ad2c43f 100644 --- a/app/ui/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 @@ -3,8 +3,8 @@ package com.fsck.k9.ui.settings.account import android.content.Intent import android.os.Build import android.os.Bundle -import android.support.v14.preference.SwitchPreference -import android.support.v7.preference.ListPreference +import androidx.preference.SwitchPreference +import androidx.preference.ListPreference import android.view.Menu import android.view.MenuInflater import android.view.MenuItem @@ -30,7 +30,7 @@ import com.fsck.k9.ui.settings.oneTimeClickListener import com.fsck.k9.ui.settings.remove import com.fsck.k9.ui.settings.removeEntry import com.fsck.k9.ui.withArguments -import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat +import com.takisoft.preferencex.PreferenceFragmentCompat import com.fsck.k9.ui.observe import org.koin.android.architecture.ext.sharedViewModel import org.koin.android.ext.android.inject diff --git a/app/ui/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 index aff5fc83d..57beb6f7f 100644 --- a/app/ui/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 @@ -1,8 +1,8 @@ package com.fsck.k9.ui.settings.account -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MutableLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.LiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel import com.fsck.k9.Account import com.fsck.k9.Preferences import com.fsck.k9.mailstore.FolderRepositoryManager diff --git a/app/ui/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 index 20160aefb..2095918a6 100644 --- a/app/ui/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 @@ -3,9 +3,9 @@ package com.fsck.k9.ui.settings.account import android.annotation.SuppressLint import android.app.Dialog import android.os.Bundle -import android.support.v4.app.DialogFragment -import android.support.v7.app.AlertDialog -import android.support.v7.preference.DialogPreference +import androidx.fragment.app.DialogFragment +import androidx.appcompat.app.AlertDialog +import androidx.preference.DialogPreference import android.text.method.LinkMovementMethod import android.view.LayoutInflater import android.view.View diff --git a/app/ui/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 index 3f84e8368..5bf846013 100644 --- a/app/ui/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 @@ -2,12 +2,12 @@ package com.fsck.k9.ui.settings.account import android.annotation.SuppressLint import android.content.Context -import android.support.v4.content.res.TypedArrayUtils -import android.support.v7.preference.PreferenceViewHolder -import android.support.v7.preference.TwoStatePreference +import androidx.core.content.res.TypedArrayUtils +import androidx.preference.PreferenceViewHolder +import androidx.preference.TwoStatePreference import android.util.AttributeSet import com.fsck.k9.ui.R -import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat +import com.takisoft.preferencex.PreferenceFragmentCompat @SuppressLint("RestrictedApi") class AutocryptPreferEncryptPreference @@ -15,7 +15,7 @@ class AutocryptPreferEncryptPreference constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = TypedArrayUtils.getAttr(context, android.support.v7.preference.R.attr.preferenceStyle, + defStyleAttr: Int = TypedArrayUtils.getAttr(context, androidx.preference.R.attr.preferenceStyle, android.R.attr.preferenceStyle), defStyleRes: Int = 0 ) : TwoStatePreference(context, attrs, defStyleAttr, defStyleRes) { diff --git a/app/ui/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 index 211f9522e..b8ae69a27 100644 --- a/app/ui/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 @@ -3,8 +3,8 @@ package com.fsck.k9.ui.settings.account import android.annotation.SuppressLint import android.content.Context import android.graphics.Typeface -import android.support.v4.content.res.TypedArrayUtils -import android.support.v7.preference.ListPreference +import androidx.core.content.res.TypedArrayUtils +import androidx.preference.ListPreference import android.text.SpannableString import android.text.style.StyleSpan import android.util.AttributeSet @@ -23,7 +23,7 @@ class FolderListPreference constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = TypedArrayUtils.getAttr(context, android.support.v7.preference.R.attr.dialogPreferenceStyle, + defStyleAttr: Int = TypedArrayUtils.getAttr(context, androidx.preference.R.attr.dialogPreferenceStyle, android.R.attr.dialogPreferenceStyle), defStyleRes: Int = 0 ) : ListPreference(context, attrs, defStyleAttr, defStyleRes), KoinComponent { diff --git a/app/ui/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 index 9a3090b4e..1d8b2c4cb 100644 --- a/app/ui/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 @@ -3,8 +3,8 @@ package com.fsck.k9.ui.settings.account import android.annotation.SuppressLint import android.app.Dialog import android.os.Bundle -import android.support.v7.app.AlertDialog -import android.support.v7.preference.PreferenceDialogFragmentCompat +import androidx.appcompat.app.AlertDialog +import androidx.preference.PreferenceDialogFragmentCompat import android.view.LayoutInflater import com.fsck.k9.ui.R import com.larswerkman.colorpicker.ColorPicker diff --git a/app/ui/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 index b87c27e2a..e968ffede 100644 --- a/app/ui/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 @@ -2,10 +2,10 @@ package com.fsck.k9.ui.settings.account import android.annotation.SuppressLint import android.content.Context -import android.support.v4.content.res.TypedArrayUtils +import androidx.core.content.res.TypedArrayUtils import android.util.AttributeSet -import com.takisoft.fix.support.v7.preference.ColorPickerPreference -import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat +import com.takisoft.preferencex.ColorPickerPreference +import com.takisoft.preferencex.PreferenceFragmentCompat @SuppressLint("RestrictedApi") class HoloColorPickerPreference @@ -13,7 +13,7 @@ class HoloColorPickerPreference constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = TypedArrayUtils.getAttr(context, android.support.v7.preference.R.attr.dialogPreferenceStyle, + defStyleAttr: Int = TypedArrayUtils.getAttr(context, androidx.preference.R.attr.dialogPreferenceStyle, android.R.attr.dialogPreferenceStyle), defStyleRes: Int = 0 ) : ColorPickerPreference(context, attrs, defStyleAttr, defStyleRes) { diff --git a/app/ui/src/main/java/com/fsck/k9/ui/settings/account/NotificationsPreference.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/NotificationsPreference.kt index 18f6dd525..327e69ac0 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/settings/account/NotificationsPreference.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/NotificationsPreference.kt @@ -4,12 +4,12 @@ import android.annotation.SuppressLint import android.content.Context import android.content.Intent import android.provider.Settings -import android.support.v4.app.DialogFragment -import android.support.v4.content.ContextCompat.startActivity -import android.support.v4.content.res.TypedArrayUtils -import android.support.v7.preference.Preference +import androidx.fragment.app.DialogFragment +import androidx.core.content.ContextCompat.startActivity +import androidx.core.content.res.TypedArrayUtils +import androidx.preference.Preference import android.util.AttributeSet -import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat +import com.takisoft.preferencex.PreferenceFragmentCompat @SuppressLint("RestrictedApi") class NotificationsPreference @@ -17,7 +17,7 @@ class NotificationsPreference constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = TypedArrayUtils.getAttr(context, android.support.v7.preference.R.attr.preferenceStyle, + defStyleAttr: Int = TypedArrayUtils.getAttr(context, androidx.preference.R.attr.preferenceStyle, android.R.attr.preferenceStyle), defStyleRes: Int = 0 ) : Preference(context, attrs, defStyleAttr, defStyleRes) { diff --git a/app/ui/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 index 658359bd5..d3f59814d 100644 --- a/app/ui/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 @@ -15,9 +15,9 @@ import android.content.pm.ResolveInfo; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/ui/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 index c797f3dbc..b1000c69b 100644 --- a/app/ui/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 @@ -4,9 +4,9 @@ import android.content.Context import android.content.Intent import android.os.Bundle import android.os.Handler -import android.support.v7.preference.PreferenceFragmentCompat -import android.support.v7.preference.PreferenceFragmentCompat.OnPreferenceStartScreenCallback -import android.support.v7.preference.PreferenceScreen +import androidx.preference.PreferenceFragmentCompat +import androidx.preference.PreferenceFragmentCompat.OnPreferenceStartScreenCallback +import androidx.preference.PreferenceScreen import android.view.Menu import android.view.MenuItem import com.bytehamster.lib.preferencesearch.SearchPreferenceActionView diff --git a/app/ui/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 index dd242b2e1..180de373d 100644 --- a/app/ui/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 @@ -1,7 +1,7 @@ package com.fsck.k9.ui.settings.general -import android.support.v4.app.FragmentActivity -import android.support.v7.preference.PreferenceDataStore +import androidx.fragment.app.FragmentActivity +import androidx.preference.PreferenceDataStore import com.fsck.k9.K9 import com.fsck.k9.K9.Theme import com.fsck.k9.Preferences diff --git a/app/ui/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 index 31e291341..07fc1d0ca 100644 --- a/app/ui/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 com.fsck.k9.ui.R import com.fsck.k9.notification.NotificationController import com.fsck.k9.ui.settings.remove import com.fsck.k9.ui.withArguments -import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat +import com.takisoft.preferencex.PreferenceFragmentCompat import org.koin.android.ext.android.inject class GeneralSettingsFragment : PreferenceFragmentCompat() { diff --git a/app/ui/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 index bd972621b..3d784aaaf 100644 --- a/app/ui/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 @@ -3,8 +3,8 @@ package com.fsck.k9.ui.settings.general import android.annotation.SuppressLint import android.content.Context -import android.support.v4.content.res.TypedArrayUtils -import android.support.v7.preference.ListPreference +import androidx.core.content.res.TypedArrayUtils +import androidx.preference.ListPreference import android.util.AttributeSet import com.fsck.k9.ui.R @@ -16,7 +16,7 @@ constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = TypedArrayUtils.getAttr(context, - android.support.v7.preference.R.attr.dialogPreferenceStyle, + androidx.preference.R.attr.dialogPreferenceStyle, android.R.attr.dialogPreferenceStyle), defStyleRes: Int = 0 ) : ListPreference(context, attrs, defStyleAttr, defStyleRes ) { diff --git a/app/ui/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java b/app/ui/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java index 15c0eea48..8e70de394 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java +++ b/app/ui/src/main/java/com/fsck/k9/view/HighlightDialogFragment.java @@ -5,7 +5,7 @@ import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; -import android.support.v4.app.DialogFragment; +import androidx.fragment.app.DialogFragment; import android.view.View; import android.view.inputmethod.InputMethodManager; diff --git a/app/ui/src/main/java/com/fsck/k9/view/K9WebViewClient.java b/app/ui/src/main/java/com/fsck/k9/view/K9WebViewClient.java index a58bf2070..efb2d15c5 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/K9WebViewClient.java +++ b/app/ui/src/main/java/com/fsck/k9/view/K9WebViewClient.java @@ -14,7 +14,7 @@ import android.net.Uri; import android.os.Build; import android.os.Build.VERSION_CODES; import android.provider.Browser; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.text.TextUtils; import timber.log.Timber; import android.webkit.WebResourceRequest; diff --git a/app/ui/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java b/app/ui/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java index 2f3c1c1ef..24c4d8a1f 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java +++ b/app/ui/src/main/java/com/fsck/k9/view/MessageCryptoDisplayStatus.java @@ -1,10 +1,10 @@ package com.fsck.k9.view; -import android.support.annotation.AttrRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; +import androidx.annotation.AttrRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; import com.fsck.k9.ui.R; import com.fsck.k9.mailstore.CryptoResultAnnotation; diff --git a/app/ui/src/main/java/com/fsck/k9/view/MessageHeader.java b/app/ui/src/main/java/com/fsck/k9/view/MessageHeader.java index f48599bfb..8661b5da1 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/MessageHeader.java +++ b/app/ui/src/main/java/com/fsck/k9/view/MessageHeader.java @@ -11,9 +11,9 @@ import android.content.Context; import android.graphics.Typeface; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.v7.widget.PopupMenu; -import android.support.v7.widget.PopupMenu.OnMenuItemClickListener; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.PopupMenu; +import androidx.appcompat.widget.PopupMenu.OnMenuItemClickListener; import android.text.SpannableString; import android.text.SpannableStringBuilder; import android.text.TextUtils; diff --git a/app/ui/src/main/java/com/fsck/k9/view/MessageWebView.java b/app/ui/src/main/java/com/fsck/k9/view/MessageWebView.java index 30741670b..108b8ba82 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/MessageWebView.java +++ b/app/ui/src/main/java/com/fsck/k9/view/MessageWebView.java @@ -3,8 +3,8 @@ package com.fsck.k9.view; import android.content.Context; import android.content.pm.PackageManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.util.AttributeSet; import timber.log.Timber; import android.view.KeyEvent; diff --git a/app/ui/src/main/java/com/fsck/k9/view/RecipientSelectView.java b/app/ui/src/main/java/com/fsck/k9/view/RecipientSelectView.java index 5d03a912a..605105b95 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/RecipientSelectView.java +++ b/app/ui/src/main/java/com/fsck/k9/view/RecipientSelectView.java @@ -14,11 +14,11 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.provider.ContactsContract.Contacts; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.LoaderManager; -import android.support.v4.app.LoaderManager.LoaderCallbacks; -import android.support.v4.content.Loader; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.loader.app.LoaderManager; +import androidx.loader.app.LoaderManager.LoaderCallbacks; +import androidx.loader.content.Loader; import android.text.Editable; import android.text.TextUtils; import android.util.AttributeSet; diff --git a/app/ui/src/main/java/com/fsck/k9/view/ThemeUtils.java b/app/ui/src/main/java/com/fsck/k9/view/ThemeUtils.java index b38c8c0ef..72cb7dd4a 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/ThemeUtils.java +++ b/app/ui/src/main/java/com/fsck/k9/view/ThemeUtils.java @@ -3,9 +3,9 @@ package com.fsck.k9.view; import android.content.Context; import android.content.res.Resources.Theme; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorInt; -import android.support.annotation.UiThread; +import androidx.annotation.AttrRes; +import androidx.annotation.ColorInt; +import androidx.annotation.UiThread; import android.util.TypedValue; diff --git a/app/ui/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java b/app/ui/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java index ffbfc8e7d..4968c8a1c 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java +++ b/app/ui/src/main/java/com/fsck/k9/view/ToolableViewAnimator.java @@ -27,7 +27,7 @@ package com.fsck.k9.view; import android.content.Context; import android.content.res.TypedArray; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; diff --git a/app/ui/src/main/res/layout/about.xml b/app/ui/src/main/res/layout/about.xml index 31373cdd7..e6a83d364 100644 --- a/app/ui/src/main/res/layout/about.xml +++ b/app/ui/src/main/res/layout/about.xml @@ -6,7 +6,7 @@ - @@ -207,11 +207,11 @@ android:textColor="?android:attr/textColorPrimary" android:textAppearance="?android:attr/textAppearanceLarge" /> - - + diff --git a/app/ui/src/main/res/layout/activity_account_settings.xml b/app/ui/src/main/res/layout/activity_account_settings.xml index f190bfe50..7139e792f 100644 --- a/app/ui/src/main/res/layout/activity_account_settings.xml +++ b/app/ui/src/main/res/layout/activity_account_settings.xml @@ -4,7 +4,7 @@ android:layout_height="fill_parent" android:orientation="vertical"> - - + - - - + diff --git a/app/ui/src/main/res/layout/toolbar.xml b/app/ui/src/main/res/layout/toolbar.xml index e6851a1c3..f4a5a6d54 100644 --- a/app/ui/src/main/res/layout/toolbar.xml +++ b/app/ui/src/main/res/layout/toolbar.xml @@ -1,5 +1,5 @@ - + + + false + 0dp + diff --git a/app/ui/src/main/res/values/themes.xml b/app/ui/src/main/res/values/themes.xml index 058e52d29..db802a5e8 100644 --- a/app/ui/src/main/res/values/themes.xml +++ b/app/ui/src/main/res/values/themes.xml @@ -24,9 +24,10 @@ @color/material_drawer_divider @color/material_drawer_selected @color/material_drawer_selected_text - @color/material_drawer_header_selection_text + @color/material_drawer_dark_header_selection_text + @color/material_drawer_dark_header_selection_subtext - @style/PreferenceThemeOverlay.v14.Material + @style/PreferenceThemeOverlay @drawable/ic_inbox_multiple_light @drawable/ic_folder_light @drawable/ic_inbox_light @@ -136,8 +137,9 @@ @color/material_drawer_dark_selected @color/material_drawer_dark_selected_text @color/material_drawer_dark_header_selection_text + @color/material_drawer_dark_header_selection_subtext - @style/PreferenceThemeOverlay.v14.Material + @style/PreferenceThemeOverlay @drawable/ic_inbox_multiple_dark @drawable/ic_folder_dark @drawable/ic_inbox_dark diff --git a/app/ui/src/main/res/xml/account_settings.xml b/app/ui/src/main/res/xml/account_settings.xml index 35b8f3f41..e20b5a757 100644 --- a/app/ui/src/main/res/xml/account_settings.xml +++ b/app/ui/src/main/res/xml/account_settings.xml @@ -11,7 +11,7 @@ android:key="account_settings" android:title="@string/account_settings_general_title"> - @@ -211,7 +211,7 @@ android:summary="@string/account_settings_strip_signature_summary" android:title="@string/account_settings_strip_signature_label" /> - - - - @@ -279,7 +279,7 @@ android:summary="@string/quiet_time_notification_description" android:title="@string/quiet_time_notification" /> - -