Merge pull request #2520 from dirkmueller/include_cleanup

Cleanup order/remove unused includes
This commit is contained in:
Martin Fietz 2018-01-07 20:11:01 +01:00 committed by GitHub
commit 4d156118cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 72 additions and 74 deletions

View File

@ -2,15 +2,15 @@ package de.test.antennapod.gpodnet;
import android.test.AndroidTestCase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import de.danoeh.antennapod.core.gpoddernet.GpodnetService;
import de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException;
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetDevice;
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetTag;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Test class for GpodnetService
*/

View File

@ -23,8 +23,8 @@ import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
import de.danoeh.antennapod.core.feed.FeedPreferences;
import de.danoeh.antennapod.core.feed.MediaType;
import de.danoeh.antennapod.core.service.playback.PlaybackServiceMediaPlayer;
import de.danoeh.antennapod.core.service.playback.LocalPSMP;
import de.danoeh.antennapod.core.service.playback.PlaybackServiceMediaPlayer;
import de.danoeh.antennapod.core.service.playback.PlayerStatus;
import de.danoeh.antennapod.core.storage.PodDBAdapter;
import de.danoeh.antennapod.core.util.playback.Playable;

View File

@ -9,10 +9,10 @@ import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import de.danoeh.antennapod.core.event.QueueEvent;
import de.danoeh.antennapod.core.feed.EventDistributor;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.event.QueueEvent;
import de.danoeh.antennapod.core.service.playback.PlaybackServiceTaskManager;
import de.danoeh.antennapod.core.storage.PodDBAdapter;
import de.danoeh.antennapod.core.util.playback.Playable;

View File

@ -5,7 +5,6 @@ import android.test.FlakyTest;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import de.danoeh.antennapod.core.feed.Feed;

View File

@ -3,7 +3,6 @@ package de.test.antennapod.ui;
import android.content.Context;
import android.content.res.Resources;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
import com.robotium.solo.Solo;
import com.robotium.solo.Timeout;

View File

@ -22,12 +22,12 @@ import java.util.List;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MainActivity;
import de.danoeh.antennapod.core.event.QueueEvent;
import de.danoeh.antennapod.core.feed.EventDistributor;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedImage;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
import de.danoeh.antennapod.core.event.QueueEvent;
import de.danoeh.antennapod.core.storage.PodDBAdapter;
import de.danoeh.antennapod.core.util.playback.PlaybackController;
import de.danoeh.antennapod.fragment.ExternalPlayerFragment;

View File

@ -1,11 +1,12 @@
package de.test.antennapod.util;
import android.test.AndroidTestCase;
import android.text.TextUtils;
import java.io.File;
import java.io.IOException;
import de.danoeh.antennapod.core.util.FileNameGenerator;
import android.test.AndroidTestCase;
import android.text.TextUtils;
public class FilenameGeneratorTest extends AndroidTestCase {

View File

@ -1,8 +1,8 @@
package de.test.antennapod.util;
import junit.framework.*;
import junit.framework.TestCase;
import de.danoeh.antennapod.core.util.*;
import de.danoeh.antennapod.core.util.RewindAfterPauseUtils;
/**
* Tests for {@link RewindAfterPauseUtils}.

View File

@ -1,6 +1,7 @@
package de.test.antennapod.util;
import android.test.AndroidTestCase;
import de.danoeh.antennapod.core.util.URIUtil;
/**

View File

@ -1,6 +1,7 @@
package de.test.antennapod.util;
import android.test.AndroidTestCase;
import de.danoeh.antennapod.core.util.URLChecker;
/**

View File

@ -1,7 +1,7 @@
package de.test.antennapod.util.syndication;
import android.test.InstrumentationTestCase;
import de.danoeh.antennapod.core.util.syndication.FeedDiscoverer;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
@ -9,6 +9,8 @@ import java.io.File;
import java.io.FileOutputStream;
import java.util.Map;
import de.danoeh.antennapod.core.util.syndication.FeedDiscoverer;
/**
* Test class for FeedDiscoverer
*/

View File

@ -1,10 +1,10 @@
package de.test.antennapod.util.syndication.feedgenerator;
import de.danoeh.antennapod.core.feed.Feed;
import java.io.IOException;
import java.io.OutputStream;
import de.danoeh.antennapod.core.feed.Feed;
/**
* Generates a machine-readable, platform-independent representation of a Feed object.
*/

View File

@ -1,14 +1,16 @@
package de.test.antennapod.util.syndication.feedgenerator;
import android.util.Xml;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.util.DateUtils;
import org.xmlpull.v1.XmlSerializer;
import java.io.IOException;
import java.io.OutputStream;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.util.DateUtils;
/**
* Creates RSS 2.0 feeds. See FeedGenerator for more information.
*/

View File

@ -9,7 +9,6 @@ import android.text.Spannable;
import android.text.Spanned;
import android.text.style.ClickableSpan;
import android.text.util.Linkify;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;

View File

@ -1,7 +1,6 @@
package de.danoeh.antennapod.adapter;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

View File

@ -8,6 +8,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.LinearLayout;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.gpoddernet.GpodnetService;
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;

View File

@ -1,7 +1,6 @@
package de.danoeh.antennapod.dialog;
import android.content.Context;
import android.support.design.widget.Snackbar;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
@ -9,7 +8,6 @@ import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;

View File

@ -7,8 +7,6 @@ import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;

View File

@ -1,11 +1,11 @@
package de.danoeh.antennapod.fragment.gpodnet;
import java.util.List;
import de.danoeh.antennapod.core.gpoddernet.GpodnetService;
import de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException;
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetPodcast;
import java.util.List;
/**
*
*/

View File

@ -24,7 +24,6 @@ import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.support.design.widget.Snackbar;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.FileProvider;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
@ -61,7 +60,6 @@ import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.activity.PreferenceActivityGingerbread;
import de.danoeh.antennapod.activity.StatisticsActivity;
import de.danoeh.antennapod.asynctask.ExportWorker;
import de.danoeh.antennapod.core.BuildConfig;
import de.danoeh.antennapod.core.export.ExportWriter;
import de.danoeh.antennapod.core.export.html.HtmlWriter;
import de.danoeh.antennapod.core.export.opml.OpmlWriter;

View File

@ -1,7 +1,5 @@
package de.danoeh.antennapod.receiver;
import java.util.Arrays;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
@ -10,6 +8,8 @@ import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Log;
import java.util.Arrays;
import de.danoeh.antennapod.core.service.playback.PlaybackService;
import de.danoeh.antennapod.service.PlayerWidgetService;

View File

@ -2,6 +2,7 @@ package de.danoeh.antennapod.core.tests;
import android.test.InstrumentationTestRunner;
import android.test.suitebuilder.TestSuiteBuilder;
import junit.framework.TestSuite;
public class AntennaPodTestRunner extends InstrumentationTestRunner {

View File

@ -1,7 +1,6 @@
package de.danoeh.antennapod.core.feed;
import android.database.Cursor;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import org.apache.commons.lang3.builder.ToStringBuilder;

View File

@ -1,9 +1,9 @@
package de.danoeh.antennapod.core.feed;
import de.danoeh.antennapod.core.util.vorbiscommentreader.VorbisCommentReaderException;
import java.util.concurrent.TimeUnit;
import de.danoeh.antennapod.core.util.vorbiscommentreader.VorbisCommentReaderException;
public class VorbisCommentChapter extends Chapter {
public static final int CHAPTERTYPE_VORBISCOMMENT_CHAPTER = 3;

View File

@ -1,7 +1,6 @@
package de.danoeh.antennapod.core.glide;
import android.media.MediaMetadataRetriever;
import android.util.Log;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.data.DataFetcher;

View File

@ -1,6 +1,7 @@
package de.danoeh.antennapod.core.gpoddernet;
import android.support.annotation.NonNull;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

View File

@ -23,7 +23,6 @@ import android.util.Pair;
import android.webkit.URLUtil;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.xml.sax.SAXException;
import java.io.File;

View File

@ -17,9 +17,6 @@ import de.danoeh.antennapod.core.feed.FeedImage;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
import de.danoeh.antennapod.core.feed.FeedPreferences;
import de.danoeh.antennapod.core.feed.ID3Chapter;
import de.danoeh.antennapod.core.feed.SimpleChapter;
import de.danoeh.antennapod.core.feed.VorbisCommentChapter;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.service.download.DownloadStatus;
import de.danoeh.antennapod.core.util.LongIntMap;

View File

@ -40,7 +40,6 @@ import de.danoeh.antennapod.core.util.exception.MediaFileNotFoundException;
import de.danoeh.antennapod.core.util.flattr.FlattrUtils;
import static android.content.Context.MODE_PRIVATE;
import static android.provider.Contacts.SettingsColumns.KEY;
/**
* Provides methods for doing common tasks that use DBReader and DBWriter.

View File

@ -7,8 +7,6 @@ import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;
import de.danoeh.antennapod.core.R;
import de.danoeh.antennapod.core.event.MessageEvent;
import org.shredzone.flattr4j.model.Flattr;
import java.io.File;
@ -25,9 +23,11 @@ import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import de.danoeh.antennapod.core.ClientConfig;
import de.danoeh.antennapod.core.R;
import de.danoeh.antennapod.core.asynctask.FlattrClickWorker;
import de.danoeh.antennapod.core.event.FavoritesEvent;
import de.danoeh.antennapod.core.event.FeedItemEvent;
import de.danoeh.antennapod.core.event.MessageEvent;
import de.danoeh.antennapod.core.event.QueueEvent;
import de.danoeh.antennapod.core.feed.EventDistributor;
import de.danoeh.antennapod.core.feed.Feed;

View File

@ -11,10 +11,8 @@ import android.webkit.URLUtil;
import org.apache.commons.io.FilenameUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import de.danoeh.antennapod.core.BuildConfig;
import de.danoeh.antennapod.core.feed.Feed;

View File

@ -1,17 +1,19 @@
package de.danoeh.antennapod.core.syndication.handler;
import de.danoeh.antennapod.core.feed.Feed;
import org.apache.commons.io.input.XmlStreamReader;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import de.danoeh.antennapod.core.feed.Feed;
public class FeedHandler {
public FeedHandlerResult parseFeed(Feed feed) throws SAXException, IOException,

View File

@ -1,8 +1,9 @@
package de.danoeh.antennapod.core.syndication.namespace;
import de.danoeh.antennapod.core.syndication.handler.HandlerState;
import org.xml.sax.Attributes;
import de.danoeh.antennapod.core.syndication.handler.HandlerState;
public abstract class Namespace {
public static final String NSTAG = null;

View File

@ -1,8 +1,9 @@
package de.danoeh.antennapod.core.syndication.namespace.atom;
import org.apache.commons.lang3.StringEscapeUtils;
import de.danoeh.antennapod.core.syndication.namespace.Namespace;
import de.danoeh.antennapod.core.syndication.namespace.SyndElement;
import org.apache.commons.lang3.StringEscapeUtils;
/** Represents Atom Element which contains text (content, title, summary). */
public class AtomText extends SyndElement {

View File

@ -1,6 +1,7 @@
package de.danoeh.antennapod.core.util;
import android.content.Context;
import de.danoeh.antennapod.core.R;
/** Utility class for Download Errors. */

View File

@ -1,9 +1,9 @@
package de.danoeh.antennapod.core.util;
import de.danoeh.antennapod.core.feed.Feed;
import java.util.Comparator;
import de.danoeh.antennapod.core.feed.Feed;
/** Compares the title of two feeds for sorting. */
public class FeedtitleComparator implements Comparator<Feed> {

View File

@ -8,6 +8,7 @@ import android.net.wifi.WifiManager;
import android.support.v4.net.ConnectivityManagerCompat;
import android.text.TextUtils;
import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;

View File

@ -2,7 +2,6 @@ package de.danoeh.antennapod.core.util;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
@ -10,14 +9,14 @@ import android.os.Build;
import android.support.v4.content.FileProvider;
import android.util.Log;
import java.io.File;
import java.util.List;
import de.danoeh.antennapod.core.R;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
import java.io.File;
import java.util.List;
/** Utility methods for sharing data */
public class ShareUtils {
private static final String TAG = "ShareUtils";

View File

@ -1,9 +1,9 @@
package de.danoeh.antennapod.core.util.comparator;
import de.danoeh.antennapod.core.feed.Chapter;
import java.util.Comparator;
import de.danoeh.antennapod.core.feed.Chapter;
public class ChapterStartTimeComparator implements Comparator<Chapter> {
@Override

View File

@ -1,9 +1,9 @@
package de.danoeh.antennapod.core.util.comparator;
import de.danoeh.antennapod.core.service.download.DownloadStatus;
import java.util.Comparator;
import de.danoeh.antennapod.core.service.download.DownloadStatus;
/** Compares the completion date of two Downloadstatus objects. */
public class DownloadStatusComparator implements Comparator<DownloadStatus> {

View File

@ -1,9 +1,9 @@
package de.danoeh.antennapod.core.util.comparator;
import de.danoeh.antennapod.core.feed.FeedItem;
import java.util.Comparator;
import de.danoeh.antennapod.core.feed.FeedItem;
/** Compares the pubDate of two FeedItems for sorting*/
public class FeedItemPubdateComparator implements Comparator<FeedItem> {

View File

@ -1,9 +1,9 @@
package de.danoeh.antennapod.core.util.comparator;
import de.danoeh.antennapod.core.feed.FeedItem;
import java.util.Comparator;
import de.danoeh.antennapod.core.feed.FeedItem;
public class PlaybackCompletionDateComparator implements Comparator<FeedItem> {
public int compare(FeedItem lhs, FeedItem rhs) {

View File

@ -1,10 +1,10 @@
package de.danoeh.antennapod.core.util.comparator;
import java.util.Comparator;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.SearchResult;
import java.util.Comparator;
public class SearchResultValueComparator implements Comparator<SearchResult> {
/**

View File

@ -8,7 +8,6 @@ import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
import de.danoeh.antennapod.core.BuildConfig;
import de.danoeh.antennapod.core.feed.Chapter;
import de.danoeh.antennapod.core.feed.ID3Chapter;
import de.danoeh.antennapod.core.util.id3reader.model.FrameHeader;

View File

@ -1,7 +1,5 @@
package de.danoeh.antennapod.core.util.id3reader;
import de.danoeh.antennapod.core.util.id3reader.model.FrameHeader;
import de.danoeh.antennapod.core.util.id3reader.model.TagHeader;
import org.apache.commons.io.IOUtils;
import java.io.IOException;
@ -9,6 +7,9 @@ import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import de.danoeh.antennapod.core.util.id3reader.model.FrameHeader;
import de.danoeh.antennapod.core.util.id3reader.model.TagHeader;
/**
* Reads the ID3 Tag of a given file. In order to use this class, you should
* create a subclass of it and overwrite the onStart* - or onEnd* - methods.

View File

@ -2,6 +2,7 @@ package de.danoeh.antennapod.core.util.playback;
import android.content.Context;
import android.media.MediaPlayer;
import de.danoeh.antennapod.core.R;
/** Utility class for MediaPlayer errors. */

View File

@ -1,13 +1,14 @@
package de.danoeh.antennapod.core.util.vorbiscommentreader;
import android.util.Log;
import de.danoeh.antennapod.core.BuildConfig;
import de.danoeh.antennapod.core.feed.Chapter;
import de.danoeh.antennapod.core.feed.VorbisCommentChapter;
import java.util.ArrayList;
import java.util.List;
import de.danoeh.antennapod.core.BuildConfig;
import de.danoeh.antennapod.core.feed.Chapter;
import de.danoeh.antennapod.core.feed.VorbisCommentChapter;
public class VorbisCommentChapterReader extends VorbisCommentReader {
private static final String TAG = "VorbisCommentChptrReadr";

View File

@ -12,6 +12,8 @@ import com.google.android.gms.cast.MediaInfo;
import com.google.android.gms.cast.MediaMetadata;
import com.google.android.gms.common.images.WebImage;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@ -26,8 +28,6 @@ import de.danoeh.antennapod.core.storage.DBReader;
import de.danoeh.antennapod.core.util.ChapterUtils;
import de.danoeh.antennapod.core.util.playback.Playable;
import org.apache.commons.lang3.builder.HashCodeBuilder;
/**
* Playable implementation for media on a Cast Device for which a local version of
* {@link de.danoeh.antennapod.core.feed.FeedMedia} hasn't been found.