Clean ups & More progress towards #206

This commit is contained in:
Mario Danic 2018-10-23 21:46:22 +02:00
parent 3b34903b99
commit ce5f1706b9
58 changed files with 134 additions and 130 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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<ChatMessage> {
public MagicSystemMessageViewHolder(View itemView) {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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())

View file

@ -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;

View file

@ -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() {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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)

View file

@ -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;

View file

@ -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;
/**

View file

@ -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
*/

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -21,7 +21,6 @@
package com.nextcloud.talk.events;
import androidx.annotation.Nullable;
import lombok.Data;
@Data

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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 {

View file

@ -21,7 +21,6 @@
package com.nextcloud.talk.models;
import androidx.annotation.Nullable;
import lombok.Data;
@Data

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;
/*

View file

@ -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;

View file

@ -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;

View file

@ -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 {

View file

@ -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";

View file

@ -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";

View file

@ -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

View file

@ -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;

View file

@ -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<View> {

View file

@ -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;

View file

@ -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<String> keysWithIntegerInput = new ArrayList<>();

View file

@ -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;

View file

@ -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;