Fix sportless issues

This commit is contained in:
Jannis Mattheis
2018-11-02 14:49:23 +01:00
parent ff2576065d
commit 8af40c3fd3
21 changed files with 28 additions and 63 deletions

View File

@@ -51,5 +51,7 @@ spotless {
java {
target '**/*.java'
googleJavaFormat().aosp()
removeUnusedImports()
importOrder('', 'static *')
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,6 @@
package com.github.gotify.api;
import android.app.Activity;
import com.github.gotify.client.ApiException;
public class Callback<T> {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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