Fix sportless issues
This commit is contained in:
@@ -51,5 +51,7 @@ spotless {
|
||||
java {
|
||||
target '**/*.java'
|
||||
googleJavaFormat().aosp()
|
||||
removeUnusedImports()
|
||||
importOrder('', 'static *')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.github.gotify.client.api.MessageApi;
|
||||
import com.github.gotify.client.model.Message;
|
||||
import com.github.gotify.client.model.PagedMessages;
|
||||
import com.github.gotify.log.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -3,10 +3,8 @@ package com.github.gotify;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.os.Build;
|
||||
|
||||
import com.github.gotify.log.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
import com.github.gotify.log.Log;
|
||||
|
||||
public class NotificationSupport {
|
||||
public static final class Group {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.github.gotify;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import com.github.gotify.client.model.User;
|
||||
|
||||
public class Settings {
|
||||
|
||||
@@ -7,14 +7,12 @@ import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.format.DateUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.github.gotify.client.ApiClient;
|
||||
import com.github.gotify.client.JSON;
|
||||
import com.github.gotify.log.Log;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.squareup.picasso.Picasso;
|
||||
import com.squareup.picasso.Target;
|
||||
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
|
||||
public class Utils {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package com.github.gotify.api;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.github.gotify.client.ApiCallback;
|
||||
import com.github.gotify.client.ApiException;
|
||||
import com.github.gotify.log.Log;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.github.gotify.api;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.github.gotify.client.ApiException;
|
||||
|
||||
public class Callback<T> {
|
||||
|
||||
@@ -5,7 +5,9 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import com.github.gotify.NotificationSupport;
|
||||
import com.github.gotify.R;
|
||||
import com.github.gotify.Settings;
|
||||
@@ -22,10 +24,6 @@ import com.github.gotify.login.LoginActivity;
|
||||
import com.github.gotify.messages.MessagesActivity;
|
||||
import com.github.gotify.service.WebSocketService;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class InitializationActivity extends AppCompatActivity {
|
||||
private Settings settings;
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.github.gotify.log;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.hypertrack.hyperlog.LogFormat;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class Format extends LogFormat {
|
||||
|
||||
@@ -2,9 +2,7 @@ package com.github.gotify.log;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.hypertrack.hyperlog.HyperLog;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -6,11 +6,9 @@ import android.os.Handler;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.github.gotify.R;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import com.github.gotify.R;
|
||||
|
||||
public class LogsActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
@@ -8,7 +8,12 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnTextChanged;
|
||||
import com.github.gotify.R;
|
||||
import com.github.gotify.Settings;
|
||||
import com.github.gotify.Utils;
|
||||
@@ -26,13 +31,6 @@ import com.github.gotify.log.Log;
|
||||
import com.github.gotify.log.UncaughtExceptionHandler;
|
||||
import com.squareup.okhttp.HttpUrl;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnTextChanged;
|
||||
|
||||
public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
@BindView(R.id.username)
|
||||
|
||||
@@ -8,19 +8,16 @@ import android.widget.BaseAdapter;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.github.gotify.R;
|
||||
import com.github.gotify.Utils;
|
||||
import com.github.gotify.client.model.Message;
|
||||
import com.github.gotify.messages.provider.MessageWithImage;
|
||||
import com.squareup.picasso.Picasso;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class ListMessageAdapter extends BaseAdapter {
|
||||
|
||||
private Context content;
|
||||
|
||||
@@ -14,7 +14,15 @@ import android.widget.AbsListView;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.github.gotify.MissedMessageUtil;
|
||||
import com.github.gotify.R;
|
||||
import com.github.gotify.Settings;
|
||||
@@ -40,21 +48,10 @@ import com.google.android.material.navigation.NavigationView;
|
||||
import com.squareup.okhttp.HttpUrl;
|
||||
import com.squareup.picasso.Picasso;
|
||||
import com.squareup.picasso.Target;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
|
||||
public class MessagesActivity extends AppCompatActivity
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package com.github.gotify.messages.provider;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.github.gotify.Utils;
|
||||
import com.github.gotify.api.Api;
|
||||
import com.github.gotify.client.ApiClient;
|
||||
import com.github.gotify.client.ApiException;
|
||||
import com.github.gotify.client.api.TokenApi;
|
||||
import com.github.gotify.client.model.Application;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.github.gotify.messages.provider;
|
||||
import com.github.gotify.client.api.MessageApi;
|
||||
import com.github.gotify.client.model.Message;
|
||||
import com.github.gotify.client.model.PagedMessages;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MessageFacade {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.github.gotify.messages.provider;
|
||||
|
||||
import com.github.gotify.client.model.Application;
|
||||
import com.github.gotify.client.model.Message;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.github.gotify.messages.provider;
|
||||
|
||||
import com.github.gotify.client.model.Message;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.github.gotify.messages.provider;
|
||||
|
||||
import com.github.gotify.client.model.Message;
|
||||
import com.github.gotify.client.model.PagedMessages;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package com.github.gotify.service;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import com.github.gotify.Utils;
|
||||
import com.github.gotify.api.Callback;
|
||||
import com.github.gotify.client.JSON;
|
||||
import com.github.gotify.client.model.Message;
|
||||
import com.github.gotify.log.Log;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
|
||||
@@ -8,7 +8,9 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import com.github.gotify.MissedMessageUtil;
|
||||
import com.github.gotify.NotificationSupport;
|
||||
import com.github.gotify.R;
|
||||
@@ -19,14 +21,9 @@ import com.github.gotify.client.model.Message;
|
||||
import com.github.gotify.log.Log;
|
||||
import com.github.gotify.log.UncaughtExceptionHandler;
|
||||
import com.github.gotify.messages.MessagesActivity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
public class WebSocketService extends Service {
|
||||
|
||||
public static final String NEW_MESSAGE_BROADCAST =
|
||||
|
||||
Reference in New Issue
Block a user