diff --git a/app/src/main/java/com/nextcloud/talk/activities/BaseActivity.java b/app/src/main/java/com/nextcloud/talk/activities/BaseActivity.java index 7fe727da5..9bce0a9c2 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/BaseActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/BaseActivity.java @@ -26,7 +26,6 @@ import android.util.Log; import android.webkit.SslErrorHandler; import com.nextcloud.talk.R; - import com.nextcloud.talk.application.NextcloudTalkApplication; import com.nextcloud.talk.events.CertificateEvent; import com.nextcloud.talk.utils.ssl.MagicTrustManager; diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/AdvancedUserItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/AdvancedUserItem.java index 9ba0215cc..decaf9376 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/AdvancedUserItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/AdvancedUserItem.java @@ -21,7 +21,6 @@ package com.nextcloud.talk.adapters.items; import android.accounts.Account; -import androidx.annotation.Nullable; import android.view.View; import android.widget.ImageButton; import android.widget.ImageView; @@ -45,6 +44,7 @@ import org.apache.commons.lang3.StringUtils; import java.util.List; +import androidx.annotation.Nullable; import butterknife.BindView; import butterknife.ButterKnife; import eu.davidea.flexibleadapter.FlexibleAdapter; diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/AppItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/AppItem.java index 584569912..1fb6d1717 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/AppItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/AppItem.java @@ -21,7 +21,6 @@ package com.nextcloud.talk.adapters.items; import android.graphics.drawable.Drawable; -import androidx.annotation.Nullable; import android.text.Spannable; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; @@ -34,6 +33,7 @@ import com.nextcloud.talk.application.NextcloudTalkApplication; import java.util.List; +import androidx.annotation.Nullable; import butterknife.BindView; import butterknife.ButterKnife; import eu.davidea.flexibleadapter.FlexibleAdapter; diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/ProgressItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/ProgressItem.java index b9817a936..56c954f7d 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/ProgressItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/ProgressItem.java @@ -26,7 +26,6 @@ package com.nextcloud.talk.adapters.items; import android.animation.Animator; import android.content.Context; -import androidx.annotation.NonNull; import android.view.View; import android.widget.ProgressBar; import android.widget.TextView; @@ -35,6 +34,7 @@ import com.nextcloud.talk.R; import java.util.List; +import androidx.annotation.NonNull; import butterknife.BindView; import butterknife.ButterKnife; import eu.davidea.flexibleadapter.FlexibleAdapter; diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicIncomingTextMessageViewHolder.java b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicIncomingTextMessageViewHolder.java index 58f8e7243..c04cc8df2 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicIncomingTextMessageViewHolder.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicIncomingTextMessageViewHolder.java @@ -25,7 +25,6 @@ import android.content.Intent; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.net.Uri; -import androidx.core.view.ViewCompat; import android.text.Spannable; import android.text.SpannableString; import android.text.TextUtils; @@ -50,6 +49,7 @@ import java.util.Map; import javax.inject.Inject; +import androidx.core.view.ViewCompat; import autodagger.AutoInjector; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicOutcomingTextMessageViewHolder.java b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicOutcomingTextMessageViewHolder.java index 158120135..bb76a5b74 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicOutcomingTextMessageViewHolder.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicOutcomingTextMessageViewHolder.java @@ -25,7 +25,6 @@ import android.content.Intent; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.net.Uri; -import androidx.core.view.ViewCompat; import android.text.Spannable; import android.text.SpannableString; import android.text.style.RelativeSizeSpan; @@ -47,6 +46,7 @@ import java.util.Map; import javax.inject.Inject; +import androidx.core.view.ViewCompat; import autodagger.AutoInjector; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicSystemMessageViewHolder.java b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicSystemMessageViewHolder.java index c3f39a64d..acda3e14e 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicSystemMessageViewHolder.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicSystemMessageViewHolder.java @@ -21,11 +21,8 @@ package com.nextcloud.talk.adapters.messages; import android.content.Context; -import android.content.Intent; import android.content.res.Resources; import android.graphics.drawable.Drawable; -import android.net.Uri; -import androidx.core.view.ViewCompat; import android.text.Spannable; import android.text.SpannableString; import android.view.View; @@ -38,6 +35,8 @@ import com.stfalcon.chatkit.messages.MessageHolders; import java.util.Map; +import androidx.core.view.ViewCompat; + public class MagicSystemMessageViewHolder extends MessageHolders.IncomingTextMessageViewHolder { public MagicSystemMessageViewHolder(View itemView) { diff --git a/app/src/main/java/com/nextcloud/talk/api/NcApi.java b/app/src/main/java/com/nextcloud/talk/api/NcApi.java index 9631b103c..d0400baea 100644 --- a/app/src/main/java/com/nextcloud/talk/api/NcApi.java +++ b/app/src/main/java/com/nextcloud/talk/api/NcApi.java @@ -20,8 +20,6 @@ */ package com.nextcloud.talk.api; -import androidx.annotation.Nullable; - import com.nextcloud.talk.models.json.call.CallOverall; import com.nextcloud.talk.models.json.capabilities.CapabilitiesOverall; import com.nextcloud.talk.models.json.chat.ChatOverall; @@ -34,7 +32,6 @@ import com.nextcloud.talk.models.json.participants.ParticipantsOverall; import com.nextcloud.talk.models.json.push.PushRegistrationOverall; import com.nextcloud.talk.models.json.rooms.RoomOverall; import com.nextcloud.talk.models.json.rooms.RoomsOverall; -import com.nextcloud.talk.models.json.sharees.ShareesOverall; import com.nextcloud.talk.models.json.signaling.SignalingOverall; import com.nextcloud.talk.models.json.signaling.settings.SignalingSettingsOverall; import com.nextcloud.talk.models.json.userprofile.UserProfileOverall; @@ -42,6 +39,7 @@ import com.nextcloud.talk.models.json.userprofile.UserProfileOverall; import java.util.List; import java.util.Map; +import androidx.annotation.Nullable; import io.reactivex.Observable; import okhttp3.ResponseBody; import retrofit2.Response; diff --git a/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java b/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java index 3edde4cc6..a24e7b9d6 100644 --- a/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java +++ b/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java @@ -20,12 +20,8 @@ */ package com.nextcloud.talk.application; -import androidx.lifecycle.LifecycleObserver; - import android.content.Context; import android.os.Build; -import androidx.multidex.MultiDex; -import androidx.multidex.MultiDexApplication; import android.util.Log; import com.nextcloud.talk.dagger.modules.BusModule; @@ -49,6 +45,9 @@ import java.util.concurrent.TimeUnit; import javax.inject.Singleton; +import androidx.lifecycle.LifecycleObserver; +import androidx.multidex.MultiDex; +import androidx.multidex.MultiDexApplication; import androidx.work.Configuration; import androidx.work.OneTimeWorkRequest; import androidx.work.PeriodicWorkRequest; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.java b/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.java index b3e23d9d5..d0ed781f5 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.java @@ -23,7 +23,6 @@ package com.nextcloud.talk.controllers; import android.content.pm.ActivityInfo; import android.os.Bundle; import android.os.Handler; -import androidx.annotation.NonNull; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -60,6 +59,7 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; import androidx.work.Data; import androidx.work.OneTimeWorkRequest; import androidx.work.WorkManager; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/CallController.java b/app/src/main/java/com/nextcloud/talk/controllers/CallController.java index ec28f1789..26a5334aa 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/CallController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/CallController.java @@ -29,11 +29,6 @@ import android.graphics.Color; import android.os.Build; import android.os.Bundle; import android.os.Handler; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatActivity; - import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -128,6 +123,9 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; import autodagger.AutoInjector; import butterknife.BindView; import butterknife.OnClick; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java b/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java index 182079c93..6647238b5 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java @@ -37,9 +37,6 @@ import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.ScriptIntrinsicBlur; -import androidx.annotation.NonNull; -import androidx.constraintlayout.widget.ConstraintLayout; -import androidx.palette.graphics.Palette; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -90,6 +87,9 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.constraintlayout.widget.ConstraintLayout; +import androidx.palette.graphics.Palette; import autodagger.AutoInjector; import butterknife.BindView; import butterknife.OnClick; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java index 7895b6cbe..0e3615e27 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java @@ -31,10 +31,6 @@ import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -111,6 +107,10 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import autodagger.AutoInjector; import butterknife.BindView; import butterknife.OnClick; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java b/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java index b2c38f49f..6f3f9a546 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java @@ -25,15 +25,6 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Handler; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.bluelinelabs.logansquare.LoganSquare; -import com.google.android.material.bottomnavigation.BottomNavigationView; -import androidx.core.view.MenuItemCompat; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import androidx.recyclerview.widget.RecyclerView; -import androidx.appcompat.widget.SearchView; import android.text.InputType; import android.text.TextUtils; import android.util.Log; @@ -50,6 +41,8 @@ import android.widget.RelativeLayout; import com.bluelinelabs.conductor.RouterTransaction; import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler; import com.bluelinelabs.conductor.changehandler.VerticalChangeHandler; +import com.bluelinelabs.logansquare.LoganSquare; +import com.google.android.material.bottomnavigation.BottomNavigationView; import com.kennyc.bottomsheet.BottomSheet; import com.nextcloud.talk.R; import com.nextcloud.talk.activities.MagicCallActivity; @@ -89,6 +82,12 @@ import java.util.Set; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.SearchView; +import androidx.core.view.MenuItemCompat; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import autodagger.AutoInjector; import butterknife.BindView; import butterknife.OnClick; @@ -106,7 +105,6 @@ import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; import okhttp3.ResponseBody; import retrofit2.HttpException; -import retrofit2.Response; @AutoInjector(NextcloudTalkApplication.class) public class ContactsController extends BaseController implements SearchView.OnQueryTextListener, @@ -569,12 +567,11 @@ public class ContactsController extends BaseController implements SearchView.OnQ canFetchFurther = !shareeHashSet.isEmpty() || (finalServerIs14OrUp && !autocompleteUsersHashSet.isEmpty()); currentPage = (int) modifiedQueryMap.get("page"); } else { - canFetchSearchFurther = !shareeHashSet.isEmpty() || (finalServerIs14OrUp && !autocompleteUsersHashSet.isEmpty()) ; + canFetchSearchFurther = !shareeHashSet.isEmpty() || (finalServerIs14OrUp && !autocompleteUsersHashSet.isEmpty()); currentSearchPage = (int) modifiedQueryMap.get("page"); } - boolean shouldFilterManually = false; if (newUserItemList.size() == contactItems.size()) { shouldFilterManually = true; @@ -851,8 +848,14 @@ public class ContactsController extends BaseController implements SearchView.OnQ if (adapter.getItem(position) instanceof UserItem) { if (!isNewConversationView) { UserItem userItem = (UserItem) adapter.getItem(position); - RetrofitBucket retrofitBucket = ApiUtils.getRetrofitBucketForCreateRoom(currentUser.getBaseUrl(), "1", - userItem.getModel().getUserId(), null); + String roomType = "1"; + + if ("groups".equals(userItem.getModel().getSource())) { + roomType = "2"; + } + + RetrofitBucket retrofitBucket = ApiUtils.getRetrofitBucketForCreateRoom(currentUser.getBaseUrl(), roomType, userItem.getModel().getUserId(), null); + ncApi.createRoom(credentials, retrofitBucket.getUrl(), retrofitBucket.getQueryMap()) .subscribeOn(Schedulers.newThread()) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java b/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java index 77bddd053..0833631e5 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java @@ -25,14 +25,6 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Handler; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import com.google.android.material.bottomnavigation.BottomNavigationView; -import androidx.core.view.MenuItemCompat; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.RecyclerView; -import androidx.appcompat.widget.SearchView; import android.text.InputType; import android.text.TextUtils; import android.view.LayoutInflater; @@ -50,6 +42,7 @@ import com.bluelinelabs.conductor.RouterTransaction; import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler; import com.bluelinelabs.conductor.changehandler.VerticalChangeHandler; import com.bluelinelabs.conductor.internal.NoOpControllerChangeHandler; +import com.google.android.material.bottomnavigation.BottomNavigationView; import com.kennyc.bottomsheet.BottomSheet; import com.nextcloud.talk.R; import com.nextcloud.talk.activities.MagicCallActivity; @@ -82,6 +75,13 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.SearchView; +import androidx.core.view.MenuItemCompat; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import autodagger.AutoInjector; import butterknife.BindView; import eu.davidea.fastscroller.FastScroller; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/MagicBottomNavigationController.java b/app/src/main/java/com/nextcloud/talk/controllers/MagicBottomNavigationController.java index 47520bf91..595ff26a3 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/MagicBottomNavigationController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/MagicBottomNavigationController.java @@ -24,8 +24,6 @@ package com.nextcloud.talk.controllers; -import androidx.annotation.IdRes; - import com.bluelinelabs.conductor.Controller; import com.nextcloud.talk.R; import com.nextcloud.talk.controllers.base.bottomnavigation.BottomNavigationController; @@ -33,6 +31,8 @@ import com.nextcloud.talk.controllers.base.bottomnavigation.BottomNavigationMenu import java.lang.reflect.Constructor; +import androidx.annotation.IdRes; + public class MagicBottomNavigationController extends BottomNavigationController { public MagicBottomNavigationController() { diff --git a/app/src/main/java/com/nextcloud/talk/controllers/RingtoneSelectionController.java b/app/src/main/java/com/nextcloud/talk/controllers/RingtoneSelectionController.java index 72c29efbf..0ec36631e 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/RingtoneSelectionController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/RingtoneSelectionController.java @@ -27,9 +27,6 @@ import android.media.RingtoneManager; import android.net.Uri; import android.os.Bundle; import android.os.Handler; -import androidx.annotation.NonNull; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -52,6 +49,9 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import autodagger.AutoInjector; import butterknife.BindView; import eu.davidea.flexibleadapter.FlexibleAdapter; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java b/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java index 8f1983469..50384456b 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java @@ -26,7 +26,6 @@ import android.content.pm.ActivityInfo; import android.net.Uri; import android.os.Bundle; import android.security.KeyChain; -import androidx.annotation.NonNull; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; @@ -45,15 +44,16 @@ import com.nextcloud.talk.application.NextcloudTalkApplication; import com.nextcloud.talk.controllers.base.BaseController; import com.nextcloud.talk.utils.AccountUtils; import com.nextcloud.talk.utils.ApiUtils; -import com.nextcloud.talk.utils.singletons.ApplicationWideMessageHolder; import com.nextcloud.talk.utils.bundle.BundleKeys; import com.nextcloud.talk.utils.database.user.UserUtils; import com.nextcloud.talk.utils.preferences.AppPreferences; +import com.nextcloud.talk.utils.singletons.ApplicationWideMessageHolder; import java.security.cert.CertificateException; import javax.inject.Inject; +import androidx.annotation.NonNull; import autodagger.AutoInjector; import butterknife.BindView; import butterknife.OnClick; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/SettingsController.java b/app/src/main/java/com/nextcloud/talk/controllers/SettingsController.java index c9b8a8cfc..6b775be14 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/SettingsController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/SettingsController.java @@ -26,8 +26,6 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.security.KeyChain; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -81,6 +79,8 @@ import java.util.Objects; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.work.OneTimeWorkRequest; import androidx.work.WorkManager; import autodagger.AutoInjector; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/SwitchAccountController.java b/app/src/main/java/com/nextcloud/talk/controllers/SwitchAccountController.java index 1585c54f7..4fe9efda9 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/SwitchAccountController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/SwitchAccountController.java @@ -25,11 +25,6 @@ package com.nextcloud.talk.controllers; import android.accounts.Account; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; @@ -54,6 +49,11 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import autodagger.AutoInjector; import butterknife.BindView; import eu.davidea.flexibleadapter.FlexibleAdapter; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/WebViewLoginController.java b/app/src/main/java/com/nextcloud/talk/controllers/WebViewLoginController.java index 748211a73..3f2d10417 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/WebViewLoginController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/WebViewLoginController.java @@ -28,7 +28,6 @@ import android.os.Build; import android.os.Bundle; import android.security.KeyChain; import android.security.KeyChainException; -import androidx.annotation.NonNull; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -49,10 +48,10 @@ import com.nextcloud.talk.controllers.base.BaseController; import com.nextcloud.talk.events.CertificateEvent; import com.nextcloud.talk.models.LoginData; import com.nextcloud.talk.models.database.UserEntity; -import com.nextcloud.talk.utils.singletons.ApplicationWideMessageHolder; import com.nextcloud.talk.utils.bundle.BundleKeys; import com.nextcloud.talk.utils.database.user.UserUtils; import com.nextcloud.talk.utils.preferences.AppPreferences; +import com.nextcloud.talk.utils.singletons.ApplicationWideMessageHolder; import com.nextcloud.talk.utils.ssl.MagicTrustManager; import org.greenrobot.eventbus.EventBus; @@ -69,6 +68,7 @@ import java.util.Map; import javax.inject.Inject; +import androidx.annotation.NonNull; import autodagger.AutoInjector; import butterknife.BindView; import io.reactivex.disposables.Disposable; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/base/BaseController.java b/app/src/main/java/com/nextcloud/talk/controllers/base/BaseController.java index c4a176554..83a99e99b 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/base/BaseController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/base/BaseController.java @@ -19,8 +19,6 @@ package com.nextcloud.talk.controllers.base; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.appcompat.app.ActionBar; import android.util.Log; import android.view.View; @@ -39,6 +37,8 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; import autodagger.AutoInjector; @AutoInjector(NextcloudTalkApplication.class) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/base/ButterKnifeController.java b/app/src/main/java/com/nextcloud/talk/controllers/base/ButterKnifeController.java index 852b5c893..b3a746803 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/base/ButterKnifeController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/base/ButterKnifeController.java @@ -19,13 +19,13 @@ package com.nextcloud.talk.controllers.base; import android.os.Bundle; -import androidx.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.bluelinelabs.conductor.Controller; +import androidx.annotation.NonNull; import butterknife.ButterKnife; import butterknife.Unbinder; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationController.java b/app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationController.java index 7c60d0867..7698d713f 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationController.java @@ -25,10 +25,6 @@ package com.nextcloud.talk.controllers.base.bottomnavigation; import android.os.Bundle; -import androidx.annotation.MenuRes; -import androidx.annotation.NonNull; -import com.google.android.material.bottomnavigation.BottomNavigationView; -import androidx.coordinatorlayout.widget.CoordinatorLayout; import android.util.Log; import android.util.SparseArray; import android.view.LayoutInflater; @@ -42,11 +38,15 @@ import com.bluelinelabs.conductor.Controller; import com.bluelinelabs.conductor.Router; import com.bluelinelabs.conductor.RouterTransaction; import com.bluelinelabs.conductor.changehandler.FadeChangeHandler; +import com.google.android.material.bottomnavigation.BottomNavigationView; import com.nextcloud.talk.R; import com.nextcloud.talk.controllers.base.BaseController; import com.nextcloud.talk.utils.animations.ViewHidingBehaviourAnimation; import com.nextcloud.talk.utils.bundle.BundleBuilder; +import androidx.annotation.MenuRes; +import androidx.annotation.NonNull; +import androidx.coordinatorlayout.widget.CoordinatorLayout; import butterknife.BindView; /** diff --git a/app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationMenuItem.java b/app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationMenuItem.java index 375ee78ef..50f38c218 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationMenuItem.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationMenuItem.java @@ -24,15 +24,15 @@ package com.nextcloud.talk.controllers.base.bottomnavigation; -import androidx.annotation.IdRes; - import com.bluelinelabs.conductor.Controller; import com.nextcloud.talk.R; -import com.nextcloud.talk.controllers.ConversationsListController; import com.nextcloud.talk.controllers.ContactsController; +import com.nextcloud.talk.controllers.ConversationsListController; import com.nextcloud.talk.controllers.SettingsController; import com.nextcloud.talk.utils.BottomNavigationUtils; +import androidx.annotation.IdRes; + /** * Enum representation of valid Bottom Navigation Menu Items */ diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java index 65343525a..563c6a7b6 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java @@ -23,9 +23,6 @@ package com.nextcloud.talk.controllers.bottomsheet; import android.content.ComponentName; import android.content.Intent; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -57,6 +54,9 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import autodagger.AutoInjector; import butterknife.BindView; import eu.davidea.flexibleadapter.FlexibleAdapter; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java index 565855a9d..be25b3a2f 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java @@ -23,7 +23,6 @@ package com.nextcloud.talk.controllers.bottomsheet; import android.content.ComponentName; import android.content.Intent; import android.os.Bundle; -import androidx.annotation.NonNull; import android.text.Editable; import android.text.InputType; import android.text.TextUtils; @@ -41,16 +40,17 @@ import com.nextcloud.talk.application.NextcloudTalkApplication; import com.nextcloud.talk.controllers.base.BaseController; import com.nextcloud.talk.events.BottomSheetLockEvent; import com.nextcloud.talk.models.json.rooms.Conversation; -import com.nextcloud.talk.utils.singletons.ApplicationWideMessageHolder; import com.nextcloud.talk.utils.ShareUtils; import com.nextcloud.talk.utils.bundle.BundleKeys; import com.nextcloud.talk.utils.database.user.UserUtils; +import com.nextcloud.talk.utils.singletons.ApplicationWideMessageHolder; import org.greenrobot.eventbus.EventBus; import org.parceler.Parcels; import javax.inject.Inject; +import androidx.annotation.NonNull; import autodagger.AutoInjector; import butterknife.BindView; import butterknife.OnClick; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java index c2678530e..041016c24 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java @@ -25,8 +25,6 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Handler; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -69,6 +67,8 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import autodagger.AutoInjector; import butterknife.BindView; import io.reactivex.Observer; diff --git a/app/src/main/java/com/nextcloud/talk/dagger/modules/ContextModule.java b/app/src/main/java/com/nextcloud/talk/dagger/modules/ContextModule.java index a9c5e1945..56663c057 100644 --- a/app/src/main/java/com/nextcloud/talk/dagger/modules/ContextModule.java +++ b/app/src/main/java/com/nextcloud/talk/dagger/modules/ContextModule.java @@ -21,8 +21,8 @@ package com.nextcloud.talk.dagger.modules; import android.content.Context; -import androidx.annotation.NonNull; +import androidx.annotation.NonNull; import dagger.Module; import dagger.Provides; diff --git a/app/src/main/java/com/nextcloud/talk/dagger/modules/DatabaseModule.java b/app/src/main/java/com/nextcloud/talk/dagger/modules/DatabaseModule.java index edd11f474..dd3c370f9 100644 --- a/app/src/main/java/com/nextcloud/talk/dagger/modules/DatabaseModule.java +++ b/app/src/main/java/com/nextcloud/talk/dagger/modules/DatabaseModule.java @@ -21,7 +21,6 @@ package com.nextcloud.talk.dagger.modules; import android.content.Context; -import androidx.annotation.NonNull; import com.nextcloud.talk.R; import com.nextcloud.talk.models.database.Models; @@ -31,6 +30,7 @@ import net.orange_box.storebox.StoreBox; import javax.inject.Singleton; +import androidx.annotation.NonNull; import dagger.Module; import dagger.Provides; import io.requery.Persistable; diff --git a/app/src/main/java/com/nextcloud/talk/dagger/modules/RestModule.java b/app/src/main/java/com/nextcloud/talk/dagger/modules/RestModule.java index b5f441171..c7a6909ac 100644 --- a/app/src/main/java/com/nextcloud/talk/dagger/modules/RestModule.java +++ b/app/src/main/java/com/nextcloud/talk/dagger/modules/RestModule.java @@ -20,8 +20,6 @@ */ package com.nextcloud.talk.dagger.modules; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Log; @@ -52,6 +50,8 @@ import javax.inject.Singleton; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.X509KeyManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import dagger.Module; import dagger.Provides; import io.reactivex.schedulers.Schedulers; diff --git a/app/src/main/java/com/nextcloud/talk/events/CertificateEvent.java b/app/src/main/java/com/nextcloud/talk/events/CertificateEvent.java index 570541276..08d9bc43b 100644 --- a/app/src/main/java/com/nextcloud/talk/events/CertificateEvent.java +++ b/app/src/main/java/com/nextcloud/talk/events/CertificateEvent.java @@ -20,13 +20,14 @@ package com.nextcloud.talk.events; -import androidx.annotation.Nullable; import android.webkit.SslErrorHandler; import com.nextcloud.talk.utils.ssl.MagicTrustManager; import java.security.cert.X509Certificate; +import androidx.annotation.Nullable; + public class CertificateEvent { private final X509Certificate x509Certificate; private final MagicTrustManager magicTrustManager; diff --git a/app/src/main/java/com/nextcloud/talk/events/MediaStreamEvent.java b/app/src/main/java/com/nextcloud/talk/events/MediaStreamEvent.java index 3ebdbbc2b..a05f0c2b2 100644 --- a/app/src/main/java/com/nextcloud/talk/events/MediaStreamEvent.java +++ b/app/src/main/java/com/nextcloud/talk/events/MediaStreamEvent.java @@ -20,10 +20,9 @@ package com.nextcloud.talk.events; -import androidx.annotation.Nullable; - import org.webrtc.MediaStream; +import androidx.annotation.Nullable; import lombok.Data; @Data diff --git a/app/src/main/java/com/nextcloud/talk/events/PeerConnectionEvent.java b/app/src/main/java/com/nextcloud/talk/events/PeerConnectionEvent.java index 96218d7a9..ef2a42201 100644 --- a/app/src/main/java/com/nextcloud/talk/events/PeerConnectionEvent.java +++ b/app/src/main/java/com/nextcloud/talk/events/PeerConnectionEvent.java @@ -21,7 +21,6 @@ package com.nextcloud.talk.events; import androidx.annotation.Nullable; - import lombok.Data; @Data diff --git a/app/src/main/java/com/nextcloud/talk/events/SessionDescriptionSendEvent.java b/app/src/main/java/com/nextcloud/talk/events/SessionDescriptionSendEvent.java index 5ad7df492..204e73a9e 100644 --- a/app/src/main/java/com/nextcloud/talk/events/SessionDescriptionSendEvent.java +++ b/app/src/main/java/com/nextcloud/talk/events/SessionDescriptionSendEvent.java @@ -20,12 +20,11 @@ package com.nextcloud.talk.events; -import androidx.annotation.Nullable; - import com.nextcloud.talk.models.json.signaling.NCIceCandidate; import org.webrtc.SessionDescription; +import androidx.annotation.Nullable; import lombok.Data; @Data diff --git a/app/src/main/java/com/nextcloud/talk/jobs/AccountRemovalWorker.java b/app/src/main/java/com/nextcloud/talk/jobs/AccountRemovalWorker.java index 638d74694..561ca4d34 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/AccountRemovalWorker.java +++ b/app/src/main/java/com/nextcloud/talk/jobs/AccountRemovalWorker.java @@ -24,7 +24,6 @@ package com.nextcloud.talk.jobs; import android.app.NotificationManager; import android.content.Context; import android.os.Build; -import androidx.annotation.NonNull; import android.text.TextUtils; import android.util.Log; @@ -45,6 +44,7 @@ import java.util.zip.CRC32; import javax.inject.Inject; +import androidx.annotation.NonNull; import androidx.work.Worker; import autodagger.AutoInjector; import io.reactivex.CompletableObserver; diff --git a/app/src/main/java/com/nextcloud/talk/jobs/CapabilitiesWorker.java b/app/src/main/java/com/nextcloud/talk/jobs/CapabilitiesWorker.java index dcbbb768f..e0101b7b0 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/CapabilitiesWorker.java +++ b/app/src/main/java/com/nextcloud/talk/jobs/CapabilitiesWorker.java @@ -20,7 +20,6 @@ package com.nextcloud.talk.jobs; -import androidx.annotation.NonNull; import android.util.Log; import com.bluelinelabs.logansquare.LoganSquare; @@ -42,6 +41,7 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.NonNull; import androidx.work.Data; import androidx.work.Worker; import autodagger.AutoInjector; diff --git a/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java b/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java index cbfa90f6f..39e84a214 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java +++ b/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java @@ -34,7 +34,6 @@ import android.os.Build; import android.os.Bundle; import android.os.VibrationEffect; import android.os.Vibrator; -import androidx.annotation.NonNull; import android.text.TextUtils; import android.util.Base64; import android.util.Log; @@ -76,6 +75,7 @@ import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.inject.Inject; +import androidx.annotation.NonNull; import androidx.work.Data; import androidx.work.Worker; import autodagger.AutoInjector; diff --git a/app/src/main/java/com/nextcloud/talk/jobs/PushRegistrationWorker.java b/app/src/main/java/com/nextcloud/talk/jobs/PushRegistrationWorker.java index 1d6f98dba..625dda86a 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/PushRegistrationWorker.java +++ b/app/src/main/java/com/nextcloud/talk/jobs/PushRegistrationWorker.java @@ -20,10 +20,9 @@ package com.nextcloud.talk.jobs; -import androidx.annotation.NonNull; - import com.nextcloud.talk.utils.PushUtils; +import androidx.annotation.NonNull; import androidx.work.Worker; public class PushRegistrationWorker extends Worker { diff --git a/app/src/main/java/com/nextcloud/talk/models/ImportAccount.java b/app/src/main/java/com/nextcloud/talk/models/ImportAccount.java index 341c5ba37..b2f40f90e 100644 --- a/app/src/main/java/com/nextcloud/talk/models/ImportAccount.java +++ b/app/src/main/java/com/nextcloud/talk/models/ImportAccount.java @@ -21,7 +21,6 @@ package com.nextcloud.talk.models; import androidx.annotation.Nullable; - import lombok.Data; @Data diff --git a/app/src/main/java/com/nextcloud/talk/models/RingtoneSettings.java b/app/src/main/java/com/nextcloud/talk/models/RingtoneSettings.java index 2fbff8d67..4e3bb7770 100644 --- a/app/src/main/java/com/nextcloud/talk/models/RingtoneSettings.java +++ b/app/src/main/java/com/nextcloud/talk/models/RingtoneSettings.java @@ -21,7 +21,6 @@ package com.nextcloud.talk.models; import android.net.Uri; -import androidx.annotation.Nullable; import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonObject; @@ -29,6 +28,7 @@ import com.nextcloud.talk.models.json.converters.UriTypeConverter; import org.parceler.Parcel; +import androidx.annotation.Nullable; import lombok.Data; @Parcel diff --git a/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteOCS.java b/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteOCS.java index c426fca1e..5a44616d7 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteOCS.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteOCS.java @@ -23,7 +23,6 @@ package com.nextcloud.talk.models.json.autocomplete; import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonObject; import com.nextcloud.talk.models.json.generic.GenericOCS; -import com.nextcloud.talk.models.json.sharees.SharesData; import org.parceler.Parcel; diff --git a/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteOverall.java b/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteOverall.java index 97fbb1ac0..99ff016b1 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteOverall.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteOverall.java @@ -22,7 +22,6 @@ package com.nextcloud.talk.models.json.autocomplete; import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonObject; -import com.nextcloud.talk.models.json.sharees.ShareesOCS; import org.parceler.Parcel; diff --git a/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteUser.java b/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteUser.java index 1a6e5ac10..525ff0223 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteUser.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/autocomplete/AutocompleteUser.java @@ -22,7 +22,6 @@ package com.nextcloud.talk.models.json.autocomplete; import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonObject; -import com.nextcloud.talk.models.json.sharees.Value; import org.parceler.Parcel; diff --git a/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatMessage.java index 9ce801baa..abb59fcbc 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatMessage.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatMessage.java @@ -19,13 +19,10 @@ */ package com.nextcloud.talk.models.json.chat; -import android.util.Log; - import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonIgnore; import com.bluelinelabs.logansquare.annotation.JsonObject; import com.nextcloud.talk.R; -import com.nextcloud.talk.application.NextcloudTalkApplication; import com.nextcloud.talk.models.json.converters.EnumSystemMessageTypeConverter; import com.nextcloud.talk.utils.ApiUtils; import com.stfalcon.chatkit.commons.models.IMessage; diff --git a/app/src/main/java/com/nextcloud/talk/models/json/converters/EnumSystemMessageTypeConverter.java b/app/src/main/java/com/nextcloud/talk/models/json/converters/EnumSystemMessageTypeConverter.java index 59e1855f7..0e8b5349c 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/converters/EnumSystemMessageTypeConverter.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/converters/EnumSystemMessageTypeConverter.java @@ -23,7 +23,22 @@ package com.nextcloud.talk.models.json.converters; import com.bluelinelabs.logansquare.typeconverters.StringBasedTypeConverter; import com.nextcloud.talk.models.json.chat.ChatMessage; -import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.*; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.CALL_ENDED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.CALL_JOINED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.CALL_LEFT; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.CALL_STARTED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.CONVERSATION_CREATED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.CONVERSATION_RENAMED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.DUMMY; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.FILE_SHARED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.GUESTS_ALLOWED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.GUESTS_DISALLOWED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.MODERATOR_DEMOTED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.MODERATOR_PROMOTED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.PASSWORD_REMOVED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.PASSWORD_SET; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.USER_ADDED; +import static com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.USER_REMOVED; /* diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.java index eccf74412..36950c6b3 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.java @@ -22,7 +22,6 @@ package com.nextcloud.talk.models.json.websocket; import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonObject; -import com.nextcloud.talk.models.json.rooms.RoomOverall; import org.parceler.Parcel; diff --git a/app/src/main/java/com/nextcloud/talk/presenters/MentionAutocompletePresenter.java b/app/src/main/java/com/nextcloud/talk/presenters/MentionAutocompletePresenter.java index 9022b5e96..3c02b4832 100644 --- a/app/src/main/java/com/nextcloud/talk/presenters/MentionAutocompletePresenter.java +++ b/app/src/main/java/com/nextcloud/talk/presenters/MentionAutocompletePresenter.java @@ -21,8 +21,6 @@ package com.nextcloud.talk.presenters; import android.content.Context; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.view.View; @@ -41,6 +39,8 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import autodagger.AutoInjector; import eu.davidea.flexibleadapter.FlexibleAdapter; import eu.davidea.flexibleadapter.items.AbstractFlexibleItem; diff --git a/app/src/main/java/com/nextcloud/talk/utils/ApiUtils.java b/app/src/main/java/com/nextcloud/talk/utils/ApiUtils.java index 8c6e01c71..cf3d802bd 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/ApiUtils.java +++ b/app/src/main/java/com/nextcloud/talk/utils/ApiUtils.java @@ -20,19 +20,17 @@ package com.nextcloud.talk.utils; import android.net.Uri; -import androidx.annotation.DimenRes; -import androidx.annotation.Nullable; import com.nextcloud.talk.BuildConfig; import com.nextcloud.talk.R; import com.nextcloud.talk.application.NextcloudTalkApplication; import com.nextcloud.talk.models.RetrofitBucket; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; +import androidx.annotation.DimenRes; +import androidx.annotation.Nullable; import okhttp3.Credentials; public class ApiUtils { diff --git a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java index 603750f98..8422bf451 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java +++ b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java @@ -27,12 +27,6 @@ import android.content.res.Resources; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Build; -import androidx.annotation.ColorInt; -import androidx.annotation.ColorRes; -import androidx.annotation.DrawableRes; -import androidx.core.content.ContextCompat; -import androidx.core.graphics.drawable.DrawableCompat; -import androidx.appcompat.widget.AppCompatDrawableManager; import android.text.Spannable; import android.text.TextUtils; import android.text.style.AbsoluteSizeSpan; @@ -50,6 +44,13 @@ import java.lang.reflect.Method; import java.util.regex.Matcher; import java.util.regex.Pattern; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.appcompat.widget.AppCompatDrawableManager; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; + public class DisplayUtils { private static final String TAG = "DisplayUtils"; diff --git a/app/src/main/java/com/nextcloud/talk/utils/EmojiDetection.java b/app/src/main/java/com/nextcloud/talk/utils/EmojiDetection.java index 08afa08e5..af8314d56 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/EmojiDetection.java +++ b/app/src/main/java/com/nextcloud/talk/utils/EmojiDetection.java @@ -23,8 +23,6 @@ package com.nextcloud.talk.utils; import android.content.Context; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Log; @@ -37,6 +35,9 @@ import java.io.InputStreamReader; import java.util.regex.Matcher; import java.util.regex.Pattern; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + public final class EmojiDetection { private static final String TAG = "EmojiDetection"; diff --git a/app/src/main/java/com/nextcloud/talk/utils/ShareUtils.java b/app/src/main/java/com/nextcloud/talk/utils/ShareUtils.java index 5fcb0f8dd..2b1416422 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/ShareUtils.java +++ b/app/src/main/java/com/nextcloud/talk/utils/ShareUtils.java @@ -28,7 +28,6 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.graphics.drawable.Drawable; -import androidx.annotation.Nullable; import android.text.TextUtils; import com.kennyc.bottomsheet.adapters.AppAdapter; @@ -41,6 +40,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; +import androidx.annotation.Nullable; + public class ShareUtils { public static String getStringForIntent(Context context, @Nullable String password, UserUtils userUtils, Conversation diff --git a/app/src/main/java/com/nextcloud/talk/utils/animations/PulseAnimation.java b/app/src/main/java/com/nextcloud/talk/utils/animations/PulseAnimation.java index c3636dae7..d068f2fad 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/animations/PulseAnimation.java +++ b/app/src/main/java/com/nextcloud/talk/utils/animations/PulseAnimation.java @@ -26,9 +26,10 @@ package com.nextcloud.talk.utils.animations; import android.animation.ObjectAnimator; import android.animation.PropertyValuesHolder; import android.animation.ValueAnimator; -import androidx.annotation.NonNull; import android.view.View; +import androidx.annotation.NonNull; + public class PulseAnimation { public static final int RESTART = 1; diff --git a/app/src/main/java/com/nextcloud/talk/utils/animations/ViewHidingBehaviourAnimation.java b/app/src/main/java/com/nextcloud/talk/utils/animations/ViewHidingBehaviourAnimation.java index 0ad73d30b..beffd3419 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/animations/ViewHidingBehaviourAnimation.java +++ b/app/src/main/java/com/nextcloud/talk/utils/animations/ViewHidingBehaviourAnimation.java @@ -24,10 +24,11 @@ package com.nextcloud.talk.utils.animations; +import android.view.View; + import androidx.annotation.NonNull; import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.core.view.ViewCompat; -import android.view.View; public class ViewHidingBehaviourAnimation extends CoordinatorLayout.Behavior { diff --git a/app/src/main/java/com/nextcloud/talk/utils/database/user/UserUtils.java b/app/src/main/java/com/nextcloud/talk/utils/database/user/UserUtils.java index c5c417237..a338b96e5 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/database/user/UserUtils.java +++ b/app/src/main/java/com/nextcloud/talk/utils/database/user/UserUtils.java @@ -20,7 +20,6 @@ */ package com.nextcloud.talk.utils.database.user; -import androidx.annotation.Nullable; import android.text.TextUtils; import com.nextcloud.talk.models.database.User; @@ -28,6 +27,7 @@ import com.nextcloud.talk.models.database.UserEntity; import java.util.List; +import androidx.annotation.Nullable; import io.reactivex.Completable; import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; diff --git a/app/src/main/java/com/nextcloud/talk/utils/preferences/MagicUserInputModule.java b/app/src/main/java/com/nextcloud/talk/utils/preferences/MagicUserInputModule.java index b7ff31601..9c48c9afd 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/preferences/MagicUserInputModule.java +++ b/app/src/main/java/com/nextcloud/talk/utils/preferences/MagicUserInputModule.java @@ -22,7 +22,6 @@ package com.nextcloud.talk.utils.preferences; import android.app.Dialog; import android.content.Context; -import androidx.appcompat.app.AlertDialog; import android.text.InputType; import android.view.LayoutInflater; import android.view.View; @@ -34,6 +33,8 @@ import com.yarolegovich.mp.io.StandardUserInputModule; import java.util.ArrayList; import java.util.List; +import androidx.appcompat.app.AlertDialog; + public class MagicUserInputModule extends StandardUserInputModule { private List keysWithIntegerInput = new ArrayList<>(); diff --git a/app/src/main/java/com/nextcloud/talk/utils/ssl/MagicKeyManager.java b/app/src/main/java/com/nextcloud/talk/utils/ssl/MagicKeyManager.java index 9d9b64ee2..5b36f5c34 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/ssl/MagicKeyManager.java +++ b/app/src/main/java/com/nextcloud/talk/utils/ssl/MagicKeyManager.java @@ -23,7 +23,6 @@ package com.nextcloud.talk.utils.ssl; import android.content.Context; import android.security.KeyChain; import android.security.KeyChainException; -import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Log; @@ -44,6 +43,8 @@ import java.util.Set; import javax.net.ssl.X509KeyManager; +import androidx.annotation.Nullable; + public class MagicKeyManager implements X509KeyManager { private static final String TAG = "MagicKeyManager"; private final X509KeyManager keyManager; diff --git a/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebSocketInstance.java b/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebSocketInstance.java index 99fd3f7fd..3193627e6 100644 --- a/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebSocketInstance.java +++ b/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebSocketInstance.java @@ -34,7 +34,6 @@ import com.nextcloud.talk.models.json.websocket.ErrorOverallWebSocketMessage; import com.nextcloud.talk.models.json.websocket.EventOverallWebSocketMessage; import com.nextcloud.talk.models.json.websocket.HelloResponseOverallWebSocketMessage; import com.nextcloud.talk.models.json.websocket.JoinedRoomOverallWebSocketMessage; -import com.nextcloud.talk.models.json.websocket.RoomOverallWebSocketMessage; import com.nextcloud.talk.utils.MagicMap; import org.greenrobot.eventbus.EventBus;