From b26b5d01feef6feb06f2414e7034e6cb5e648406 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 20 Sep 2019 17:54:28 +0200 Subject: migrate to AndroidX --- build.gradle | 36 +++++++++++----------- gradle.properties | 2 ++ libs/android-transcoder/build.gradle | 2 +- .../format/AndroidStandardFormatStrategy.java | 2 +- src/main/AndroidManifest.xml | 4 +-- .../java/de/pixart/messenger/crypto/PgpEngine.java | 2 +- .../messenger/crypto/axolotl/AxolotlService.java | 4 +-- .../crypto/axolotl/XmppAxolotlSession.java | 4 +-- .../de/pixart/messenger/entities/Bookmark.java | 4 +-- .../java/de/pixart/messenger/entities/Contact.java | 2 +- .../de/pixart/messenger/entities/Conversation.java | 4 +-- .../de/pixart/messenger/entities/MucOptions.java | 4 +-- .../de/pixart/messenger/entities/Presence.java | 2 +- .../messenger/entities/ServiceDiscoveryResult.java | 2 +- .../messenger/http/HttpDownloadConnection.java | 2 +- .../java/de/pixart/messenger/parser/IqParser.java | 2 +- .../pixart/messenger/persistance/FileBackend.java | 4 +-- .../messenger/services/AbstractEmojiService.java | 2 +- .../services/AttachFileToConversationRunnable.java | 2 +- .../de/pixart/messenger/services/AudioPlayer.java | 4 +-- .../pixart/messenger/services/AvatarService.java | 6 ++-- .../pixart/messenger/services/BarcodeProvider.java | 2 +- .../services/ChannelDiscoveryService.java | 2 +- .../de/pixart/messenger/services/EmojiService.java | 4 +-- .../messenger/services/ExportBackupService.java | 3 +- .../messenger/services/ImportBackupService.java | 2 +- .../messenger/services/MemorizingTrustManager.java | 2 +- .../messenger/services/NotificationService.java | 18 +++++------ .../pixart/messenger/services/ShortcutService.java | 2 +- .../messenger/services/XmppConnectionService.java | 8 ++--- .../ui/AbstractSearchableListItemActivity.java | 4 +-- .../de/pixart/messenger/ui/ActionBarActivity.java | 6 ++-- .../de/pixart/messenger/ui/BlockContactDialog.java | 6 ++-- .../de/pixart/messenger/ui/BlocklistActivity.java | 5 ++- .../messenger/ui/ChangePasswordActivity.java | 2 +- .../messenger/ui/ChannelDiscoveryActivity.java | 4 +-- .../pixart/messenger/ui/ChooseContactActivity.java | 10 +++--- .../messenger/ui/ConferenceDetailsActivity.java | 6 ++-- .../messenger/ui/ContactDetailsActivity.java | 10 +++--- .../pixart/messenger/ui/ConversationFragment.java | 20 ++++++------ .../pixart/messenger/ui/ConversationsActivity.java | 11 +++---- .../ui/ConversationsOverviewFragment.java | 4 +-- .../messenger/ui/CreatePrivateGroupChatDialog.java | 8 ++--- .../messenger/ui/CreatePublicChannelDialog.java | 8 ++--- .../pixart/messenger/ui/EditAccountActivity.java | 14 ++++----- .../de/pixart/messenger/ui/EnterJidDialog.java | 8 ++--- .../de/pixart/messenger/ui/EnterNameActivity.java | 4 +-- .../pixart/messenger/ui/ImportBackupActivity.java | 10 +++--- .../pixart/messenger/ui/JoinConferenceDialog.java | 9 +++--- .../de/pixart/messenger/ui/LocationActivity.java | 2 +- .../pixart/messenger/ui/ManageAccountActivity.java | 6 ++-- .../pixart/messenger/ui/MediaBrowserActivity.java | 4 +-- .../pixart/messenger/ui/MediaViewerActivity.java | 7 ++--- .../de/pixart/messenger/ui/MemorizingActivity.java | 4 +-- .../de/pixart/messenger/ui/MucUsersActivity.java | 4 +-- .../java/de/pixart/messenger/ui/OmemoActivity.java | 4 +-- .../ui/PublishGroupChatProfilePictureActivity.java | 6 ++-- .../ui/PublishProfilePictureActivity.java | 2 +- .../de/pixart/messenger/ui/RecordingActivity.java | 2 +- .../java/de/pixart/messenger/ui/ScanActivity.java | 4 +-- .../de/pixart/messenger/ui/SearchActivity.java | 4 +-- .../pixart/messenger/ui/SetSettingsActivity.java | 6 ++-- .../de/pixart/messenger/ui/SettingsActivity.java | 7 ++--- .../pixart/messenger/ui/ShareLocationActivity.java | 4 +-- .../de/pixart/messenger/ui/ShareWithActivity.java | 4 +-- .../de/pixart/messenger/ui/ShortcutActivity.java | 2 +- .../pixart/messenger/ui/ShowLocationActivity.java | 2 +- .../messenger/ui/StartConversationActivity.java | 24 +++++++-------- src/main/java/de/pixart/messenger/ui/StartUI.java | 4 +-- .../de/pixart/messenger/ui/TrustKeysActivity.java | 6 ++-- .../de/pixart/messenger/ui/UpdaterActivity.java | 4 +-- .../de/pixart/messenger/ui/UriHandlerActivity.java | 4 +-- .../de/pixart/messenger/ui/VerifyOTRActivity.java | 4 +-- .../de/pixart/messenger/ui/WelcomeActivity.java | 9 ++---- .../java/de/pixart/messenger/ui/XmppActivity.java | 19 +++++------- .../messenger/ui/adapter/AccountAdapter.java | 4 +-- .../messenger/ui/adapter/BackupFileAdapter.java | 6 ++-- .../ui/adapter/ChannelSearchResultAdapter.java | 10 +++--- .../messenger/ui/adapter/ConversationAdapter.java | 8 ++--- .../messenger/ui/adapter/KnownHostsAdapter.java | 2 +- .../messenger/ui/adapter/ListItemAdapter.java | 2 +- .../pixart/messenger/ui/adapter/MediaAdapter.java | 10 +++--- .../messenger/ui/adapter/MediaPreviewAdapter.java | 6 ++-- .../messenger/ui/adapter/MessageAdapter.java | 7 ++--- .../ui/adapter/PresenceTemplateAdapter.java | 2 +- .../pixart/messenger/ui/adapter/UserAdapter.java | 10 +++--- .../messenger/ui/adapter/UserPreviewAdapter.java | 8 ++--- .../ui/interfaces/OnAvatarPublication.java | 2 +- .../de/pixart/messenger/ui/text/QuoteSpan.java | 2 +- .../pixart/messenger/ui/util/AvatarWorkerTask.java | 2 +- .../ui/util/ConversationMenuConfigurator.java | 2 +- .../messenger/ui/util/DelayedHintHelper.java | 2 +- .../de/pixart/messenger/ui/util/GridManager.java | 6 ++-- .../de/pixart/messenger/ui/util/JidDialog.java | 2 +- .../pixart/messenger/ui/util/MucConfiguration.java | 2 +- .../ui/util/MucDetailsContextMenuHelper.java | 2 +- .../messenger/ui/util/SoftKeyboardUtils.java | 2 +- .../pixart/messenger/ui/util/StyledAttributes.java | 4 +-- .../pixart/messenger/ui/widget/CopyTextView.java | 2 +- .../de/pixart/messenger/ui/widget/EditMessage.java | 6 ++-- .../messenger/ui/widget/EmojiWrapperEditText.java | 2 +- .../messenger/ui/widget/FailedCountCustomView.java | 2 +- .../ui/widget/ImmediateAutoCompleteTextView.java | 2 +- .../pixart/messenger/ui/widget/RichLinkView.java | 3 +- .../messenger/ui/widget/TextInputEditText.java | 2 +- .../messenger/ui/widget/UnreadCountCustomView.java | 2 +- .../de/pixart/messenger/utils/Compatibility.java | 4 +-- .../de/pixart/messenger/utils/EmojiWrapper.java | 2 +- .../de/pixart/messenger/utils/ExceptionHelper.java | 2 +- .../messenger/utils/IrregularUnicodeDetector.java | 2 +- .../java/de/pixart/messenger/utils/Resolver.java | 2 +- .../de/pixart/messenger/utils/SSLSocketHelper.java | 2 +- .../de/pixart/messenger/utils/StylingHelper.java | 4 +-- .../de/pixart/messenger/utils/ThemeHelper.java | 10 +++--- .../de/pixart/messenger/utils/TimeframeUtils.java | 2 +- .../java/de/pixart/messenger/utils/UIHelper.java | 2 +- src/main/java/de/pixart/messenger/xml/Element.java | 4 +-- .../java/de/pixart/messenger/xmpp/InvalidJid.java | 2 +- .../de/pixart/messenger/xmpp/XmppConnection.java | 2 +- src/main/res/layout/account_row.xml | 2 +- src/main/res/layout/activity_about.xml | 12 ++++---- src/main/res/layout/activity_change_password.xml | 12 ++++---- src/main/res/layout/activity_channel_discovery.xml | 8 ++--- src/main/res/layout/activity_choose_contact.xml | 2 +- src/main/res/layout/activity_contact_details.xml | 18 +++++------ src/main/res/layout/activity_edit_account.xml | 32 +++++++++---------- src/main/res/layout/activity_import_backup.xml | 8 ++--- src/main/res/layout/activity_media_browser.xml | 2 +- src/main/res/layout/activity_muc_details.xml | 28 ++++++++--------- src/main/res/layout/activity_muc_users.xml | 8 ++--- .../layout/activity_publish_profile_picture.xml | 4 +-- src/main/res/layout/activity_set_settings.xml | 12 ++++---- src/main/res/layout/activity_share_locaction.xml | 4 +-- src/main/res/layout/activity_share_with.xml | 2 +- src/main/res/layout/activity_show_locaction.xml | 2 +- .../res/layout/activity_start_conversation.xml | 4 +-- src/main/res/layout/activity_trust_keys.xml | 8 ++--- src/main/res/layout/contact_key.xml | 2 +- src/main/res/layout/create_conference_dialog.xml | 4 +-- .../res/layout/create_public_channel_dialog.xml | 8 ++--- src/main/res/layout/dialog_enter_password.xml | 4 +-- src/main/res/layout/dialog_join_conference.xml | 4 +-- src/main/res/layout/dialog_presence.xml | 4 +-- src/main/res/layout/dialog_quickedit.xml | 4 +-- src/main/res/layout/enter_jid_dialog.xml | 4 +-- src/main/res/layout/fragment_conversation.xml | 6 ++-- .../res/layout/fragment_conversations_overview.xml | 8 ++--- src/main/res/layout/keys_card.xml | 4 +-- src/main/res/layout/toolbar.xml | 2 +- 149 files changed, 404 insertions(+), 418 deletions(-) diff --git a/build.gradle b/build.gradle index be6945a39..c8fdaafb0 100644 --- a/build.gradle +++ b/build.gradle @@ -48,7 +48,7 @@ dependencies { exclude group: 'com.android.support', module: 'appcompat-v7' exclude group: 'com.android.support', module: 'exifinterface' } - implementation 'org.bouncycastle:bcmail-jdk15on:1.58' + implementation 'org.bouncycastle:bcmail-jdk15on:1.63' implementation 'org.jitsi:org.otr4j:0.22' implementation 'org.gnu.inet:libidn:1.15' implementation 'com.google.zxing:core:3.3.3' @@ -58,20 +58,20 @@ dependencies { implementation 'com.makeramen:roundedimageview:2.3.0' implementation 'jetty:javax.servlet:5.1.12' implementation 'com.google.code.gson:gson:2.8.5' - implementation 'com.android.support:multidex:1.0.3' - implementation 'com.android.support:support-v13:28.0.0' - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support:exifinterface:28.0.0' - implementation 'com.android.support:support-v4:28.0.0' - implementation 'com.android.support:support-emoji:28.0.0' - implementation 'com.android.support:support-emoji-bundled:28.0.0' - implementation 'com.android.support:support-emoji-appcompat:28.0.0' - implementation 'com.android.support:exifinterface:28.0.0' - implementation 'com.android.support:design:28.0.0' - implementation 'com.android.support:cardview-v7:28.0.0' + implementation 'androidx.multidex:multidex:2.0.1' + implementation 'androidx.legacy:legacy-support-v13:1.0.0' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.exifinterface:exifinterface:1.0.0' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'androidx.emoji:emoji:1.0.0' + implementation 'androidx.emoji:emoji-bundled:1.0.0' + implementation 'androidx.emoji:emoji-appcompat:1.0.0' + implementation 'androidx.exifinterface:exifinterface:1.0.0' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.cardview:cardview:1.0.0' implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0' implementation project(':libs:fullscreenvideoview') - implementation 'pub.devrel:easypermissions:2.0.1' // version >= 3.0.0 needs android X libraries + implementation 'pub.devrel:easypermissions:3.0.0' // version >= 3.0.0 needs android X libraries implementation 'com.wefika:flowlayout:0.4.1' implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5' implementation project(':libs:xmpp-addr') @@ -80,11 +80,11 @@ dependencies { implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15' // 1.2.15 is last working version for minSDK 16 implementation 'me.drakeet.support:toastcompat:1.1.0' implementation 'org.osmdroid:osmdroid-android:6.1.0' - implementation 'com.leinardi.android:speed-dial:2.0.1' // version >= 3.0.0 needs android X libraries + implementation 'com.leinardi.android:speed-dial:3.0.0' // version >= 3.0.0 needs android X libraries implementation 'com.squareup.picasso:picasso:2.71828' implementation 'com.squareup.okhttp3:okhttp:3.12.2' // versions > 3.12.x don't support API level < 21 anymore - implementation 'com.squareup.retrofit2:retrofit:2.6.0' - implementation 'com.squareup.retrofit2:converter-gson:2.6.0' + implementation 'com.squareup.retrofit2:retrofit:2.6.1' + implementation 'com.squareup.retrofit2:converter-gson:2.6.1' implementation 'com.google.guava:guava:27.1-android' } @@ -95,11 +95,11 @@ ext { android { - compileSdkVersion 28 + compileSdkVersion 29 defaultConfig { minSdkVersion 16 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 269 versionName "2.2.9" diff --git a/gradle.properties b/gradle.properties index b3c7a0330..0c0632ee2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,3 @@ +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx2048M diff --git a/libs/android-transcoder/build.gradle b/libs/android-transcoder/build.gradle index 6b1f1086d..14f5614e6 100644 --- a/libs/android-transcoder/build.gradle +++ b/libs/android-transcoder/build.gradle @@ -7,7 +7,7 @@ buildscript { apply plugin: 'com.android.library' dependencies { - implementation 'com.android.support:support-v13:28.0.0' + implementation 'androidx.legacy:legacy-support-v13:1.0.0' } android { diff --git a/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java b/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java index 61d9d06fd..822c45fbd 100644 --- a/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java +++ b/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java @@ -18,7 +18,7 @@ package net.ypresto.androidtranscoder.format; import android.media.MediaCodecInfo; import android.media.MediaFormat; import android.os.Build; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; class AndroidStandardFormatStrategy implements MediaFormatStrategy { diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index f430df2ce..b9e1624ae 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -49,7 +49,7 @@ android:required="false" /> diff --git a/src/main/java/de/pixart/messenger/crypto/PgpEngine.java b/src/main/java/de/pixart/messenger/crypto/PgpEngine.java index 8cd0e2e6f..606ba81f6 100644 --- a/src/main/java/de/pixart/messenger/crypto/PgpEngine.java +++ b/src/main/java/de/pixart/messenger/crypto/PgpEngine.java @@ -2,7 +2,7 @@ package de.pixart.messenger.crypto; import android.app.PendingIntent; import android.content.Intent; -import android.support.annotation.StringRes; +import androidx.annotation.StringRes; import android.util.Log; import org.openintents.openpgp.OpenPgpError; diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java index c6f5ea7f9..fca50d3ec 100644 --- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java +++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java @@ -2,8 +2,8 @@ package de.pixart.messenger.crypto.axolotl; import android.os.Bundle; import android.security.KeyChain; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.util.Log; import android.util.Pair; diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java b/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java index f7a9c0a6f..896dafce2 100644 --- a/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java +++ b/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java @@ -1,7 +1,7 @@ package de.pixart.messenger.crypto.axolotl; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.util.Log; import org.whispersystems.libsignal.DuplicateMessageException; diff --git a/src/main/java/de/pixart/messenger/entities/Bookmark.java b/src/main/java/de/pixart/messenger/entities/Bookmark.java index 08c368b76..f57d1aacb 100644 --- a/src/main/java/de/pixart/messenger/entities/Bookmark.java +++ b/src/main/java/de/pixart/messenger/entities/Bookmark.java @@ -1,8 +1,8 @@ package de.pixart.messenger.entities; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.lang.ref.WeakReference; import java.util.ArrayList; diff --git a/src/main/java/de/pixart/messenger/entities/Contact.java b/src/main/java/de/pixart/messenger/entities/Contact.java index 7d9f100e2..776ed4cec 100644 --- a/src/main/java/de/pixart/messenger/entities/Contact.java +++ b/src/main/java/de/pixart/messenger/entities/Contact.java @@ -4,7 +4,7 @@ import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.net.Uri; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.TextUtils; import org.json.JSONArray; diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 866b33597..707074551 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -2,8 +2,8 @@ package de.pixart.messenger.entities; import android.content.ContentValues; import android.database.Cursor; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import net.java.otr4j.OtrException; diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java index aedb01144..36bb43fbe 100644 --- a/src/main/java/de/pixart/messenger/entities/MucOptions.java +++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java @@ -1,8 +1,8 @@ package de.pixart.messenger.entities; import android.annotation.SuppressLint; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import java.util.ArrayList; diff --git a/src/main/java/de/pixart/messenger/entities/Presence.java b/src/main/java/de/pixart/messenger/entities/Presence.java index 14836c145..01d442a2b 100644 --- a/src/main/java/de/pixart/messenger/entities/Presence.java +++ b/src/main/java/de/pixart/messenger/entities/Presence.java @@ -1,6 +1,6 @@ package de.pixart.messenger.entities; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Locale; diff --git a/src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java b/src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java index 50b118cba..5e5b20607 100644 --- a/src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java +++ b/src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java @@ -2,7 +2,7 @@ package de.pixart.messenger.entities; import android.content.ContentValues; import android.database.Cursor; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Base64; import org.json.JSONArray; diff --git a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java index ac3e8e40c..6d92529db 100644 --- a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java +++ b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java @@ -1,7 +1,7 @@ package de.pixart.messenger.http; import android.os.PowerManager; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Log; import java.io.BufferedInputStream; diff --git a/src/main/java/de/pixart/messenger/parser/IqParser.java b/src/main/java/de/pixart/messenger/parser/IqParser.java index c3bd85922..d689d0667 100644 --- a/src/main/java/de/pixart/messenger/parser/IqParser.java +++ b/src/main/java/de/pixart/messenger/parser/IqParser.java @@ -1,6 +1,6 @@ package de.pixart.messenger.parser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Base64; import android.util.Log; import android.util.Pair; diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index 235547c1d..e30cb028c 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -21,8 +21,8 @@ import android.os.Environment; import android.os.ParcelFileDescriptor; import android.provider.MediaStore; import android.provider.OpenableColumns; -import android.support.annotation.RequiresApi; -import android.support.v4.content.FileProvider; +import androidx.annotation.RequiresApi; +import androidx.core.content.FileProvider; import android.system.Os; import android.system.StructStat; import android.util.Base64; diff --git a/src/main/java/de/pixart/messenger/services/AbstractEmojiService.java b/src/main/java/de/pixart/messenger/services/AbstractEmojiService.java index 5eacdb676..377e21f4c 100644 --- a/src/main/java/de/pixart/messenger/services/AbstractEmojiService.java +++ b/src/main/java/de/pixart/messenger/services/AbstractEmojiService.java @@ -2,7 +2,7 @@ package de.pixart.messenger.services; import android.content.Context; import android.os.Build; -import android.support.text.emoji.EmojiCompat; +import androidx.emoji.text.EmojiCompat; import android.util.Log; import de.pixart.messenger.Config; diff --git a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java index fbf77577b..a56d3cea2 100644 --- a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java +++ b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java @@ -3,7 +3,7 @@ package de.pixart.messenger.services; import android.net.Uri; import android.os.Build; import android.os.ParcelFileDescriptor; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; import net.ypresto.androidtranscoder.MediaTranscoder; diff --git a/src/main/java/de/pixart/messenger/services/AudioPlayer.java b/src/main/java/de/pixart/messenger/services/AudioPlayer.java index 4f8d40c18..ecb3f5c21 100644 --- a/src/main/java/de/pixart/messenger/services/AudioPlayer.java +++ b/src/main/java/de/pixart/messenger/services/AudioPlayer.java @@ -12,8 +12,8 @@ import android.media.AudioManager; import android.os.Build; import android.os.Handler; import android.os.PowerManager; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import android.util.Log; import android.view.View; import android.widget.ImageButton; diff --git a/src/main/java/de/pixart/messenger/services/AvatarService.java b/src/main/java/de/pixart/messenger/services/AvatarService.java index a07b3a6e5..469de2599 100644 --- a/src/main/java/de/pixart/messenger/services/AvatarService.java +++ b/src/main/java/de/pixart/messenger/services/AvatarService.java @@ -13,9 +13,9 @@ import android.graphics.Typeface; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; -import android.support.annotation.ColorInt; -import android.support.annotation.Nullable; -import android.support.v4.content.res.ResourcesCompat; +import androidx.annotation.ColorInt; +import androidx.annotation.Nullable; +import androidx.core.content.res.ResourcesCompat; import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Log; diff --git a/src/main/java/de/pixart/messenger/services/BarcodeProvider.java b/src/main/java/de/pixart/messenger/services/BarcodeProvider.java index 5ac2ee016..f2e7fff2d 100644 --- a/src/main/java/de/pixart/messenger/services/BarcodeProvider.java +++ b/src/main/java/de/pixart/messenger/services/BarcodeProvider.java @@ -13,7 +13,7 @@ import android.net.Uri; import android.os.CancellationSignal; import android.os.IBinder; import android.os.ParcelFileDescriptor; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Log; import com.google.zxing.BarcodeFormat; diff --git a/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java b/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java index a9b4c6504..6922ab96b 100644 --- a/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java +++ b/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java @@ -1,6 +1,6 @@ package de.pixart.messenger.services; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import com.google.common.cache.Cache; diff --git a/src/main/java/de/pixart/messenger/services/EmojiService.java b/src/main/java/de/pixart/messenger/services/EmojiService.java index 6f8d8facd..26be25202 100644 --- a/src/main/java/de/pixart/messenger/services/EmojiService.java +++ b/src/main/java/de/pixart/messenger/services/EmojiService.java @@ -1,8 +1,8 @@ package de.pixart.messenger.services; import android.content.Context; -import android.support.text.emoji.EmojiCompat; -import android.support.text.emoji.bundled.BundledEmojiCompatConfig; +import androidx.emoji.text.EmojiCompat; +import androidx.emoji.bundled.BundledEmojiCompatConfig; public class EmojiService extends AbstractEmojiService { diff --git a/src/main/java/de/pixart/messenger/services/ExportBackupService.java b/src/main/java/de/pixart/messenger/services/ExportBackupService.java index 96ec4c6cd..a6d595712 100644 --- a/src/main/java/de/pixart/messenger/services/ExportBackupService.java +++ b/src/main/java/de/pixart/messenger/services/ExportBackupService.java @@ -11,12 +11,11 @@ import android.database.Cursor; import android.database.DatabaseUtils; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; -import android.os.Build; import android.os.Bundle; import android.os.IBinder; import android.os.PowerManager; import android.preference.PreferenceManager; -import android.support.v4.app.NotificationCompat; +import androidx.core.app.NotificationCompat; import android.util.Log; import java.io.BufferedWriter; diff --git a/src/main/java/de/pixart/messenger/services/ImportBackupService.java b/src/main/java/de/pixart/messenger/services/ImportBackupService.java index 79616305b..b739b15bf 100644 --- a/src/main/java/de/pixart/messenger/services/ImportBackupService.java +++ b/src/main/java/de/pixart/messenger/services/ImportBackupService.java @@ -10,7 +10,7 @@ import android.database.sqlite.SQLiteDatabase; import android.net.Uri; import android.os.Binder; import android.os.IBinder; -import android.support.v4.app.NotificationCompat; +import androidx.core.app.NotificationCompat; import android.util.Log; import java.io.BufferedReader; diff --git a/src/main/java/de/pixart/messenger/services/MemorizingTrustManager.java b/src/main/java/de/pixart/messenger/services/MemorizingTrustManager.java index d98e97a58..899a12d5b 100644 --- a/src/main/java/de/pixart/messenger/services/MemorizingTrustManager.java +++ b/src/main/java/de/pixart/messenger/services/MemorizingTrustManager.java @@ -34,7 +34,7 @@ import android.content.Intent; import android.net.Uri; import android.os.Handler; import android.preference.PreferenceManager; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.util.Base64; import android.util.Log; import android.util.SparseArray; diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java index 10fccaf73..e64615f31 100644 --- a/src/main/java/de/pixart/messenger/services/NotificationService.java +++ b/src/main/java/de/pixart/messenger/services/NotificationService.java @@ -17,15 +17,15 @@ import android.net.Uri; import android.os.Build; import android.os.SystemClock; import android.preference.PreferenceManager; -import android.support.annotation.RequiresApi; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.BigPictureStyle; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationManagerCompat; -import android.support.v4.app.Person; -import android.support.v4.app.RemoteInput; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.IconCompat; +import androidx.annotation.RequiresApi; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.BigPictureStyle; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationManagerCompat; +import androidx.core.app.Person; +import androidx.core.app.RemoteInput; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.IconCompat; import android.text.SpannableString; import android.text.style.StyleSpan; import android.util.DisplayMetrics; diff --git a/src/main/java/de/pixart/messenger/services/ShortcutService.java b/src/main/java/de/pixart/messenger/services/ShortcutService.java index 94bbc15cd..a7278a7d3 100644 --- a/src/main/java/de/pixart/messenger/services/ShortcutService.java +++ b/src/main/java/de/pixart/messenger/services/ShortcutService.java @@ -8,7 +8,7 @@ import android.graphics.Bitmap; import android.graphics.drawable.Icon; import android.net.Uri; import android.os.Build; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import java.util.ArrayList; diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index 6d483419d..dded48c0a 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -33,10 +33,10 @@ import android.os.Vibrator; import android.preference.PreferenceManager; import android.provider.ContactsContract; import android.security.KeyChain; -import android.support.annotation.BoolRes; -import android.support.annotation.IntegerRes; -import android.support.v4.app.RemoteInput; -import android.support.v4.content.ContextCompat; +import androidx.annotation.BoolRes; +import androidx.annotation.IntegerRes; +import androidx.core.app.RemoteInput; +import androidx.core.content.ContextCompat; import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Log; diff --git a/src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java b/src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java index 01246ad92..6b5d8f24f 100644 --- a/src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java +++ b/src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java @@ -1,9 +1,9 @@ package de.pixart.messenger.ui; import android.content.Context; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.view.KeyEvent; diff --git a/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java b/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java index 0bd0c78c7..a76e009dd 100644 --- a/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java @@ -2,9 +2,9 @@ package de.pixart.messenger.ui; import android.content.SharedPreferences; import android.preference.PreferenceManager; -import android.support.annotation.BoolRes; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.BoolRes; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.view.MenuItem; import android.view.WindowManager; diff --git a/src/main/java/de/pixart/messenger/ui/BlockContactDialog.java b/src/main/java/de/pixart/messenger/ui/BlockContactDialog.java index 562bf2efa..80b6f26cc 100644 --- a/src/main/java/de/pixart/messenger/ui/BlockContactDialog.java +++ b/src/main/java/de/pixart/messenger/ui/BlockContactDialog.java @@ -1,8 +1,8 @@ package de.pixart.messenger.ui; -import android.databinding.DataBindingUtil; -import android.support.annotation.StringRes; -import android.support.v7.app.AlertDialog; +import androidx.databinding.DataBindingUtil; +import androidx.annotation.StringRes; +import androidx.appcompat.app.AlertDialog; import android.view.View; import android.widget.Toast; diff --git a/src/main/java/de/pixart/messenger/ui/BlocklistActivity.java b/src/main/java/de/pixart/messenger/ui/BlocklistActivity.java index 2927fe3e3..48cf7aeb1 100644 --- a/src/main/java/de/pixart/messenger/ui/BlocklistActivity.java +++ b/src/main/java/de/pixart/messenger/ui/BlocklistActivity.java @@ -1,8 +1,8 @@ package de.pixart.messenger.ui; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; import android.text.Editable; import android.widget.Toast; @@ -11,7 +11,6 @@ import java.util.Collections; import de.pixart.messenger.R; import de.pixart.messenger.entities.Account; import de.pixart.messenger.entities.Blockable; -import de.pixart.messenger.entities.Contact; import de.pixart.messenger.entities.ListItem; import de.pixart.messenger.entities.RawBlockable; import de.pixart.messenger.ui.interfaces.OnBackendConnected; diff --git a/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java b/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java index df9113448..fbffddfb8 100644 --- a/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java @@ -2,7 +2,7 @@ package de.pixart.messenger.ui; import android.content.Intent; import android.os.Bundle; -import android.support.design.widget.TextInputLayout; +import com.google.android.material.textfield.TextInputLayout; import android.view.View; import android.widget.Button; import android.widget.Toast; diff --git a/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java b/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java index 79d88ca6f..7696bd4eb 100644 --- a/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java @@ -3,9 +3,9 @@ package de.pixart.messenger.ui; import android.app.AlertDialog; import android.content.Context; import android.content.SharedPreferences; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.widget.Toolbar; import android.text.Html; import android.view.KeyEvent; import android.view.Menu; diff --git a/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java b/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java index 7f1869e9f..249b5e1a8 100644 --- a/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java @@ -5,11 +5,11 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.ActionBar; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.ActionBar; import android.view.ActionMode; import android.view.KeyEvent; import android.view.Menu; diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index 8b1980c6c..043edfe49 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -3,11 +3,11 @@ package de.pixart.messenger.ui; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.PorterDuff; import android.os.Bundle; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.SpannableStringBuilder; import android.text.TextWatcher; diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index 91f48c4c4..4bee618f5 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -5,7 +5,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.PorterDuff; import android.net.Uri; import android.os.Bundle; @@ -13,10 +13,10 @@ import android.preference.PreferenceManager; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Intents; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 6f29655f6..74c85dc34 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -14,7 +14,7 @@ import android.content.Intent; import android.content.IntentSender.SendIntentException; import android.content.SharedPreferences; import android.content.pm.PackageManager; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.net.Uri; import android.os.Build; import android.os.Bundle; @@ -22,15 +22,15 @@ import android.os.Handler; import android.os.SystemClock; import android.preference.PreferenceManager; import android.provider.MediaStore; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; -import android.support.v13.view.inputmethod.InputConnectionCompat; -import android.support.v13.view.inputmethod.InputContentInfoCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.menu.MenuBuilder; -import android.support.v7.view.menu.MenuPopupHelper; -import android.support.v7.widget.PopupMenu; +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; +import androidx.core.view.inputmethod.InputConnectionCompat; +import androidx.core.view.inputmethod.InputContentInfoCompat; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.menu.MenuBuilder; +import androidx.appcompat.view.menu.MenuPopupHelper; +import androidx.appcompat.widget.PopupMenu; import android.text.Editable; import android.text.TextUtils; import android.util.Log; diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java index 49e6d48ef..75b3ce91a 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java @@ -40,17 +40,17 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Typeface; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; import android.provider.Settings; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; @@ -95,7 +95,6 @@ import de.pixart.messenger.xmpp.chatstate.ChatState; import rocks.xmpp.addr.Jid; import static de.pixart.messenger.ui.ConversationFragment.REQUEST_DECRYPT_PGP; -import static de.pixart.messenger.ui.SettingsActivity.USE_INTERNAL_UPDATER; public class ConversationsActivity extends XmppActivity implements OnConversationSelected, OnConversationArchived, OnConversationsListItemUpdated, OnConversationRead, XmppConnectionService.OnAccountUpdate, XmppConnectionService.OnConversationUpdate, XmppConnectionService.OnRosterUpdate, OnUpdateBlocklist, XmppConnectionService.OnShowErrorToast, XmppConnectionService.OnAffiliationChanged, XmppConnectionService.OnRoomDestroy { diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java index 4f85c97c6..1ddb30c66 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java @@ -34,9 +34,9 @@ import android.animation.AnimatorInflater; import android.app.Activity; import android.app.Fragment; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; diff --git a/src/main/java/de/pixart/messenger/ui/CreatePrivateGroupChatDialog.java b/src/main/java/de/pixart/messenger/ui/CreatePrivateGroupChatDialog.java index c77211e9d..06087fba1 100644 --- a/src/main/java/de/pixart/messenger/ui/CreatePrivateGroupChatDialog.java +++ b/src/main/java/de/pixart/messenger/ui/CreatePrivateGroupChatDialog.java @@ -2,11 +2,11 @@ package de.pixart.messenger.ui; import android.app.Dialog; import android.content.Context; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; import android.view.View; import android.widget.Spinner; diff --git a/src/main/java/de/pixart/messenger/ui/CreatePublicChannelDialog.java b/src/main/java/de/pixart/messenger/ui/CreatePublicChannelDialog.java index cbaf3468c..43ac03896 100644 --- a/src/main/java/de/pixart/messenger/ui/CreatePublicChannelDialog.java +++ b/src/main/java/de/pixart/messenger/ui/CreatePublicChannelDialog.java @@ -4,11 +4,11 @@ import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index f8ad82c59..8d5712bf5 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -7,7 +7,7 @@ import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.IntentSender; import android.content.SharedPreferences; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; @@ -16,12 +16,12 @@ import android.preference.PreferenceManager; import android.provider.Settings; import android.security.KeyChain; import android.security.KeyChainAliasCallback; -import android.support.annotation.NonNull; -import android.support.design.widget.TextInputLayout; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; +import androidx.annotation.NonNull; +import com.google.android.material.textfield.TextInputLayout; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; diff --git a/src/main/java/de/pixart/messenger/ui/EnterJidDialog.java b/src/main/java/de/pixart/messenger/ui/EnterJidDialog.java index 05b234e6f..2b9a6b8e3 100644 --- a/src/main/java/de/pixart/messenger/ui/EnterJidDialog.java +++ b/src/main/java/de/pixart/messenger/ui/EnterJidDialog.java @@ -2,11 +2,11 @@ package de.pixart.messenger.ui; import android.app.Activity; import android.app.Dialog; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; import android.text.Editable; import android.text.TextWatcher; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/EnterNameActivity.java b/src/main/java/de/pixart/messenger/ui/EnterNameActivity.java index eefda7df9..1b4a73e82 100644 --- a/src/main/java/de/pixart/messenger/ui/EnterNameActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EnterNameActivity.java @@ -1,9 +1,9 @@ package de.pixart.messenger.ui; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.widget.Toolbar; import android.view.View; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java b/src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java index cc5b35e11..8f65e54eb 100644 --- a/src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java @@ -5,15 +5,15 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.ServiceConnection; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.IBinder; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; +import com.google.android.material.snackbar.Snackbar; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; diff --git a/src/main/java/de/pixart/messenger/ui/JoinConferenceDialog.java b/src/main/java/de/pixart/messenger/ui/JoinConferenceDialog.java index f97a7074b..3ed86aba5 100644 --- a/src/main/java/de/pixart/messenger/ui/JoinConferenceDialog.java +++ b/src/main/java/de/pixart/messenger/ui/JoinConferenceDialog.java @@ -4,11 +4,11 @@ import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; import android.view.View; import android.widget.AutoCompleteTextView; import android.widget.Spinner; @@ -19,7 +19,6 @@ import java.util.List; import de.pixart.messenger.R; import de.pixart.messenger.databinding.DialogJoinConferenceBinding; -import de.pixart.messenger.services.XmppConnectionService; import de.pixart.messenger.ui.adapter.KnownHostsAdapter; import de.pixart.messenger.ui.interfaces.OnBackendConnected; import de.pixart.messenger.ui.util.DelayedHintHelper; diff --git a/src/main/java/de/pixart/messenger/ui/LocationActivity.java b/src/main/java/de/pixart/messenger/ui/LocationActivity.java index c7668a142..ef6b24b74 100644 --- a/src/main/java/de/pixart/messenger/ui/LocationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/LocationActivity.java @@ -7,7 +7,7 @@ import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; -import android.support.v4.app.ActivityCompat; +import androidx.core.app.ActivityCompat; import de.pixart.messenger.Config; diff --git a/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java b/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java index e632f4e92..8d39df934 100644 --- a/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java @@ -5,9 +5,9 @@ import android.content.Intent; import android.os.Bundle; import android.security.KeyChain; import android.security.KeyChainAliasCallback; -import android.support.annotation.NonNull; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; import android.util.Pair; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; diff --git a/src/main/java/de/pixart/messenger/ui/MediaBrowserActivity.java b/src/main/java/de/pixart/messenger/ui/MediaBrowserActivity.java index 9aa308f57..608e689e5 100644 --- a/src/main/java/de/pixart/messenger/ui/MediaBrowserActivity.java +++ b/src/main/java/de/pixart/messenger/ui/MediaBrowserActivity.java @@ -2,9 +2,9 @@ package de.pixart.messenger.ui; import android.content.Context; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.widget.Toolbar; import android.view.View; import java.util.List; diff --git a/src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java b/src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java index d8082b7e9..8f51e3c05 100644 --- a/src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java +++ b/src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java @@ -8,18 +8,17 @@ import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.res.Configuration; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Bitmap; import android.graphics.BitmapFactory; -import android.graphics.PointF; import android.media.AudioManager; import android.media.MediaMetadataRetriever; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.view.GestureDetector; import android.view.MotionEvent; diff --git a/src/main/java/de/pixart/messenger/ui/MemorizingActivity.java b/src/main/java/de/pixart/messenger/ui/MemorizingActivity.java index a47adc6eb..0110cd7e8 100644 --- a/src/main/java/de/pixart/messenger/ui/MemorizingActivity.java +++ b/src/main/java/de/pixart/messenger/ui/MemorizingActivity.java @@ -28,8 +28,8 @@ import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.os.Bundle; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/src/main/java/de/pixart/messenger/ui/MucUsersActivity.java b/src/main/java/de/pixart/messenger/ui/MucUsersActivity.java index b8bc57b87..0bb4deee8 100644 --- a/src/main/java/de/pixart/messenger/ui/MucUsersActivity.java +++ b/src/main/java/de/pixart/messenger/ui/MucUsersActivity.java @@ -2,9 +2,9 @@ package de.pixart.messenger.ui; import android.content.Context; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; diff --git a/src/main/java/de/pixart/messenger/ui/OmemoActivity.java b/src/main/java/de/pixart/messenger/ui/OmemoActivity.java index 25a791e10..4841cd3a4 100644 --- a/src/main/java/de/pixart/messenger/ui/OmemoActivity.java +++ b/src/main/java/de/pixart/messenger/ui/OmemoActivity.java @@ -2,8 +2,8 @@ package de.pixart.messenger.ui; import android.content.Intent; -import android.databinding.DataBindingUtil; -import android.support.v7.app.AlertDialog; +import androidx.databinding.DataBindingUtil; +import androidx.appcompat.app.AlertDialog; import android.view.ContextMenu; import android.view.MenuItem; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java b/src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java index 0a8ec2e7f..3dcefa893 100644 --- a/src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java +++ b/src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java @@ -30,12 +30,12 @@ package de.pixart.messenger.ui; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.StringRes; -import android.support.v7.widget.Toolbar; +import androidx.annotation.StringRes; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.View; import android.widget.Toast; diff --git a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java index db81e573b..960e19ac7 100644 --- a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java +++ b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java @@ -4,7 +4,7 @@ import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.StringRes; +import androidx.annotation.StringRes; import android.util.Log; import android.view.View; import android.view.View.OnLongClickListener; diff --git a/src/main/java/de/pixart/messenger/ui/RecordingActivity.java b/src/main/java/de/pixart/messenger/ui/RecordingActivity.java index 4e38fde4d..64c968117 100644 --- a/src/main/java/de/pixart/messenger/ui/RecordingActivity.java +++ b/src/main/java/de/pixart/messenger/ui/RecordingActivity.java @@ -4,7 +4,7 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.media.MediaRecorder; import android.net.Uri; import android.os.Bundle; diff --git a/src/main/java/de/pixart/messenger/ui/ScanActivity.java b/src/main/java/de/pixart/messenger/ui/ScanActivity.java index 263b46492..9e24b5b4b 100644 --- a/src/main/java/de/pixart/messenger/ui/ScanActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ScanActivity.java @@ -33,8 +33,8 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.Process; import android.os.Vibrator; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import android.util.Log; import android.view.KeyEvent; import android.view.Surface; diff --git a/src/main/java/de/pixart/messenger/ui/SearchActivity.java b/src/main/java/de/pixart/messenger/ui/SearchActivity.java index b5d752522..3b837427d 100644 --- a/src/main/java/de/pixart/messenger/ui/SearchActivity.java +++ b/src/main/java/de/pixart/messenger/ui/SearchActivity.java @@ -29,9 +29,9 @@ package de.pixart.messenger.ui; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.InputType; import android.text.TextWatcher; diff --git a/src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java index 74786b6a9..1b04924d9 100644 --- a/src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java @@ -2,11 +2,11 @@ package de.pixart.messenger.ui; import android.content.Intent; import android.content.SharedPreferences; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java index 3c70ee089..26b1bfdd9 100644 --- a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java @@ -1,7 +1,6 @@ package de.pixart.messenger.ui; import android.app.FragmentManager; -import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; @@ -16,9 +15,9 @@ import android.preference.Preference; import android.preference.PreferenceCategory; import android.preference.PreferenceManager; import android.preference.PreferenceScreen; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.widget.Toast; diff --git a/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java index 568370dff..92ed28ad2 100644 --- a/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java @@ -12,8 +12,8 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.provider.Settings; -import android.support.design.widget.CoordinatorLayout; -import android.support.design.widget.Snackbar; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import com.google.android.material.snackbar.Snackbar; import android.text.TextUtils; import android.webkit.WebView; import android.widget.Button; diff --git a/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java b/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java index 63c0dc323..badace094 100644 --- a/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java @@ -4,8 +4,8 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.Menu; import android.view.MenuItem; diff --git a/src/main/java/de/pixart/messenger/ui/ShortcutActivity.java b/src/main/java/de/pixart/messenger/ui/ShortcutActivity.java index 9afb2659f..79834e5bf 100644 --- a/src/main/java/de/pixart/messenger/ui/ShortcutActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShortcutActivity.java @@ -4,7 +4,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.v7.app.ActionBar; +import androidx.appcompat.app.ActionBar; import android.view.inputmethod.InputMethodManager; import java.util.Arrays; diff --git a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java index 26865aed0..3cf0da9e9 100644 --- a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java @@ -11,7 +11,7 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.design.widget.FloatingActionButton; +import com.google.android.material.floatingactionbutton.FloatingActionButton; import android.text.TextUtils; import android.util.Log; import android.view.Menu; diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index 1918d73d0..0bfd93cf1 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -9,21 +9,21 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.app.ListFragment; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; +import androidx.fragment.app.ListFragment; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; diff --git a/src/main/java/de/pixart/messenger/ui/StartUI.java b/src/main/java/de/pixart/messenger/ui/StartUI.java index 8e8c0e9d1..7abfc0912 100644 --- a/src/main/java/de/pixart/messenger/ui/StartUI.java +++ b/src/main/java/de/pixart/messenger/ui/StartUI.java @@ -9,8 +9,8 @@ import android.content.res.Configuration; import android.net.Uri; import android.os.Bundle; import android.provider.Settings; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; import android.util.Log; import java.util.List; diff --git a/src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java b/src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java index e8e17e287..7015d335b 100644 --- a/src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java +++ b/src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java @@ -2,10 +2,10 @@ package de.pixart.messenger.ui; import android.app.AlertDialog; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.Gravity; import android.view.Menu; diff --git a/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java b/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java index cc075b6aa..05fd94188 100644 --- a/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java +++ b/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java @@ -13,8 +13,8 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.os.PowerManager; -import android.support.v4.app.ActivityCompat; -import android.support.v7.app.AlertDialog; +import androidx.core.app.ActivityCompat; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.widget.TextView; import android.widget.Toast; diff --git a/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java b/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java index a7a22a10b..9b53d5d24 100644 --- a/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java +++ b/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java @@ -7,8 +7,8 @@ import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; import android.widget.Toast; import java.util.List; diff --git a/src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java b/src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java index e5367d567..931af60a9 100644 --- a/src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java +++ b/src/main/java/de/pixart/messenger/ui/VerifyOTRActivity.java @@ -3,8 +3,8 @@ package de.pixart.messenger.ui; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.view.Menu; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java index 0ca7d5351..a46b24a5a 100644 --- a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java +++ b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java @@ -3,18 +3,15 @@ package de.pixart.messenger.ui; import android.content.Intent; import android.content.pm.ActivityInfo; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; -import java.util.List; - import de.pixart.messenger.R; -import de.pixart.messenger.entities.Account; import static de.pixart.messenger.Config.DISALLOW_REGISTRATION_IN_UI; import static de.pixart.messenger.utils.PermissionUtils.allGranted; diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 06f350385..79cfbac5e 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -20,7 +20,7 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.res.Resources; import android.content.res.TypedArray; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Point; @@ -38,12 +38,12 @@ import android.os.PowerManager; import android.os.SystemClock; import android.preference.PreferenceManager; import android.provider.Settings; -import android.support.annotation.BoolRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatDelegate; +import androidx.annotation.BoolRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatDelegate; import android.text.InputType; import android.util.DisplayMetrics; import android.util.Log; @@ -64,7 +64,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.concurrent.ExecutionException; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.atomic.AtomicInteger; @@ -75,7 +74,6 @@ import de.pixart.messenger.databinding.DialogQuickeditBinding; import de.pixart.messenger.entities.Account; import de.pixart.messenger.entities.Contact; import de.pixart.messenger.entities.Conversation; -import de.pixart.messenger.entities.Conversational; import de.pixart.messenger.entities.Message; import de.pixart.messenger.entities.Presences; import de.pixart.messenger.services.AvatarService; @@ -1169,8 +1167,7 @@ public abstract class XmppActivity extends ActionBarActivity { imageView.setBackgroundColor(0xff333333); imageView.setImageDrawable(null); final BitmapWorkerTask task = new BitmapWorkerTask(imageView); - final AsyncDrawable asyncDrawable = new AsyncDrawable( - getResources(), null, task); + final AsyncDrawable asyncDrawable = new AsyncDrawable(getResources(), null, task); imageView.setImageDrawable(asyncDrawable); try { task.execute(message); diff --git a/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java index e37c0ea16..f43868f1f 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java @@ -1,7 +1,7 @@ package de.pixart.messenger.ui.adapter; -import android.databinding.DataBindingUtil; -import android.support.annotation.NonNull; +import androidx.databinding.DataBindingUtil; +import androidx.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/BackupFileAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/BackupFileAdapter.java index 9a7f70d12..10592eee1 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/BackupFileAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/BackupFileAdapter.java @@ -1,13 +1,13 @@ package de.pixart.messenger.ui.adapter; import android.content.res.Resources; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.text.format.DateUtils; import android.util.DisplayMetrics; import android.view.LayoutInflater; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/ChannelSearchResultAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/ChannelSearchResultAdapter.java index dee701c9d..cf5986738 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/ChannelSearchResultAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/ChannelSearchResultAdapter.java @@ -1,10 +1,10 @@ package de.pixart.messenger.ui.adapter; -import android.databinding.DataBindingUtil; -import android.support.annotation.NonNull; -import android.support.v7.recyclerview.extensions.ListAdapter; -import android.support.v7.util.DiffUtil; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.ListAdapter; +import androidx.recyclerview.widget.DiffUtil; +import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java index fe4218dd4..62bc711b2 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java @@ -1,12 +1,12 @@ package de.pixart.messenger.ui.adapter; import android.content.SharedPreferences; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Typeface; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java index 2e0bfccc6..69067da79 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java @@ -1,7 +1,7 @@ package de.pixart.messenger.ui.adapter; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.widget.ArrayAdapter; import android.widget.Filter; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java index 250dcc1cd..a6387d182 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java @@ -1,7 +1,7 @@ package de.pixart.messenger.ui.adapter; import android.content.SharedPreferences; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.preference.PreferenceManager; import android.view.LayoutInflater; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MediaAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MediaAdapter.java index 847ab35cf..1551f6021 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MediaAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MediaAdapter.java @@ -2,15 +2,15 @@ package de.pixart.messenger.ui.adapter; import android.content.Context; import android.content.res.Resources; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.AsyncTask; -import android.support.annotation.AttrRes; -import android.support.annotation.DimenRes; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.AttrRes; +import androidx.annotation.DimenRes; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.ViewGroup; import android.widget.ImageView; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java index f27158927..4a636dde2 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java @@ -2,13 +2,13 @@ package de.pixart.messenger.ui.adapter; import android.content.Context; import android.content.res.Resources; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.ViewGroup; import android.widget.ImageView; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index e3719d205..5e7c5962f 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -9,8 +9,8 @@ import android.graphics.Rect; import android.graphics.Typeface; import android.net.Uri; import android.preference.PreferenceManager; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import android.text.Editable; import android.text.Spannable; import android.text.SpannableString; @@ -1035,8 +1035,7 @@ public class MessageAdapter extends ArrayAdapter implements CopyTextVie viewHolder.contact_picture.setOnClickListener(v -> { if (MessageAdapter.this.mOnContactPictureClickedListener != null) { - MessageAdapter.this.mOnContactPictureClickedListener - .onContactPictureClicked(message); + MessageAdapter.this.mOnContactPictureClickedListener.onContactPictureClicked(message); } }); diff --git a/src/main/java/de/pixart/messenger/ui/adapter/PresenceTemplateAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/PresenceTemplateAdapter.java index 8fe84af5b..8b0253d05 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/PresenceTemplateAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/PresenceTemplateAdapter.java @@ -30,7 +30,7 @@ package de.pixart.messenger.ui.adapter; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.widget.ArrayAdapter; import android.widget.Filter; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/UserAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/UserAdapter.java index 9677aa61d..22f292024 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/UserAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/UserAdapter.java @@ -2,11 +2,11 @@ package de.pixart.messenger.ui.adapter; import android.app.PendingIntent; import android.content.IntentSender; -import android.databinding.DataBindingUtil; -import android.support.annotation.NonNull; -import android.support.v7.recyclerview.extensions.ListAdapter; -import android.support.v7.util.DiffUtil; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.ListAdapter; +import androidx.recyclerview.widget.DiffUtil; +import androidx.recyclerview.widget.RecyclerView; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/UserPreviewAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/UserPreviewAdapter.java index 0a0e9f587..ff06832ce 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/UserPreviewAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/UserPreviewAdapter.java @@ -1,9 +1,9 @@ package de.pixart.messenger.ui.adapter; -import android.databinding.DataBindingUtil; -import android.support.annotation.NonNull; -import android.support.v7.recyclerview.extensions.ListAdapter; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.ListAdapter; +import androidx.recyclerview.widget.RecyclerView; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/interfaces/OnAvatarPublication.java b/src/main/java/de/pixart/messenger/ui/interfaces/OnAvatarPublication.java index 86df8d420..e4b04ea63 100644 --- a/src/main/java/de/pixart/messenger/ui/interfaces/OnAvatarPublication.java +++ b/src/main/java/de/pixart/messenger/ui/interfaces/OnAvatarPublication.java @@ -28,7 +28,7 @@ */ package de.pixart.messenger.ui.interfaces; -import android.support.annotation.StringRes; +import androidx.annotation.StringRes; public interface OnAvatarPublication { diff --git a/src/main/java/de/pixart/messenger/ui/text/QuoteSpan.java b/src/main/java/de/pixart/messenger/ui/text/QuoteSpan.java index e4cd5f2b5..77c638f84 100644 --- a/src/main/java/de/pixart/messenger/ui/text/QuoteSpan.java +++ b/src/main/java/de/pixart/messenger/ui/text/QuoteSpan.java @@ -2,7 +2,7 @@ package de.pixart.messenger.ui.text; import android.graphics.Canvas; import android.graphics.Paint; -import android.support.annotation.ColorInt; +import androidx.annotation.ColorInt; import android.text.Layout; import android.text.TextPaint; import android.text.style.CharacterStyle; diff --git a/src/main/java/de/pixart/messenger/ui/util/AvatarWorkerTask.java b/src/main/java/de/pixart/messenger/ui/util/AvatarWorkerTask.java index afddb7e8b..54cb3c2a1 100644 --- a/src/main/java/de/pixart/messenger/ui/util/AvatarWorkerTask.java +++ b/src/main/java/de/pixart/messenger/ui/util/AvatarWorkerTask.java @@ -5,7 +5,7 @@ import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.AsyncTask; -import android.support.annotation.DimenRes; +import androidx.annotation.DimenRes; import android.widget.ImageView; import java.lang.ref.WeakReference; diff --git a/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java b/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java index 07a03fbab..39fc09241 100644 --- a/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java +++ b/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java @@ -31,7 +31,7 @@ package de.pixart.messenger.ui.util; import android.content.Context; import android.content.pm.PackageManager; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.Menu; import android.view.MenuItem; diff --git a/src/main/java/de/pixart/messenger/ui/util/DelayedHintHelper.java b/src/main/java/de/pixart/messenger/ui/util/DelayedHintHelper.java index c289b6673..23da87a50 100644 --- a/src/main/java/de/pixart/messenger/ui/util/DelayedHintHelper.java +++ b/src/main/java/de/pixart/messenger/ui/util/DelayedHintHelper.java @@ -30,7 +30,7 @@ package de.pixart.messenger.ui.util; import android.os.Handler; -import android.support.annotation.StringRes; +import androidx.annotation.StringRes; import android.widget.EditText; public class DelayedHintHelper { diff --git a/src/main/java/de/pixart/messenger/ui/util/GridManager.java b/src/main/java/de/pixart/messenger/ui/util/GridManager.java index 9cad626ff..aa88e98d9 100644 --- a/src/main/java/de/pixart/messenger/ui/util/GridManager.java +++ b/src/main/java/de/pixart/messenger/ui/util/GridManager.java @@ -1,9 +1,9 @@ package de.pixart.messenger.ui.util; import android.content.Context; -import android.support.annotation.DimenRes; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.DimenRes; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.ViewTreeObserver; diff --git a/src/main/java/de/pixart/messenger/ui/util/JidDialog.java b/src/main/java/de/pixart/messenger/ui/util/JidDialog.java index 291bb873c..1101f7b70 100644 --- a/src/main/java/de/pixart/messenger/ui/util/JidDialog.java +++ b/src/main/java/de/pixart/messenger/ui/util/JidDialog.java @@ -1,7 +1,7 @@ package de.pixart.messenger.ui.util; import android.content.Context; -import android.support.annotation.StringRes; +import androidx.annotation.StringRes; import android.text.SpannableString; import android.text.Spanned; import android.text.style.TypefaceSpan; diff --git a/src/main/java/de/pixart/messenger/ui/util/MucConfiguration.java b/src/main/java/de/pixart/messenger/ui/util/MucConfiguration.java index 6c3235d5a..1d4f4168b 100644 --- a/src/main/java/de/pixart/messenger/ui/util/MucConfiguration.java +++ b/src/main/java/de/pixart/messenger/ui/util/MucConfiguration.java @@ -2,7 +2,7 @@ package de.pixart.messenger.ui.util; import android.content.Context; import android.os.Bundle; -import android.support.annotation.StringRes; +import androidx.annotation.StringRes; import de.pixart.messenger.R; import de.pixart.messenger.entities.MucOptions; diff --git a/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java b/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java index 2e01a6f7e..2abff6973 100644 --- a/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java +++ b/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java @@ -2,7 +2,7 @@ package de.pixart.messenger.ui.util; import android.app.Activity; import android.preference.PreferenceManager; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.text.SpannableString; import android.text.Spanned; import android.text.style.TypefaceSpan; diff --git a/src/main/java/de/pixart/messenger/ui/util/SoftKeyboardUtils.java b/src/main/java/de/pixart/messenger/ui/util/SoftKeyboardUtils.java index 86753ac4a..01da1080d 100644 --- a/src/main/java/de/pixart/messenger/ui/util/SoftKeyboardUtils.java +++ b/src/main/java/de/pixart/messenger/ui/util/SoftKeyboardUtils.java @@ -30,7 +30,7 @@ package de.pixart.messenger.ui.util; import android.app.Activity; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; diff --git a/src/main/java/de/pixart/messenger/ui/util/StyledAttributes.java b/src/main/java/de/pixart/messenger/ui/util/StyledAttributes.java index cd4ad3e49..9d627edd8 100644 --- a/src/main/java/de/pixart/messenger/ui/util/StyledAttributes.java +++ b/src/main/java/de/pixart/messenger/ui/util/StyledAttributes.java @@ -32,8 +32,8 @@ package de.pixart.messenger.ui.util; import android.content.Context; import android.content.res.TypedArray; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorInt; +import androidx.annotation.AttrRes; +import androidx.annotation.ColorInt; public class StyledAttributes { public static android.graphics.drawable.Drawable getDrawable(Context context, @AttrRes int id) { diff --git a/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java b/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java index 683c65ec0..a6a85f884 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java +++ b/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java @@ -4,7 +4,7 @@ import android.annotation.SuppressLint; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; -import android.support.v7.widget.AppCompatTextView; +import androidx.appcompat.widget.AppCompatTextView; import android.util.AttributeSet; @SuppressLint("AppCompatCustomView") diff --git a/src/main/java/de/pixart/messenger/ui/widget/EditMessage.java b/src/main/java/de/pixart/messenger/ui/widget/EditMessage.java index ca61491a9..09bffad91 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/EditMessage.java +++ b/src/main/java/de/pixart/messenger/ui/widget/EditMessage.java @@ -6,9 +6,9 @@ import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; -import android.support.v13.view.inputmethod.EditorInfoCompat; -import android.support.v13.view.inputmethod.InputConnectionCompat; -import android.support.v13.view.inputmethod.InputContentInfoCompat; +import androidx.core.view.inputmethod.EditorInfoCompat; +import androidx.core.view.inputmethod.InputConnectionCompat; +import androidx.core.view.inputmethod.InputContentInfoCompat; import android.text.Editable; import android.text.InputFilter; import android.text.InputType; diff --git a/src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java b/src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java index 38ce53299..7d4a06b28 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java +++ b/src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java @@ -1,7 +1,7 @@ package de.pixart.messenger.ui.widget; import android.content.Context; -import android.support.text.emoji.widget.EmojiAppCompatEditText; +import androidx.emoji.widget.EmojiAppCompatEditText; import android.util.AttributeSet; public class EmojiWrapperEditText extends EmojiAppCompatEditText { diff --git a/src/main/java/de/pixart/messenger/ui/widget/FailedCountCustomView.java b/src/main/java/de/pixart/messenger/ui/widget/FailedCountCustomView.java index 261ace3a4..366b75c10 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/FailedCountCustomView.java +++ b/src/main/java/de/pixart/messenger/ui/widget/FailedCountCustomView.java @@ -6,7 +6,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Typeface; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.util.AttributeSet; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/ui/widget/ImmediateAutoCompleteTextView.java b/src/main/java/de/pixart/messenger/ui/widget/ImmediateAutoCompleteTextView.java index 3cdfffabe..fb5a0391e 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/ImmediateAutoCompleteTextView.java +++ b/src/main/java/de/pixart/messenger/ui/widget/ImmediateAutoCompleteTextView.java @@ -31,7 +31,7 @@ package de.pixart.messenger.ui.widget; import android.content.Context; import android.util.AttributeSet; -public class ImmediateAutoCompleteTextView extends android.support.v7.widget.AppCompatAutoCompleteTextView { +public class ImmediateAutoCompleteTextView extends androidx.appcompat.widget.AppCompatAutoCompleteTextView { public ImmediateAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); diff --git a/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java b/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java index bffc48473..c27b08cf2 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java +++ b/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java @@ -5,9 +5,8 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Build; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.AttributeSet; -import android.util.DisplayMetrics; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; diff --git a/src/main/java/de/pixart/messenger/ui/widget/TextInputEditText.java b/src/main/java/de/pixart/messenger/ui/widget/TextInputEditText.java index 51ad578df..62f384d90 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/TextInputEditText.java +++ b/src/main/java/de/pixart/messenger/ui/widget/TextInputEditText.java @@ -11,7 +11,7 @@ import java.lang.reflect.Field; * A wrapper class to fix some weird fuck ups on Meizu devices * credit goes to the people in this thread https://github.com/android-in-china/Compatibility/issues/11 */ -public class TextInputEditText extends android.support.design.widget.TextInputEditText { +public class TextInputEditText extends com.google.android.material.textfield.TextInputEditText { public TextInputEditText(Context context) { super(context); diff --git a/src/main/java/de/pixart/messenger/ui/widget/UnreadCountCustomView.java b/src/main/java/de/pixart/messenger/ui/widget/UnreadCountCustomView.java index 93cf0bd36..ae6c968f9 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/UnreadCountCustomView.java +++ b/src/main/java/de/pixart/messenger/ui/widget/UnreadCountCustomView.java @@ -6,7 +6,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Typeface; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.util.AttributeSet; import android.view.View; diff --git a/src/main/java/de/pixart/messenger/utils/Compatibility.java b/src/main/java/de/pixart/messenger/utils/Compatibility.java index a57835101..38e331638 100644 --- a/src/main/java/de/pixart/messenger/utils/Compatibility.java +++ b/src/main/java/de/pixart/messenger/utils/Compatibility.java @@ -10,8 +10,8 @@ import android.preference.Preference; import android.preference.PreferenceCategory; import android.preference.PreferenceManager; import android.preference.PreferenceScreen; -import android.support.annotation.BoolRes; -import android.support.v4.content.ContextCompat; +import androidx.annotation.BoolRes; +import androidx.core.content.ContextCompat; import android.util.Log; import java.util.Arrays; diff --git a/src/main/java/de/pixart/messenger/utils/EmojiWrapper.java b/src/main/java/de/pixart/messenger/utils/EmojiWrapper.java index d30c68a97..e6725e744 100644 --- a/src/main/java/de/pixart/messenger/utils/EmojiWrapper.java +++ b/src/main/java/de/pixart/messenger/utils/EmojiWrapper.java @@ -28,7 +28,7 @@ */ package de.pixart.messenger.utils; -import android.support.text.emoji.EmojiCompat; +import androidx.emoji.text.EmojiCompat; public class EmojiWrapper { diff --git a/src/main/java/de/pixart/messenger/utils/ExceptionHelper.java b/src/main/java/de/pixart/messenger/utils/ExceptionHelper.java index 428aa616e..0cdf2a26d 100644 --- a/src/main/java/de/pixart/messenger/utils/ExceptionHelper.java +++ b/src/main/java/de/pixart/messenger/utils/ExceptionHelper.java @@ -7,7 +7,7 @@ import android.content.pm.PackageManager; import android.content.pm.Signature; import android.os.Build; import android.preference.PreferenceManager; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import java.io.BufferedReader; diff --git a/src/main/java/de/pixart/messenger/utils/IrregularUnicodeDetector.java b/src/main/java/de/pixart/messenger/utils/IrregularUnicodeDetector.java index 3775494e7..170b7e994 100644 --- a/src/main/java/de/pixart/messenger/utils/IrregularUnicodeDetector.java +++ b/src/main/java/de/pixart/messenger/utils/IrregularUnicodeDetector.java @@ -32,7 +32,7 @@ package de.pixart.messenger.utils; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; -import android.support.annotation.ColorInt; +import androidx.annotation.ColorInt; import android.text.Spannable; import android.text.SpannableString; import android.text.SpannableStringBuilder; diff --git a/src/main/java/de/pixart/messenger/utils/Resolver.java b/src/main/java/de/pixart/messenger/utils/Resolver.java index 9d2d90838..30caa3a4a 100644 --- a/src/main/java/de/pixart/messenger/utils/Resolver.java +++ b/src/main/java/de/pixart/messenger/utils/Resolver.java @@ -2,7 +2,7 @@ package de.pixart.messenger.utils; import android.content.ContentValues; import android.database.Cursor; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import java.io.IOException; diff --git a/src/main/java/de/pixart/messenger/utils/SSLSocketHelper.java b/src/main/java/de/pixart/messenger/utils/SSLSocketHelper.java index ce8aa009f..0a1ea6801 100644 --- a/src/main/java/de/pixart/messenger/utils/SSLSocketHelper.java +++ b/src/main/java/de/pixart/messenger/utils/SSLSocketHelper.java @@ -1,7 +1,7 @@ package de.pixart.messenger.utils; import android.os.Build; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; import org.conscrypt.Conscrypt; diff --git a/src/main/java/de/pixart/messenger/utils/StylingHelper.java b/src/main/java/de/pixart/messenger/utils/StylingHelper.java index be430e584..7901c0c94 100644 --- a/src/main/java/de/pixart/messenger/utils/StylingHelper.java +++ b/src/main/java/de/pixart/messenger/utils/StylingHelper.java @@ -32,8 +32,8 @@ package de.pixart.messenger.utils; import android.content.Context; import android.graphics.Color; import android.graphics.Typeface; -import android.support.annotation.ColorInt; -import android.support.v4.content.ContextCompat; +import androidx.annotation.ColorInt; +import androidx.core.content.ContextCompat; import android.text.Editable; import android.text.ParcelableSpan; import android.text.Spannable; diff --git a/src/main/java/de/pixart/messenger/utils/ThemeHelper.java b/src/main/java/de/pixart/messenger/utils/ThemeHelper.java index b83631623..b73559529 100644 --- a/src/main/java/de/pixart/messenger/utils/ThemeHelper.java +++ b/src/main/java/de/pixart/messenger/utils/ThemeHelper.java @@ -35,9 +35,9 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.TypedArray; import android.preference.PreferenceManager; -import android.support.annotation.StyleRes; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; +import androidx.annotation.StyleRes; +import com.google.android.material.snackbar.Snackbar; +import androidx.core.content.ContextCompat; import android.util.TypedValue; import android.widget.TextView; @@ -112,8 +112,8 @@ public class ThemeHelper { final float size = typedArray.getDimension(0, 0f); typedArray.recycle(); if (size != 0f) { - final TextView text = snackbar.getView().findViewById(android.support.design.R.id.snackbar_text); - final TextView action = snackbar.getView().findViewById(android.support.design.R.id.snackbar_action); + final TextView text = snackbar.getView().findViewById(com.google.android.material.R.id.snackbar_text); + final TextView action = snackbar.getView().findViewById(com.google.android.material.R.id.snackbar_action); if (text != null && action != null) { text.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); action.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); diff --git a/src/main/java/de/pixart/messenger/utils/TimeframeUtils.java b/src/main/java/de/pixart/messenger/utils/TimeframeUtils.java index 316733b54..3301ddf70 100644 --- a/src/main/java/de/pixart/messenger/utils/TimeframeUtils.java +++ b/src/main/java/de/pixart/messenger/utils/TimeframeUtils.java @@ -29,7 +29,7 @@ package de.pixart.messenger.utils; import android.content.Context; -import android.support.annotation.PluralsRes; +import androidx.annotation.PluralsRes; import de.pixart.messenger.R; diff --git a/src/main/java/de/pixart/messenger/utils/UIHelper.java b/src/main/java/de/pixart/messenger/utils/UIHelper.java index 590085ff5..102848183 100644 --- a/src/main/java/de/pixart/messenger/utils/UIHelper.java +++ b/src/main/java/de/pixart/messenger/utils/UIHelper.java @@ -1,7 +1,7 @@ package de.pixart.messenger.utils; import android.content.Context; -import android.support.annotation.ColorInt; +import androidx.annotation.ColorInt; import android.text.SpannableStringBuilder; import android.text.format.DateFormat; import android.text.format.DateUtils; diff --git a/src/main/java/de/pixart/messenger/xml/Element.java b/src/main/java/de/pixart/messenger/xml/Element.java index 052dd7947..8cab1de79 100644 --- a/src/main/java/de/pixart/messenger/xml/Element.java +++ b/src/main/java/de/pixart/messenger/xml/Element.java @@ -1,12 +1,10 @@ package de.pixart.messenger.xml; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.ArrayList; -import java.util.HashMap; import java.util.Hashtable; import java.util.List; -import java.util.Locale; import de.pixart.messenger.utils.XmlHelper; import de.pixart.messenger.xmpp.InvalidJid; diff --git a/src/main/java/de/pixart/messenger/xmpp/InvalidJid.java b/src/main/java/de/pixart/messenger/xmpp/InvalidJid.java index fdaadeab2..624e6b463 100644 --- a/src/main/java/de/pixart/messenger/xmpp/InvalidJid.java +++ b/src/main/java/de/pixart/messenger/xmpp/InvalidJid.java @@ -29,7 +29,7 @@ package de.pixart.messenger.xmpp; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import de.pixart.messenger.xmpp.stanzas.AbstractStanza; import rocks.xmpp.addr.Jid; diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index 571297851..1445b9b67 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -5,7 +5,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.SystemClock; import android.security.KeyChain; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Base64; import android.util.Log; import android.util.Pair; diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml index e3f3d99e1..6c9c93955 100644 --- a/src/main/res/layout/account_row.xml +++ b/src/main/res/layout/account_row.xml @@ -48,7 +48,7 @@ android:textAppearance="@style/TextAppearance.Conversations.Body2" /> - - - + - - + - - + diff --git a/src/main/res/layout/activity_change_password.xml b/src/main/res/layout/activity_change_password.xml index 1b0768d12..033b929eb 100644 --- a/src/main/res/layout/activity_change_password.xml +++ b/src/main/res/layout/activity_change_password.xml @@ -13,7 +13,7 @@ android:layout_above="@+id/button_bar" android:layout_below="@id/toolbar"> - - - + - - + - + - - - + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> + \ No newline at end of file diff --git a/src/main/res/layout/activity_choose_contact.xml b/src/main/res/layout/activity_choose_contact.xml index 3a67e86fd..c8b57eae2 100644 --- a/src/main/res/layout/activity_choose_contact.xml +++ b/src/main/res/layout/activity_choose_contact.xml @@ -22,7 +22,7 @@ android:divider="@android:color/transparent" android:dividerHeight="0dp" /> - - - + - - + - - - + - - + diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index f8965ee81..fd2cb6b3a 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -25,7 +25,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - - + - - + - - + - - + - + - - + - - + - - + diff --git a/src/main/res/layout/activity_import_backup.xml b/src/main/res/layout/activity_import_backup.xml index 996b9835a..f1eb37430 100644 --- a/src/main/res/layout/activity_import_backup.xml +++ b/src/main/res/layout/activity_import_backup.xml @@ -26,19 +26,19 @@ android:layout_gravity="center" /> - - + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> - + \ No newline at end of file diff --git a/src/main/res/layout/activity_media_browser.xml b/src/main/res/layout/activity_media_browser.xml index 809fc2911..fd6446d61 100644 --- a/src/main/res/layout/activity_media_browser.xml +++ b/src/main/res/layout/activity_media_browser.xml @@ -11,7 +11,7 @@ android:id="@+id/toolbar" layout="@layout/toolbar" /> - - - - + - - + @@ -300,9 +300,9 @@ android:visibility="gone" /> - + - - + - - - + - - - + diff --git a/src/main/res/layout/activity_muc_users.xml b/src/main/res/layout/activity_muc_users.xml index 4601c262b..783d27ec7 100644 --- a/src/main/res/layout/activity_muc_users.xml +++ b/src/main/res/layout/activity_muc_users.xml @@ -14,21 +14,21 @@ layout="@layout/toolbar" /> - - - + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> + \ No newline at end of file diff --git a/src/main/res/layout/activity_publish_profile_picture.xml b/src/main/res/layout/activity_publish_profile_picture.xml index 11ffac7c1..e04f77a4c 100644 --- a/src/main/res/layout/activity_publish_profile_picture.xml +++ b/src/main/res/layout/activity_publish_profile_picture.xml @@ -19,7 +19,7 @@ android:layout_above="@id/button_bar" android:layout_below="@id/toolbar"> - - + - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/main/res/layout/activity_share_with.xml b/src/main/res/layout/activity_share_with.xml index dec67bd81..24552ed70 100644 --- a/src/main/res/layout/activity_share_with.xml +++ b/src/main/res/layout/activity_share_with.xml @@ -7,7 +7,7 @@ - - - - - - + - - + - - - + \ No newline at end of file diff --git a/src/main/res/layout/create_public_channel_dialog.xml b/src/main/res/layout/create_public_channel_dialog.xml index 457f9c010..7fa853599 100644 --- a/src/main/res/layout/create_public_channel_dialog.xml +++ b/src/main/res/layout/create_public_channel_dialog.xml @@ -20,7 +20,7 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" /> - - + - - + \ No newline at end of file diff --git a/src/main/res/layout/dialog_enter_password.xml b/src/main/res/layout/dialog_enter_password.xml index 935ebad6c..8a3e40061 100644 --- a/src/main/res/layout/dialog_enter_password.xml +++ b/src/main/res/layout/dialog_enter_password.xml @@ -22,7 +22,7 @@ android:text="@string/restore_warning" android:textAppearance="@style/TextAppearance.Conversations.Body1" /> - - + \ No newline at end of file diff --git a/src/main/res/layout/dialog_join_conference.xml b/src/main/res/layout/dialog_join_conference.xml index 3d8478a34..6f1511102 100644 --- a/src/main/res/layout/dialog_join_conference.xml +++ b/src/main/res/layout/dialog_join_conference.xml @@ -27,7 +27,7 @@ android:layout_height="wrap_content" android:visibility="gone" /> - - + - - + \ No newline at end of file diff --git a/src/main/res/layout/dialog_quickedit.xml b/src/main/res/layout/dialog_quickedit.xml index b309bc173..26b0d4c54 100644 --- a/src/main/res/layout/dialog_quickedit.xml +++ b/src/main/res/layout/dialog_quickedit.xml @@ -8,7 +8,7 @@ android:orientation="vertical" android:padding="?dialogPreferredPadding"> - - + \ No newline at end of file diff --git a/src/main/res/layout/enter_jid_dialog.xml b/src/main/res/layout/enter_jid_dialog.xml index 0a0b462c5..aa14ae129 100644 --- a/src/main/res/layout/enter_jid_dialog.xml +++ b/src/main/res/layout/enter_jid_dialog.xml @@ -27,7 +27,7 @@ android:layout_height="wrap_content" android:visibility="gone" /> - - + \ No newline at end of file diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml index c3f42855d..46019a289 100644 --- a/src/main/res/layout/fragment_conversation.xml +++ b/src/main/res/layout/fragment_conversation.xml @@ -24,7 +24,7 @@ android:transcriptMode="normal" tools:listitem="@layout/message_sent" /> - - - - - - + \ No newline at end of file diff --git a/src/main/res/layout/keys_card.xml b/src/main/res/layout/keys_card.xml index 126d06b1f..b53f7d30e 100644 --- a/src/main/res/layout/keys_card.xml +++ b/src/main/res/layout/keys_card.xml @@ -1,7 +1,7 @@ - - + \ No newline at end of file diff --git a/src/main/res/layout/toolbar.xml b/src/main/res/layout/toolbar.xml index e9782393f..77d98bd91 100644 --- a/src/main/res/layout/toolbar.xml +++ b/src/main/res/layout/toolbar.xml @@ -1,5 +1,5 @@ -