diff options
115 files changed, 410 insertions, 409 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java b/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java index 11ec1f453..39abe4b7a 100644 --- a/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java +++ b/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java @@ -32,8 +32,8 @@ import de.test.antennapod.util.syndication.feedgenerator.RSS2Generator; public class FeedHandlerTest extends InstrumentationTestCase { private static final String FEEDS_DIR = "testfeeds"; - File file = null; - OutputStream outputStream = null; + private File file = null; + private OutputStream outputStream = null; protected void setUp() throws Exception { super.setUp(); diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBCleanupTests.java b/app/src/androidTest/java/de/test/antennapod/storage/DBCleanupTests.java index 09533208f..5cd4e9906 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBCleanupTests.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBCleanupTests.java @@ -27,12 +27,12 @@ import static de.test.antennapod.storage.DBTestUtils.saveFeedlist; public class DBCleanupTests extends InstrumentationTestCase { private static final String TAG = "DBTasksTest"; - protected static final int EPISODE_CACHE_SIZE = 5; + static final int EPISODE_CACHE_SIZE = 5; private final int cleanupAlgorithm; - protected Context context; + Context context; - protected File destFolder; + private File destFolder; public DBCleanupTests() { this.cleanupAlgorithm = UserPreferences.EPISODE_CLEANUP_DEFAULT; @@ -104,9 +104,9 @@ public class DBCleanupTests extends InstrumentationTestCase { } } - protected void populateItems(final int numItems, Feed feed, List<FeedItem> items, - List<File> files, int itemState, boolean addToQueue, - boolean addToFavorites) throws IOException { + void populateItems(final int numItems, Feed feed, List<FeedItem> items, + List<File> files, int itemState, boolean addToQueue, + boolean addToFavorites) throws IOException { for (int i = 0; i < numItems; i++) { Date itemDate = new Date(numItems - i); Date playbackCompletionDate = null; diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBTestUtils.java b/app/src/androidTest/java/de/test/antennapod/storage/DBTestUtils.java index d02efa521..c9c715a86 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBTestUtils.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBTestUtils.java @@ -19,7 +19,7 @@ import de.danoeh.antennapod.core.util.flattr.FlattrStatus; /** * Utility methods for DB* tests. */ -public class DBTestUtils { +class DBTestUtils { /** * Use this method when tests don't involve chapters. diff --git a/app/src/androidTest/java/de/test/antennapod/ui/PlaybackSonicTest.java b/app/src/androidTest/java/de/test/antennapod/ui/PlaybackSonicTest.java index bfbeedd83..293ed2848 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/PlaybackSonicTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/PlaybackSonicTest.java @@ -33,8 +33,8 @@ import de.danoeh.antennapod.core.storage.PodDBAdapter; public class PlaybackSonicTest extends ActivityInstrumentationTestCase2<MainActivity> { private static final String TAG = PlaybackTest.class.getSimpleName(); - public static final int EPISODES_DRAWER_LIST_INDEX = 1; - public static final int QUEUE_DRAWER_LIST_INDEX = 0; + private static final int EPISODES_DRAWER_LIST_INDEX = 1; + private static final int QUEUE_DRAWER_LIST_INDEX = 0; private Solo solo; private UITestUtils uiTestUtils; diff --git a/app/src/androidTest/java/de/test/antennapod/ui/PlaybackTest.java b/app/src/androidTest/java/de/test/antennapod/ui/PlaybackTest.java index 661c2200b..74d59abd7 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/PlaybackTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/PlaybackTest.java @@ -30,8 +30,8 @@ import de.danoeh.antennapod.core.storage.PodDBAdapter; public class PlaybackTest extends ActivityInstrumentationTestCase2<MainActivity> { private static final String TAG = PlaybackTest.class.getSimpleName(); - public static final int EPISODES_DRAWER_LIST_INDEX = 1; - public static final int QUEUE_DRAWER_LIST_INDEX = 0; + private static final int EPISODES_DRAWER_LIST_INDEX = 1; + private static final int QUEUE_DRAWER_LIST_INDEX = 0; private Solo solo; private UITestUtils uiTestUtils; diff --git a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java index 844b166e0..aca8b7b0a 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java @@ -36,16 +36,16 @@ import de.test.antennapod.util.syndication.feedgenerator.RSS2Generator; * Utility methods for UI tests. * Starts a web server that hosts feeds, episodes and images. */ -public class UITestUtils { +class UITestUtils { private static final String TAG = UITestUtils.class.getSimpleName(); private static final String DATA_FOLDER = "test/UITestUtils"; - public static final int NUM_FEEDS = 5; - public static final int NUM_ITEMS_PER_FEED = 10; + private static final int NUM_FEEDS = 5; + private static final int NUM_ITEMS_PER_FEED = 10; - public static final String TEST_FILE_NAME = "3sec.mp3"; + private static final String TEST_FILE_NAME = "3sec.mp3"; private Context context; diff --git a/app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java b/app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java index 4c8fa0e60..0ce9df0aa 100644 --- a/app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java +++ b/app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java @@ -88,15 +88,15 @@ public abstract class NanoHTTPD { * This is required as the Keep-Alive HTTP connections would otherwise * block the socket reading thread forever (or as long the browser is open). */ - public static final int SOCKET_READ_TIMEOUT = 5000; + private static final int SOCKET_READ_TIMEOUT = 5000; /** * Common mime type for dynamic content: plain text */ - public static final String MIME_PLAINTEXT = "text/plain"; + private static final String MIME_PLAINTEXT = "text/plain"; /** * Common mime type for dynamic content: html */ - public static final String MIME_HTML = "text/html"; + private static final String MIME_HTML = "text/html"; /** * Pseudo-Parameter to use to store the actual query string in the parameters map for later re-processing. */ @@ -118,14 +118,14 @@ public abstract class NanoHTTPD { /** * Constructs an HTTP server on given port. */ - public NanoHTTPD(int port) { + NanoHTTPD(int port) { this(null, port); } /** * Constructs an HTTP server on given hostname and port. */ - public NanoHTTPD(String hostname, int port) { + private NanoHTTPD(String hostname, int port) { this.hostname = hostname; this.myPort = port; setTempFileManagerFactory(new DefaultTempFileManagerFactory()); @@ -226,7 +226,7 @@ public abstract class NanoHTTPD { * * @param socket the {@link Socket} for the connection. */ - public synchronized void registerConnection(Socket socket) { + private synchronized void registerConnection(Socket socket) { openConnections.add(socket); } @@ -236,14 +236,14 @@ public abstract class NanoHTTPD { * @param socket * the {@link Socket} for the connection. */ - public synchronized void unRegisterConnection(Socket socket) { + private synchronized void unRegisterConnection(Socket socket) { openConnections.remove(socket); } /** * Forcibly closes all connections that are open. */ - public synchronized void closeAllConnections() { + private synchronized void closeAllConnections() { for (Socket socket : openConnections) { safeClose(socket); } @@ -253,7 +253,7 @@ public abstract class NanoHTTPD { return myServerSocket == null ? -1 : myServerSocket.getLocalPort(); } - public final boolean wasStarted() { + private boolean wasStarted() { return myServerSocket != null && myThread != null; } @@ -288,7 +288,7 @@ public abstract class NanoHTTPD { * @param session The HTTP session * @return HTTP response, see class Response for details */ - public Response serve(IHTTPSession session) { + Response serve(IHTTPSession session) { Map<String, String> files = new ArrayMap<>(); Method method = session.getMethod(); if (Method.PUT.equals(method) || Method.POST.equals(method)) { @@ -312,7 +312,7 @@ public abstract class NanoHTTPD { * @param str the percent encoded <code>String</code> * @return expanded form of the input, for example "foo%20bar" becomes "foo bar" */ - protected String decodePercent(String str) { + private String decodePercent(String str) { String decoded = null; try { decoded = URLDecoder.decode(str, "UTF8"); @@ -341,7 +341,7 @@ public abstract class NanoHTTPD { * @param queryString a query string pulled from the URL. * @return a map of <code>String</code> (parameter name) to <code>List<String></code> (a list of the values supplied). */ - protected Map<String, List<String>> decodeParameters(String queryString) { + private Map<String, List<String>> decodeParameters(String queryString) { Map<String, List<String>> parms = new ArrayMap<>(); if (queryString != null) { StringTokenizer st = new StringTokenizer(queryString, "&"); @@ -372,7 +372,7 @@ public abstract class NanoHTTPD { * * @param asyncRunner new strategy for handling threads. */ - public void setAsyncRunner(AsyncRunner asyncRunner) { + private void setAsyncRunner(AsyncRunner asyncRunner) { this.asyncRunner = asyncRunner; } @@ -387,7 +387,7 @@ public abstract class NanoHTTPD { * * @param tempFileManagerFactory new strategy for handling temp files. */ - public void setTempFileManagerFactory(TempFileManagerFactory tempFileManagerFactory) { + private void setTempFileManagerFactory(TempFileManagerFactory tempFileManagerFactory) { this.tempFileManagerFactory = tempFileManagerFactory; } @@ -610,7 +610,7 @@ public abstract class NanoHTTPD { /** * Sends given response to the socket. */ - protected void send(OutputStream outputStream) { + void send(OutputStream outputStream) { String mime = mimeType; SimpleDateFormat gmtFrmt = new SimpleDateFormat("E, d MMM yyyy HH:mm:ss 'GMT'", Locale.US); gmtFrmt.setTimeZone(TimeZone.getTimeZone("GMT")); @@ -655,13 +655,13 @@ public abstract class NanoHTTPD { } } - protected void sendContentLengthHeaderIfNotAlreadyPresent(PrintWriter pw, Map<String, String> header, int size) { + void sendContentLengthHeaderIfNotAlreadyPresent(PrintWriter pw, Map<String, String> header, int size) { if (!headerAlreadySent(header, "content-length")) { pw.print("Content-Length: "+ size +"\r\n"); } } - protected void sendConnectionHeaderIfNotAlreadyPresent(PrintWriter pw, Map<String, String> header) { + void sendConnectionHeaderIfNotAlreadyPresent(PrintWriter pw, Map<String, String> header) { if (!headerAlreadySent(header, "connection")) { pw.print("Connection: keep-alive\r\n"); } diff --git a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java index bd3df0f9d..afe15f1b2 100644 --- a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java +++ b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java @@ -19,7 +19,7 @@ public class AtomGenerator implements FeedGenerator{ private static final String NS_ATOM = "http://www.w3.org/2005/Atom"; - public static final long FEATURE_USE_RFC3339LOCAL = 1; + private static final long FEATURE_USE_RFC3339LOCAL = 1; @Override public void writeFeed(Feed feed, OutputStream outputStream, String encoding, long flags) throws IOException { diff --git a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/GeneratorUtil.java b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/GeneratorUtil.java index e7cbb1b42..7f6f0fb0f 100644 --- a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/GeneratorUtil.java +++ b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/GeneratorUtil.java @@ -7,7 +7,7 @@ import java.io.IOException; /** * Utility methods for FeedGenerator */ -public class GeneratorUtil { +class GeneratorUtil { public static void addPaymentLink(XmlSerializer xml, String paymentLink, boolean withNamespace) throws IOException { String ns = (withNamespace) ? "http://www.w3.org/2005/Atom" : null; diff --git a/app/src/free/java/de/danoeh/antennapod/config/CastCallbackImpl.java b/app/src/free/java/de/danoeh/antennapod/config/CastCallbackImpl.java index 5e714f02c..fb23dfa1a 100644 --- a/app/src/free/java/de/danoeh/antennapod/config/CastCallbackImpl.java +++ b/app/src/free/java/de/danoeh/antennapod/config/CastCallbackImpl.java @@ -2,6 +2,6 @@ package de.danoeh.antennapod.config; import de.danoeh.antennapod.core.CastCallbacks; -public class CastCallbackImpl implements CastCallbacks { +class CastCallbackImpl implements CastCallbacks { } diff --git a/app/src/free/java/de/danoeh/antennapod/preferences/PreferenceControllerFlavorHelper.java b/app/src/free/java/de/danoeh/antennapod/preferences/PreferenceControllerFlavorHelper.java index de604c7c4..4e2c40885 100644 --- a/app/src/free/java/de/danoeh/antennapod/preferences/PreferenceControllerFlavorHelper.java +++ b/app/src/free/java/de/danoeh/antennapod/preferences/PreferenceControllerFlavorHelper.java @@ -5,7 +5,7 @@ import de.danoeh.antennapod.core.preferences.UserPreferences; /** * Implements functions from PreferenceController that are flavor dependent. */ -public class PreferenceControllerFlavorHelper { +class PreferenceControllerFlavorHelper { static void setupFlavoredUI(PreferenceController.PreferenceUI ui) { ui.findPreference(UserPreferences.PREF_CAST_ENABLED).setEnabled(false); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java index 4f56d9770..2b6cd8511 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java @@ -19,7 +19,7 @@ import de.danoeh.antennapod.dialog.VariableSpeedDialog; * Activity for playing audio files. */ public class AudioplayerActivity extends MediaplayerInfoActivity { - public static final String TAG = "AudioPlayerActivity"; + private static final String TAG = "AudioPlayerActivity"; private AtomicBoolean isSetup = new AtomicBoolean(false); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/CastplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/CastplayerActivity.java index a7e9b1e70..07eae3752 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/CastplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/CastplayerActivity.java @@ -13,7 +13,7 @@ import de.danoeh.antennapod.core.service.playback.PlaybackService; * Activity for controlling the remote playback on a Cast device. */ public class CastplayerActivity extends MediaplayerInfoActivity { - public static final String TAG = "CastPlayerActivity"; + private static final String TAG = "CastPlayerActivity"; private AtomicBoolean isSetup = new AtomicBoolean(false); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index c33ffe55d..16bd1217c 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -82,7 +82,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi public static final String PREF_NAME = "MainActivityPrefs"; public static final String PREF_IS_FIRST_LAUNCH = "prefMainActivityIsFirstLaunch"; - public static final String PREF_LAST_FRAGMENT_TAG = "prefMainActivityLastFragmentTag"; + private static final String PREF_LAST_FRAGMENT_TAG = "prefMainActivityLastFragmentTag"; public static final String EXTRA_NAV_TYPE = "nav_type"; public static final String EXTRA_NAV_INDEX = "nav_index"; @@ -90,8 +90,8 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi public static final String EXTRA_FRAGMENT_ARGS = "fragment_args"; public static final String EXTRA_FEED_ID = "fragment_feed_id"; - public static final String SAVE_BACKSTACK_COUNT = "backstackCount"; - public static final String SAVE_TITLE = "title"; + private static final String SAVE_BACKSTACK_COUNT = "backstackCount"; + private static final String SAVE_TITLE = "title"; public static final String[] NAV_DRAWER_TAGS = { QueueFragment.TAG, @@ -235,7 +235,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi } } - public void showDrawerPreferencesDialog() { + private void showDrawerPreferencesDialog() { final List<String> hiddenDrawerItems = UserPreferences.getHiddenDrawerItems(); String[] navLabels = new String[NAV_DRAWER_TAGS.length]; final boolean[] checked = new boolean[NAV_DRAWER_TAGS.length]; @@ -269,7 +269,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi return (navDrawerData != null) ? navDrawerData.feeds : null; } - public void loadFragment(int index, Bundle args) { + private void loadFragment(int index, Bundle args) { Log.d(TAG, "loadFragment(index: " + index + ", args: " + args + ")"); if (index < navAdapter.getSubscriptionOffset()) { String tag = navAdapter.getTags().get(index); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index b0cbd355b..c74151111 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -67,19 +67,19 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements private static final String PREFS = "MediaPlayerActivityPreferences"; private static final String PREF_SHOW_TIME_LEFT = "showTimeLeft"; - protected PlaybackController controller; + PlaybackController controller; - protected TextView txtvPosition; - protected TextView txtvLength; - protected SeekBar sbPosition; - protected ImageButton butRev; - protected TextView txtvRev; - protected ImageButton butPlay; - protected ImageButton butFF; - protected TextView txtvFF; - protected ImageButton butSkip; + private TextView txtvPosition; + private TextView txtvLength; + SeekBar sbPosition; + private ImageButton butRev; + private TextView txtvRev; + private ImageButton butPlay; + private ImageButton butFF; + private TextView txtvFF; + private ImageButton butSkip; - protected boolean showTimeLeft = false; + private boolean showTimeLeft = false; private boolean isFavorite = false; @@ -184,31 +184,31 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements }; } - protected static TextView getTxtvFFFromActivity(MediaplayerActivity activity) { + private static TextView getTxtvFFFromActivity(MediaplayerActivity activity) { return activity.txtvFF; } - protected static TextView getTxtvRevFromActivity(MediaplayerActivity activity) { + private static TextView getTxtvRevFromActivity(MediaplayerActivity activity) { return activity.txtvRev; } - protected void onSetSpeedAbilityChanged() { + private void onSetSpeedAbilityChanged() { Log.d(TAG, "onSetSpeedAbilityChanged()"); updatePlaybackSpeedButton(); } - protected void onPlaybackSpeedChange() { + private void onPlaybackSpeedChange() { updatePlaybackSpeedButtonText(); } - protected void onServiceQueried() { + private void onServiceQueried() { supportInvalidateOptionsMenu(); } - protected void chooseTheme() { + void chooseTheme() { setTheme(UserPreferences.getTheme()); } - protected void setScreenOn(boolean enable) { + void setScreenOn(boolean enable) { } @Override @@ -249,7 +249,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements */ protected abstract void onBufferEnd(); - protected void onBufferUpdate(float progress) { + private void onBufferUpdate(float progress) { if (sbPosition != null) { sbPosition.setSecondaryProgress((int) progress * sbPosition.getMax()); } @@ -258,7 +258,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements /** * Current screen orientation. */ - protected int orientation; + private int orientation; @Override protected void onStart() { @@ -619,7 +619,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements protected abstract void clearStatusMsg(); - protected void onPositionObserverUpdate() { + void onPositionObserverUpdate() { if (controller == null || txtvPosition == null || txtvLength == null) { return; } @@ -655,7 +655,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements * to the PlaybackService to ensure that the activity has the right * FeedMedia object. */ - protected boolean loadMediaInfo() { + boolean loadMediaInfo() { Log.d(TAG, "loadMediaInfo()"); if(controller == null || controller.getMedia() == null) { return false; @@ -669,11 +669,11 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements return true; } - protected void updatePlaybackSpeedButton() { + void updatePlaybackSpeedButton() { // Only meaningful on AudioplayerActivity, where it is overridden. } - protected void updatePlaybackSpeedButtonText() { + void updatePlaybackSpeedButtonText() { // Only meaningful on AudioplayerActivity, where it is overridden. } @@ -763,7 +763,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements builder.create().show(); } - protected void setupGUI() { + void setupGUI() { setContentView(getContentViewResourceId()); sbPosition = (SeekBar) findViewById(R.id.sbPosition); txtvPosition = (TextView) findViewById(R.id.txtvPosition); @@ -837,7 +837,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements } } - protected void onRewind() { + void onRewind() { if (controller == null) { return; } @@ -845,14 +845,14 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements controller.seekTo(curr - UserPreferences.getRewindSecs() * 1000); } - protected void onPlayPause() { + void onPlayPause() { if(controller == null) { return; } controller.playPause(); } - protected void onFastForward() { + void onFastForward() { if (controller == null) { return; } @@ -862,7 +862,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements protected abstract int getContentViewResourceId(); - void handleError(int errorCode) { + private void handleError(int errorCode) { final AlertDialog.Builder errorDialog = new AlertDialog.Builder(this); errorDialog.setTitle(R.string.error_label); errorDialog.setMessage(MediaPlayerError.getErrorString(this, errorCode)); @@ -875,7 +875,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements errorDialog.create().show(); } - float prog; + private float prog; @Override public void onProgressChanged (SeekBar seekBar,int progress, boolean fromUser) { diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java index d713f4b77..03b47e615 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java @@ -77,11 +77,11 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem private static final int POS_CHAPTERS = 2; private static final int NUM_CONTENT_FRAGMENTS = 3; - final String TAG = "MediaplayerInfoActivity"; + private final String TAG = "MediaplayerInfoActivity"; private static final String PREFS = "AudioPlayerActivityPreferences"; private static final String PREF_KEY_SELECTED_FRAGMENT_POSITION = "selectedFragmentPosition"; - public static final String[] NAV_DRAWER_TAGS = { + private static final String[] NAV_DRAWER_TAGS = { QueueFragment.TAG, EpisodesFragment.TAG, SubscriptionFragment.TAG, @@ -91,8 +91,8 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem NavListAdapter.SUBSCRIPTION_LIST_TAG }; - protected Button butPlaybackSpeed; - protected ImageButton butCastDisconnect; + Button butPlaybackSpeed; + ImageButton butCastDisconnect; private DrawerLayout drawerLayout; private NavListAdapter navAdapter; private ListView navList; @@ -151,7 +151,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem setTheme(UserPreferences.getNoTitleTheme()); } - protected void saveCurrentFragment() { + void saveCurrentFragment() { if(pager == null) { return; } @@ -305,7 +305,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem return true; } - public void notifyMediaPositionChanged() { + private void notifyMediaPositionChanged() { if(pagerAdapter == null) { return; } @@ -446,7 +446,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem } } - public void showDrawerPreferencesDialog() { + private void showDrawerPreferencesDialog() { final List<String> hiddenDrawerItems = UserPreferences.getHiddenDrawerItems(); String[] navLabels = new String[NAV_DRAWER_TAGS.length]; final boolean[] checked = new boolean[NAV_DRAWER_TAGS.length]; diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java index 91c7c3f1b..d9fe1f6e7 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java @@ -83,7 +83,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity { public static final String ARG_FEEDURL = "arg.feedurl"; // Optional argument: specify a title for the actionbar. public static final String ARG_TITLE = "title"; - public static final int RESULT_ERROR = 2; + private static final int RESULT_ERROR = 2; private static final String TAG = "OnlineFeedViewActivity"; private static final int EVENTS = EventDistributor.FEED_LIST_UPDATE; private volatile List<Feed> feeds; diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportBaseActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportBaseActivity.java index 07b0b3cdb..c04ae051e 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportBaseActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportBaseActivity.java @@ -68,7 +68,7 @@ public class OpmlImportBaseActivity extends AppCompatActivity { } } - protected void importUri(@Nullable Uri uri) { + void importUri(@Nullable Uri uri) { if(uri == null) { new MaterialDialog.Builder(this) .content(R.string.opml_import_error_no_file) @@ -114,7 +114,7 @@ public class OpmlImportBaseActivity extends AppCompatActivity { } /** Starts the import process. */ - protected void startImport() { + private void startImport() { try { Reader mReader = new InputStreamReader(getContentResolver().openInputStream(uri), LangUtils.UTF_8); importWorker = new OpmlImportWorker(this, mReader) { @@ -144,7 +144,7 @@ public class OpmlImportBaseActivity extends AppCompatActivity { } } - protected boolean finishWhenCanceled() { + boolean finishWhenCanceled() { return false; } diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java index fb5c4d273..08d4ac54c 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -173,7 +173,7 @@ public class VideoplayerActivity extends MediaplayerActivity { progressIndicator.setVisibility(View.INVISIBLE); } - View.OnTouchListener onVideoviewTouched = (v, event) -> { + private View.OnTouchListener onVideoviewTouched = (v, event) -> { if (event.getAction() == MotionEvent.ACTION_DOWN) { videoControlsHider.stop(); toggleVideoControlsVisibility(); @@ -187,7 +187,7 @@ public class VideoplayerActivity extends MediaplayerActivity { }; @SuppressLint("NewApi") - void setupVideoControlsToggler() { + private void setupVideoControlsToggler() { videoControlsHider.stop(); videoControlsHider.start(); } diff --git a/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java index 31d0fb1a3..8f447ac90 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java @@ -61,7 +61,7 @@ public class GpodnetAuthenticationActivity extends AppCompatActivity { private volatile String password; private volatile GpodnetDevice selectedDevice; - View[] views; + private View[] views; @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/ActionButtonCallback.java b/app/src/main/java/de/danoeh/antennapod/adapter/ActionButtonCallback.java index c18564351..e6b42efcb 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/ActionButtonCallback.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/ActionButtonCallback.java @@ -3,7 +3,7 @@ package de.danoeh.antennapod.adapter; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.util.LongList; -public interface ActionButtonCallback { +interface ActionButtonCallback { /** Is called when the action button of a list item has been pressed. */ void onActionButtonPressed(FeedItem item, LongList queueIds); } diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/ActionButtonUtils.java b/app/src/main/java/de/danoeh/antennapod/adapter/ActionButtonUtils.java index f0210f983..a915692d1 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/ActionButtonUtils.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/ActionButtonUtils.java @@ -16,7 +16,7 @@ import de.danoeh.antennapod.core.storage.DownloadRequester; * Utility methods for the action button that is displayed on the right hand side * of a listitem. */ -public class ActionButtonUtils { +class ActionButtonUtils { private final int[] labels; private final TypedArray drawables; diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java index e1efdaa7b..f5865ba47 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java @@ -19,7 +19,7 @@ import de.danoeh.antennapod.core.util.ThemeUtils; public class DownloadlistAdapter extends BaseAdapter { - public static final int SELECTION_NONE = -1; + private static final int SELECTION_NONE = -1; private int selectedItemIndex; private ItemAccess itemAccess; diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index cbbeabf0d..963a24429 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -48,10 +48,10 @@ import de.danoeh.antennapod.fragment.SubscriptionFragment; public class NavListAdapter extends BaseAdapter implements SharedPreferences.OnSharedPreferenceChangeListener { - public static final int VIEW_TYPE_COUNT = 3; + private static final int VIEW_TYPE_COUNT = 3; public static final int VIEW_TYPE_NAV = 0; public static final int VIEW_TYPE_SECTION_DIVIDER = 1; - public static final int VIEW_TYPE_SUBSCRIPTION = 2; + private static final int VIEW_TYPE_SUBSCRIPTION = 2; /** * a tag used as a placeholder to indicate if the subscription list should be displayed or not diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java index c060083a6..8385ce2df 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java @@ -24,7 +24,7 @@ import de.danoeh.antennapod.core.util.Converter; */ public class StatisticsListAdapter extends BaseAdapter { private Context context; - List<DBReader.StatisticsItem> feedTime = new ArrayList<>(); + private List<DBReader.StatisticsItem> feedTime = new ArrayList<>(); private boolean countAll = true; public StatisticsListAdapter(Context context) { diff --git a/app/src/main/java/de/danoeh/antennapod/asynctask/ExportWorker.java b/app/src/main/java/de/danoeh/antennapod/asynctask/ExportWorker.java index 192df8ca5..453a87b85 100644 --- a/app/src/main/java/de/danoeh/antennapod/asynctask/ExportWorker.java +++ b/app/src/main/java/de/danoeh/antennapod/asynctask/ExportWorker.java @@ -31,7 +31,7 @@ public class ExportWorker { DEFAULT_OUTPUT_NAME + "." + exportWriter.fileExtension())); } - public ExportWorker(ExportWriter exportWriter, @NonNull File output) { + private ExportWorker(ExportWriter exportWriter, @NonNull File output) { this.exportWriter = exportWriter; this.output = output; } diff --git a/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java b/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java index f26f2ea76..d2498955c 100644 --- a/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java +++ b/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java @@ -6,7 +6,7 @@ import de.danoeh.antennapod.core.ClientConfig; /** * Configures the ClientConfig class of the core package. */ -public class ClientConfigurator { +class ClientConfigurator { static { ClientConfig.USER_AGENT = "AntennaPod/" + BuildConfig.VERSION_NAME; diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java index ac073141d..04d4ae247 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java @@ -34,12 +34,12 @@ public class EpisodesApplyActionFragment extends Fragment { public String TAG = "EpisodeActionFragment"; - public static final int ACTION_QUEUE = 1; - public static final int ACTION_MARK_PLAYED = 2; - public static final int ACTION_MARK_UNPLAYED = 4; - public static final int ACTION_DOWNLOAD = 8; + private static final int ACTION_QUEUE = 1; + private static final int ACTION_MARK_PLAYED = 2; + private static final int ACTION_MARK_UNPLAYED = 4; + private static final int ACTION_DOWNLOAD = 8; public static final int ACTION_REMOVE = 16; - public static final int ACTION_ALL = ACTION_QUEUE | ACTION_MARK_PLAYED | ACTION_MARK_UNPLAYED + private static final int ACTION_ALL = ACTION_QUEUE | ACTION_MARK_PLAYED | ACTION_MARK_UNPLAYED | ACTION_DOWNLOAD | ACTION_REMOVE; private ListView mListView; diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java index 64fc1fda4..72000170e 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java @@ -54,7 +54,7 @@ public class RatingDialog { } } - public static void rateNow() { + private static void rateNow() { Context context = mContext.get(); if(context == null) { return; @@ -67,11 +67,11 @@ public class RatingDialog { saveRated(); } - public static boolean rated() { + private static boolean rated() { return mPreferences.getBoolean(KEY_RATED, false); } - public static void saveRated() { + private static void saveRated() { mPreferences .edit() .putBoolean(KEY_RATED, true) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java index f14ebbdaf..c050221e1 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java @@ -25,7 +25,7 @@ public class AddFeedFragment extends Fragment { /** * Preset value for url text field. */ - public static final String ARG_FEED_URL = "feedurl"; + private static final String ARG_FEED_URL = "feedurl"; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java index bbfd1688d..195b1558c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java @@ -69,24 +69,24 @@ public class AllEpisodesFragment extends Fragment { private static final String PREF_SCROLL_POSITION = "scroll_position"; private static final String PREF_SCROLL_OFFSET = "scroll_offset"; - protected RecyclerView recyclerView; - protected AllEpisodesRecycleAdapter listAdapter; + RecyclerView recyclerView; + AllEpisodesRecycleAdapter listAdapter; private ProgressBar progLoading; - protected List<FeedItem> episodes; + List<FeedItem> episodes; private List<Downloader> downloaderList; private boolean itemsLoaded = false; private boolean viewsCreated = false; private boolean isUpdatingFeeds; - protected boolean isMenuInvalidationAllowed = false; + boolean isMenuInvalidationAllowed = false; - protected Subscription subscription; + Subscription subscription; private LinearLayoutManager layoutManager; - protected boolean showOnlyNewEpisodes() { return false; } - protected String getPrefName() { return DEFAULT_PREF_NAME; } + boolean showOnlyNewEpisodes() { return false; } + String getPrefName() { return DEFAULT_PREF_NAME; } @Override public void onCreate(Bundle savedInstanceState) { @@ -165,7 +165,7 @@ public class AllEpisodesFragment extends Fragment { } } - protected void resetViewState() { + void resetViewState() { viewsCreated = false; listAdapter = null; } @@ -299,10 +299,10 @@ public class AllEpisodesFragment extends Fragment { R.layout.all_episodes_fragment); } - protected View onCreateViewHelper(LayoutInflater inflater, - ViewGroup container, - Bundle savedInstanceState, - int fragmentResource) { + View onCreateViewHelper(LayoutInflater inflater, + ViewGroup container, + Bundle savedInstanceState, + int fragmentResource) { super.onCreateView(inflater, container, savedInstanceState); View root = inflater.inflate(fragmentResource, container, false); @@ -346,7 +346,7 @@ public class AllEpisodesFragment extends Fragment { updateShowOnlyEpisodesListViewState(); } - protected AllEpisodesRecycleAdapter.ItemAccess itemAccess = new AllEpisodesRecycleAdapter.ItemAccess() { + private AllEpisodesRecycleAdapter.ItemAccess itemAccess = new AllEpisodesRecycleAdapter.ItemAccess() { @Override public int getCount() { @@ -459,7 +459,7 @@ public class AllEpisodesFragment extends Fragment { private void updateShowOnlyEpisodesListViewState() { } - protected void loadItems() { + void loadItems() { if(subscription != null) { subscription.unsubscribe(); } @@ -483,7 +483,7 @@ public class AllEpisodesFragment extends Fragment { }, error -> Log.e(TAG, Log.getStackTraceString(error))); } - protected List<FeedItem> loadData() { + List<FeedItem> loadData() { return DBReader.getRecentlyPublishedEpisodes(RECENT_EPISODES_LIMIT); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadsFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadsFragment.java index 52a38ccb9..6cc95c852 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadsFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadsFragment.java @@ -25,7 +25,7 @@ public class DownloadsFragment extends Fragment { public static final String ARG_SELECTED_TAB = "selected_tab"; public static final int POS_RUNNING = 0; - public static final int POS_COMPLETED = 1; + private static final int POS_COMPLETED = 1; public static final int POS_LOG = 2; private static final String PREF_LAST_TAB_POSITION = "tab_position"; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesFragment.java index e2fbd91f3..6a7b40e28 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesFragment.java @@ -21,10 +21,10 @@ public class EpisodesFragment extends Fragment { public static final String TAG = "EpisodesFragment"; private static final String PREF_LAST_TAB_POSITION = "tab_position"; - public static final int POS_NEW_EPISODES = 0; - public static final int POS_ALL_EPISODES = 1; - public static final int POS_FAV_EPISODES = 2; - public static final int TOTAL_COUNT = 3; + private static final int POS_NEW_EPISODES = 0; + private static final int POS_ALL_EPISODES = 1; + private static final int POS_FAV_EPISODES = 2; + private static final int TOTAL_COUNT = 3; private TabLayout tabLayout; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java index 5bb8e0a2d..a9bf39632 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java @@ -208,7 +208,7 @@ public class ExternalPlayerFragment extends Fragment { return controller; } - public void onPositionObserverUpdate() { + private void onPositionObserverUpdate() { mProgressBar.setProgress((int) ((double) controller.getPosition() / controller.getDuration() * 100)); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java index 234c8377d..76d19d61c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java @@ -26,7 +26,7 @@ import de.danoeh.antennapod.core.storage.DBWriter; public class FavoriteEpisodesFragment extends AllEpisodesFragment { - public static final String TAG = "FavoriteEpisodesFrag"; + private static final String TAG = "FavoriteEpisodesFrag"; private static final String PREF_NAME = "PrefFavoriteEpisodesFragment"; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FyydSearchFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FyydSearchFragment.java index 7c1ec5ec1..0d1b1b7b6 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FyydSearchFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FyydSearchFragment.java @@ -169,7 +169,7 @@ public class FyydSearchFragment extends Fragment { progressBar.setVisibility(View.VISIBLE); } - void processSearchResult(FyydResponse response) { + private void processSearchResult(FyydResponse response) { adapter.clear(); if (!response.getData().isEmpty()) { adapter.clear(); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java index 0d3f32c7f..e4bb0a28e 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java @@ -87,9 +87,9 @@ public class ItemlistFragment extends ListFragment { | EventDistributor.PLAYER_STATUS_UPDATE; public static final String EXTRA_SELECTED_FEEDITEM = "extra.de.danoeh.antennapod.activity.selected_feeditem"; - public static final String ARGUMENT_FEED_ID = "argument.de.danoeh.antennapod.feed_id"; + private static final String ARGUMENT_FEED_ID = "argument.de.danoeh.antennapod.feed_id"; - protected FeedItemlistAdapter adapter; + private FeedItemlistAdapter adapter; private ContextMenu contextMenu; private AdapterView.AdapterContextMenuInfo lastMenuInfo = null; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItunesSearchFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItunesSearchFragment.java index 43dedad25..08610c1f3 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItunesSearchFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItunesSearchFragment.java @@ -75,7 +75,7 @@ public class ItunesSearchFragment extends Fragment { * Replace adapter data with provided search results from SearchTask. * @param result List of Podcast objects containing search results */ - void updateData(List<Podcast> result) { + private void updateData(List<Podcast> result) { this.searchResults = result; adapter.clear(); if (result != null && result.size() > 0) { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java index aff5069c6..c5078eda0 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java @@ -20,7 +20,7 @@ import de.danoeh.antennapod.R; */ public class GpodnetMainFragment extends Fragment { - public static final String TAG = "GpodnetMainFragment"; + private static final String TAG = "GpodnetMainFragment"; private static final String PREF_LAST_TAB_POSITION = "tab_position"; private TabLayout tabLayout; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java index a54c90862..055358c64 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java @@ -91,7 +91,7 @@ public abstract class PodcastListFragment extends Fragment { return root; } - protected void onPodcastSelected(GpodnetPodcast selection) { + private void onPodcastSelected(GpodnetPodcast selection) { Log.d(TAG, "Selected podcast: " + selection.toString()); Intent intent = new Intent(getActivity(), OnlineFeedViewActivity.class); intent.putExtra(OnlineFeedViewActivity.ARG_FEEDURL, selection.getUrl()); @@ -101,7 +101,7 @@ public abstract class PodcastListFragment extends Fragment { protected abstract List<GpodnetPodcast> loadPodcastData(GpodnetService service) throws GpodnetServiceException; - protected final void loadData() { + final void loadData() { AsyncTask<Void, Void, List<GpodnetPodcast>> loaderTask = new AsyncTask<Void, Void, List<GpodnetPodcast>>() { volatile Exception exception = null; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/SearchListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/SearchListFragment.java index 613e06805..10bd636dd 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/SearchListFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/SearchListFragment.java @@ -73,7 +73,7 @@ public class SearchListFragment extends PodcastListFragment { return service.searchPodcasts(query, 0); } - public void changeQuery(String query) { + private void changeQuery(String query) { Validate.notNull(query); this.query = query; diff --git a/app/src/main/java/de/danoeh/antennapod/receiver/SPAReceiver.java b/app/src/main/java/de/danoeh/antennapod/receiver/SPAReceiver.java index a373c5353..c9bd973cb 100644 --- a/app/src/main/java/de/danoeh/antennapod/receiver/SPAReceiver.java +++ b/app/src/main/java/de/danoeh/antennapod/receiver/SPAReceiver.java @@ -22,8 +22,8 @@ public class SPAReceiver extends BroadcastReceiver{ private static final String TAG = "SPAReceiver"; public static final String ACTION_SP_APPS_QUERY_FEEDS = "de.danoeh.antennapdsp.intent.SP_APPS_QUERY_FEEDS"; - public static final String ACTION_SP_APPS_QUERY_FEEDS_REPSONSE = "de.danoeh.antennapdsp.intent.SP_APPS_QUERY_FEEDS_RESPONSE"; - public static final String ACTION_SP_APPS_QUERY_FEEDS_REPSONSE_FEEDS_EXTRA = "feeds"; + private static final String ACTION_SP_APPS_QUERY_FEEDS_REPSONSE = "de.danoeh.antennapdsp.intent.SP_APPS_QUERY_FEEDS_RESPONSE"; + private static final String ACTION_SP_APPS_QUERY_FEEDS_REPSONSE_FEEDS_EXTRA = "feeds"; @Override public void onReceive(Context context, Intent intent) { diff --git a/core/src/androidTest/java/de/danoeh/antennapod/core/feed/FeedImageMother.java b/core/src/androidTest/java/de/danoeh/antennapod/core/feed/FeedImageMother.java index f240c870e..0fb4992ba 100644 --- a/core/src/androidTest/java/de/danoeh/antennapod/core/feed/FeedImageMother.java +++ b/core/src/androidTest/java/de/danoeh/antennapod/core/feed/FeedImageMother.java @@ -1,6 +1,6 @@ package de.danoeh.antennapod.core.feed; -public class FeedImageMother { +class FeedImageMother { public static FeedImage anyFeedImage() { return new FeedImage(0, "image", null, "http://example.com/picture", false); diff --git a/core/src/androidTest/java/de/danoeh/antennapod/core/feed/FeedMother.java b/core/src/androidTest/java/de/danoeh/antennapod/core/feed/FeedMother.java index 1cea6b9c9..fecc8e377 100644 --- a/core/src/androidTest/java/de/danoeh/antennapod/core/feed/FeedMother.java +++ b/core/src/androidTest/java/de/danoeh/antennapod/core/feed/FeedMother.java @@ -2,7 +2,7 @@ package de.danoeh.antennapod.core.feed; import static de.danoeh.antennapod.core.feed.FeedImageMother.anyFeedImage; -public class FeedMother { +class FeedMother { public static Feed anyFeed() { FeedImage image = anyFeedImage(); diff --git a/core/src/free/java/de/danoeh/antennapod/core/feed/FeedMediaFlavorHelper.java b/core/src/free/java/de/danoeh/antennapod/core/feed/FeedMediaFlavorHelper.java index 8818f6b46..9833e2cc9 100644 --- a/core/src/free/java/de/danoeh/antennapod/core/feed/FeedMediaFlavorHelper.java +++ b/core/src/free/java/de/danoeh/antennapod/core/feed/FeedMediaFlavorHelper.java @@ -3,7 +3,7 @@ package de.danoeh.antennapod.core.feed; /** * Implements methods for FeedMedia that are flavor dependent. */ -public class FeedMediaFlavorHelper { +class FeedMediaFlavorHelper { private FeedMediaFlavorHelper(){} static boolean instanceOfRemoteMedia(Object o) { return false; diff --git a/core/src/free/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceFlavorHelper.java b/core/src/free/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceFlavorHelper.java index 4e6482fda..423faf558 100644 --- a/core/src/free/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceFlavorHelper.java +++ b/core/src/free/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceFlavorHelper.java @@ -8,7 +8,7 @@ import android.support.v4.media.session.PlaybackStateCompat; /** * Class intended to work along PlaybackService and provide support for different flavors. */ -public class PlaybackServiceFlavorHelper { +class PlaybackServiceFlavorHelper { private PlaybackService.FlavorHelperCallback callback; diff --git a/core/src/main/java/de/danoeh/antennapod/core/UpdateManager.java b/core/src/main/java/de/danoeh/antennapod/core/UpdateManager.java index 8362c4a4e..96e3a77be 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/UpdateManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/UpdateManager.java @@ -23,9 +23,9 @@ import de.danoeh.antennapod.core.storage.DBWriter; /* * This class's job is do perform maintenance tasks whenever the app has been updated */ -public class UpdateManager { +class UpdateManager { - public static final String TAG = UpdateManager.class.getSimpleName(); + private static final String TAG = UpdateManager.class.getSimpleName(); private static final String PREF_NAME = "app_version"; private static final String KEY_VERSION_CODE = "version_code"; @@ -55,11 +55,11 @@ public class UpdateManager { } } - public static int getStoredVersionCode() { + private static int getStoredVersionCode() { return prefs.getInt(KEY_VERSION_CODE, -1); } - public static void setCurrentVersionCode() { + private static void setCurrentVersionCode() { prefs.edit().putInt(KEY_VERSION_CODE, currentVersionCode).apply(); } diff --git a/core/src/main/java/de/danoeh/antennapod/core/asynctask/DBTaskLoader.java b/core/src/main/java/de/danoeh/antennapod/core/asynctask/DBTaskLoader.java index 0f402f44a..1b4aafeaa 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/asynctask/DBTaskLoader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/asynctask/DBTaskLoader.java @@ -8,7 +8,7 @@ import android.support.v4.content.AsyncTaskLoader; * This class will provide a useful default implementation that would otherwise always be necessary when interacting * with the DB*-classes with an AsyncTaskLoader. */ -public abstract class DBTaskLoader<D> extends AsyncTaskLoader<D> { +abstract class DBTaskLoader<D> extends AsyncTaskLoader<D> { public DBTaskLoader(Context context) { super(context); diff --git a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FeedRemover.java b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FeedRemover.java index 556dc3393..137ede81b 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FeedRemover.java +++ b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FeedRemover.java @@ -14,9 +14,9 @@ import de.danoeh.antennapod.core.storage.DBWriter; /** Removes a feed in the background. */ public class FeedRemover extends AsyncTask<Void, Void, Void> { - Context context; - ProgressDialog dialog; - Feed feed; + private Context context; + private ProgressDialog dialog; + private Feed feed; public boolean skipOnCompletion = false; public FeedRemover(Context context, Feed feed) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrClickWorker.java b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrClickWorker.java index ad7128233..5bd65f4e9 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrClickWorker.java +++ b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrClickWorker.java @@ -38,7 +38,7 @@ import de.danoeh.antennapod.core.util.flattr.FlattrUtils; * to flattr something, a notification will be displayed. */ public class FlattrClickWorker extends AsyncTask<Void, Integer, FlattrClickWorker.ExitCode> { - protected static final String TAG = "FlattrClickWorker"; + private static final String TAG = "FlattrClickWorker"; private static final int NOTIFICATION_ID = 4; diff --git a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrStatusFetcher.java b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrStatusFetcher.java index 4c084eaaf..4838a75d6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrStatusFetcher.java +++ b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrStatusFetcher.java @@ -18,8 +18,8 @@ import de.danoeh.antennapod.core.util.flattr.FlattrUtils; */ public class FlattrStatusFetcher extends Thread { - protected static final String TAG = "FlattrStatusFetcher"; - protected Context context; + private static final String TAG = "FlattrStatusFetcher"; + private Context context; public FlattrStatusFetcher(Context context) { super(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrTokenFetcher.java b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrTokenFetcher.java index bbd83d98c..5f19dbb78 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrTokenFetcher.java +++ b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrTokenFetcher.java @@ -22,12 +22,12 @@ import de.danoeh.antennapod.core.util.flattr.FlattrUtils; public class FlattrTokenFetcher extends AsyncTask<Void, Void, AccessToken> { private static final String TAG = "FlattrTokenFetcher"; - Context context; - AndroidAuthenticator auth; - AccessToken token; - Uri uri; - ProgressDialog dialog; - FlattrException exception; + private Context context; + private AndroidAuthenticator auth; + private AccessToken token; + private Uri uri; + private ProgressDialog dialog; + private FlattrException exception; public FlattrTokenFetcher(Context context, AndroidAuthenticator auth, Uri uri) { super(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java b/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java index b14803751..f7706cd5f 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java +++ b/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java @@ -15,7 +15,7 @@ public abstract class ConfirmationDialog { private static final String TAG = ConfirmationDialog.class.getSimpleName(); - protected Context context; + private Context context; private int titleId; private String message; @@ -32,7 +32,7 @@ public abstract class ConfirmationDialog { this.message = message; } - public void onCancelButtonPressed(DialogInterface dialog) { + private void onCancelButtonPressed(DialogInterface dialog) { Log.d(TAG, "Dialog was cancelled"); dialog.dismiss(); } diff --git a/core/src/main/java/de/danoeh/antennapod/core/event/FavoritesEvent.java b/core/src/main/java/de/danoeh/antennapod/core/event/FavoritesEvent.java index d09f6802f..578007561 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/event/FavoritesEvent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/event/FavoritesEvent.java @@ -11,8 +11,8 @@ public class FavoritesEvent { ADDED, REMOVED } - public final Action action; - public final FeedItem item; + private final Action action; + private final FeedItem item; private FavoritesEvent(Action action, FeedItem item) { this.action = action; diff --git a/core/src/main/java/de/danoeh/antennapod/core/event/FeedItemEvent.java b/core/src/main/java/de/danoeh/antennapod/core/event/FeedItemEvent.java index 7ff241456..9db262857 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/event/FeedItemEvent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/event/FeedItemEvent.java @@ -17,7 +17,8 @@ public class FeedItemEvent { UPDATE, DELETE_MEDIA } - @NonNull public final Action action; + @NonNull + private final Action action; @NonNull public final List<FeedItem> items; private FeedItemEvent(Action action, List<FeedItem> items) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/event/FeedMediaEvent.java b/core/src/main/java/de/danoeh/antennapod/core/event/FeedMediaEvent.java index 864d0a405..4a591c996 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/event/FeedMediaEvent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/event/FeedMediaEvent.java @@ -8,8 +8,8 @@ public class FeedMediaEvent { UPDATE } - public final Action action; - public final FeedMedia media; + private final Action action; + private final FeedMedia media; private FeedMediaEvent(Action action, FeedMedia media) { this.action = action; diff --git a/core/src/main/java/de/danoeh/antennapod/core/export/opml/OpmlSymbols.java b/core/src/main/java/de/danoeh/antennapod/core/export/opml/OpmlSymbols.java index 40b0e23b8..86091720d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/export/opml/OpmlSymbols.java +++ b/core/src/main/java/de/danoeh/antennapod/core/export/opml/OpmlSymbols.java @@ -3,7 +3,7 @@ package de.danoeh.antennapod.core.export.opml; import de.danoeh.antennapod.core.export.CommonSymbols; /** Contains symbols for reading and writing OPML documents. */ -public final class OpmlSymbols extends CommonSymbols { +final class OpmlSymbols extends CommonSymbols { public static final String OPML = "opml"; static final String OUTLINE = "outline"; diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/Chapter.java b/core/src/main/java/de/danoeh/antennapod/core/feed/Chapter.java index f221ed32e..f3dfdfdb6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/Chapter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/Chapter.java @@ -7,19 +7,19 @@ import de.danoeh.antennapod.core.storage.PodDBAdapter; public abstract class Chapter extends FeedComponent { /** Defines starting point in milliseconds. */ - protected long start; - protected String title; - protected String link; + long start; + String title; + String link; - public Chapter() { + Chapter() { } - public Chapter(long start) { + Chapter(long start) { super(); this.start = start; } - public Chapter(long start, String title, FeedItem item, String link) { + Chapter(long start, String title, FeedItem item, String link) { super(); this.start = start; this.title = title; diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/EventDistributor.java b/core/src/main/java/de/danoeh/antennapod/core/feed/EventDistributor.java index 514a79fad..3c79e49ca 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/EventDistributor.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/EventDistributor.java @@ -52,7 +52,7 @@ public class EventDistributor extends Observable { deleteObserver(el); } - public void addEvent(Integer i) { + private void addEvent(Integer i) { events.offer(i); handler.post(EventDistributor.this::processEventQueue); } diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedComponent.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedComponent.java index 90b5e50b7..a3f91b1c9 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedComponent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedComponent.java @@ -7,9 +7,9 @@ package de.danoeh.antennapod.core.feed; */ public abstract class FeedComponent { - protected long id; + long id; - public FeedComponent() { + FeedComponent() { super(); } @@ -26,7 +26,7 @@ public abstract class FeedComponent { * FeedComponent. This method should only update attributes which where read from * the feed. */ - public void updateFromOther(FeedComponent other) { + void updateFromOther(FeedComponent other) { } /** @@ -36,7 +36,7 @@ public abstract class FeedComponent { * * @return true if attribute values are different, false otherwise */ - public boolean compareWithOther(FeedComponent other) { + boolean compareWithOther(FeedComponent other) { return false; } diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedEvent.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedEvent.java index d04d236e4..b790faadf 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedEvent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedEvent.java @@ -9,7 +9,7 @@ public class FeedEvent { FILTER_CHANGED } - public final Action action; + private final Action action; public final long feedId; public FeedEvent(Action action, long feedId) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedFile.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedFile.java index ca9af058b..cc4dd230f 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedFile.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedFile.java @@ -9,9 +9,9 @@ import java.io.File; */ public abstract class FeedFile extends FeedComponent { - protected String file_url; + String file_url; protected String download_url; - protected boolean downloaded; + boolean downloaded; /** * Creates a new FeedFile object. @@ -40,7 +40,7 @@ public abstract class FeedFile extends FeedComponent { * FeedFile. This method should only update attributes which where read from * the feed. */ - public void updateFromOther(FeedFile other) { + void updateFromOther(FeedFile other) { super.updateFromOther(other); this.download_url = other.download_url; } @@ -52,7 +52,7 @@ public abstract class FeedFile extends FeedComponent { * * @return true if attribute values are different, false otherwise */ - public boolean compareWithOther(FeedFile other) { + boolean compareWithOther(FeedFile other) { if (super.compareWithOther(other)) { return true; } diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedImage.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedImage.java index f0c508830..45bd2ad31 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedImage.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedImage.java @@ -11,8 +11,8 @@ import de.danoeh.antennapod.core.storage.PodDBAdapter; public class FeedImage extends FeedFile implements ImageResource { public static final int FEEDFILETYPE_FEEDIMAGE = 1; - protected String title; - protected FeedComponent owner; + private String title; + private FeedComponent owner; public FeedImage(FeedComponent owner, String download_url, String title) { super(null, download_url, false); diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java index 5eea4f3da..2d551e1b2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java @@ -34,7 +34,7 @@ public class FeedMedia extends FeedFile implements Playable { public static final int PLAYABLE_TYPE_FEEDMEDIA = 1; public static final String PREF_MEDIA_ID = "FeedMedia.PrefMediaId"; - public static final String PREF_FEED_ID = "FeedMedia.PrefFeedId"; + private static final String PREF_FEED_ID = "FeedMedia.PrefFeedId"; /** * Indicates we've checked on the size of the item via the network @@ -88,10 +88,10 @@ public class FeedMedia extends FeedFile implements Playable { this.lastPlayedTime = lastPlayedTime; } - public FeedMedia(long id, FeedItem item, int duration, int position, - long size, String mime_type, String file_url, String download_url, - boolean downloaded, Date playbackCompletionDate, int played_duration, - Boolean hasEmbeddedPicture, long lastPlayedTime) { + private FeedMedia(long id, FeedItem item, int duration, int position, + long size, String mime_type, String file_url, String download_url, + boolean downloaded, Date playbackCompletionDate, int played_duration, + Boolean hasEmbeddedPicture, long lastPlayedTime) { this(id, item, duration, position, size, mime_type, file_url, download_url, downloaded, playbackCompletionDate, played_duration, lastPlayedTime); this.hasEmbeddedPicture = hasEmbeddedPicture; diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java index 66fc4024b..3285ad7cb 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java @@ -33,7 +33,7 @@ public class FeedPreferences { this(feedID, autoDownload, true, auto_delete_action, username, password, new FeedFilter()); } - public FeedPreferences(long feedID, boolean autoDownload, boolean keepUpdated, AutoDeleteAction auto_delete_action, String username, String password, @NonNull FeedFilter filter) { + private FeedPreferences(long feedID, boolean autoDownload, boolean keepUpdated, AutoDeleteAction auto_delete_action, String username, String password, @NonNull FeedFilter filter) { this.feedID = feedID; this.autoDownload = autoDownload; this.keepUpdated = keepUpdated; diff --git a/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java b/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java index 8ca9faa0d..7f248bcac 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java @@ -27,7 +27,7 @@ import okhttp3.Response; /** * @see com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader */ -public class ApOkHttpUrlLoader implements ModelLoader<String, InputStream> { +class ApOkHttpUrlLoader implements ModelLoader<String, InputStream> { private static final String TAG = ApOkHttpUrlLoader.class.getSimpleName(); @@ -80,7 +80,7 @@ public class ApOkHttpUrlLoader implements ModelLoader<String, InputStream> { private final OkHttpClient client; - public ApOkHttpUrlLoader(OkHttpClient client) { + private ApOkHttpUrlLoader(OkHttpClient client) { this.client = client; } diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetServiceBadStatusCodeException.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetServiceBadStatusCodeException.java index 16f01f0f4..2edecca65 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetServiceBadStatusCodeException.java +++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetServiceBadStatusCodeException.java @@ -1,7 +1,7 @@ package de.danoeh.antennapod.core.gpoddernet; -public class GpodnetServiceBadStatusCodeException extends GpodnetServiceException { - int statusCode; +class GpodnetServiceBadStatusCodeException extends GpodnetServiceException { + private int statusCode; public GpodnetServiceBadStatusCodeException(String message, int statusCode) { super(message); diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetServiceException.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetServiceException.java index ce704f7e3..78ddfc945 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetServiceException.java +++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetServiceException.java @@ -2,10 +2,10 @@ package de.danoeh.antennapod.core.gpoddernet; public class GpodnetServiceException extends Exception { - public GpodnetServiceException() { + GpodnetServiceException() { } - public GpodnetServiceException(String message) { + GpodnetServiceException(String message) { super(message); } @@ -13,7 +13,7 @@ public class GpodnetServiceException extends Exception { super(cause); } - public GpodnetServiceException(String message, Throwable cause) { + GpodnetServiceException(String message, Throwable cause) { super(message, cause); } } diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeAction.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeAction.java index e98ece83d..3a2ff31dc 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeAction.java +++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeAction.java @@ -131,7 +131,7 @@ public class GpodnetEpisodeAction { return this.action; } - public String getActionString() { + private String getActionString() { return this.action.name().toLowerCase(); } diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java index 03c33c9a1..b6efab016 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java +++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java @@ -21,9 +21,9 @@ public class GpodnetEpisodeActionPostResponse { * URLs that should be updated. The key of the map is the original URL, the value of the map * is the sanitized URL. */ - public final Map<String, String> updatedUrls; + private final Map<String, String> updatedUrls; - public GpodnetEpisodeActionPostResponse(long timestamp, Map<String, String> updatedUrls) { + private GpodnetEpisodeActionPostResponse(long timestamp, Map<String, String> updatedUrls) { this.timestamp = timestamp; this.updatedUrls = updatedUrls; } diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetTag.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetTag.java index 42a31afc5..40543592e 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetTag.java +++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetTag.java @@ -16,7 +16,7 @@ public class GpodnetTag implements Parcelable { this.usage = usage; } - protected GpodnetTag(Parcel in) { + private GpodnetTag(Parcel in) { title = in.readString(); tag = in.readString(); usage = in.readInt(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java index 9bd1881e4..9f9c3bd74 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java +++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java @@ -22,9 +22,9 @@ public class GpodnetUploadChangesResponse { * URLs that should be updated. The key of the map is the original URL, the value of the map * is the sanitized URL. */ - public final Map<String, String> updatedUrls; + private final Map<String, String> updatedUrls; - public GpodnetUploadChangesResponse(long timestamp, Map<String, String> updatedUrls) { + private GpodnetUploadChangesResponse(long timestamp, Map<String, String> updatedUrls) { this.timestamp = timestamp; this.updatedUrls = updatedUrls; } diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/GpodnetPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/GpodnetPreferences.java index 8efedcfc8..d2281bc9e 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/preferences/GpodnetPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/GpodnetPreferences.java @@ -27,19 +27,19 @@ public class GpodnetPreferences { private static final String TAG = "GpodnetPreferences"; private static final String PREF_NAME = "gpodder.net"; - public static final String PREF_GPODNET_USERNAME = "de.danoeh.antennapod.preferences.gpoddernet.username"; - public static final String PREF_GPODNET_PASSWORD = "de.danoeh.antennapod.preferences.gpoddernet.password"; - public static final String PREF_GPODNET_DEVICEID = "de.danoeh.antennapod.preferences.gpoddernet.deviceID"; - public static final String PREF_GPODNET_HOSTNAME = "prefGpodnetHostname"; + private static final String PREF_GPODNET_USERNAME = "de.danoeh.antennapod.preferences.gpoddernet.username"; + private static final String PREF_GPODNET_PASSWORD = "de.danoeh.antennapod.preferences.gpoddernet.password"; + private static final String PREF_GPODNET_DEVICEID = "de.danoeh.antennapod.preferences.gpoddernet.deviceID"; + private static final String PREF_GPODNET_HOSTNAME = "prefGpodnetHostname"; - public static final String PREF_LAST_SUBSCRIPTION_SYNC_TIMESTAMP = "de.danoeh.antennapod.preferences.gpoddernet.last_sync_timestamp"; - public static final String PREF_LAST_EPISODE_ACTIONS_SYNC_TIMESTAMP = "de.danoeh.antennapod.preferences.gpoddernet.last_episode_actions_sync_timestamp"; - public static final String PREF_SYNC_ADDED = "de.danoeh.antennapod.preferences.gpoddernet.sync_added"; - public static final String PREF_SYNC_REMOVED = "de.danoeh.antennapod.preferences.gpoddernet.sync_removed"; - public static final String PREF_SYNC_EPISODE_ACTIONS = "de.danoeh.antennapod.preferences.gpoddernet.sync_queued_episode_actions"; + private static final String PREF_LAST_SUBSCRIPTION_SYNC_TIMESTAMP = "de.danoeh.antennapod.preferences.gpoddernet.last_sync_timestamp"; + private static final String PREF_LAST_EPISODE_ACTIONS_SYNC_TIMESTAMP = "de.danoeh.antennapod.preferences.gpoddernet.last_episode_actions_sync_timestamp"; + private static final String PREF_SYNC_ADDED = "de.danoeh.antennapod.preferences.gpoddernet.sync_added"; + private static final String PREF_SYNC_REMOVED = "de.danoeh.antennapod.preferences.gpoddernet.sync_removed"; + private static final String PREF_SYNC_EPISODE_ACTIONS = "de.danoeh.antennapod.preferences.gpoddernet.sync_queued_episode_actions"; public static final String PREF_LAST_SYNC_ATTEMPT_TIMESTAMP = "de.danoeh.antennapod.preferences.gpoddernet.last_sync_attempt_timestamp"; - public static final String PREF_LAST_SYNC_ATTEMPT_RESULT = "de.danoeh.antennapod.preferences.gpoddernet.last_sync_attempt_result"; + private static final String PREF_LAST_SYNC_ATTEMPT_RESULT = "de.danoeh.antennapod.preferences.gpoddernet.last_sync_attempt_result"; private static String username; private static String password; diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java index c66ffd138..72d62eba8 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java @@ -42,79 +42,79 @@ import de.danoeh.antennapod.core.util.Converter; */ public class UserPreferences { - public static final String IMPORT_DIR = "import/"; + private static final String IMPORT_DIR = "import/"; private static final String TAG = "UserPreferences"; // User Interface public static final String PREF_THEME = "prefTheme"; public static final String PREF_HIDDEN_DRAWER_ITEMS = "prefHiddenDrawerItems"; - public static final String PREF_DRAWER_FEED_ORDER = "prefDrawerFeedOrder"; - public static final String PREF_DRAWER_FEED_COUNTER = "prefDrawerFeedIndicator"; - public static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify"; - public static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify"; + private static final String PREF_DRAWER_FEED_ORDER = "prefDrawerFeedOrder"; + private static final String PREF_DRAWER_FEED_COUNTER = "prefDrawerFeedIndicator"; + private static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify"; + private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify"; public static final String PREF_COMPACT_NOTIFICATION_BUTTONS = "prefCompactNotificationButtons"; public static final String PREF_LOCKSCREEN_BACKGROUND = "prefLockscreenBackground"; - public static final String PREF_SHOW_DOWNLOAD_REPORT = "prefShowDownloadReport"; + private static final String PREF_SHOW_DOWNLOAD_REPORT = "prefShowDownloadReport"; // Queue - public static final String PREF_QUEUE_ADD_TO_FRONT = "prefQueueAddToFront"; + private static final String PREF_QUEUE_ADD_TO_FRONT = "prefQueueAddToFront"; // Playback public static final String PREF_PAUSE_ON_HEADSET_DISCONNECT = "prefPauseOnHeadsetDisconnect"; public static final String PREF_UNPAUSE_ON_HEADSET_RECONNECT = "prefUnpauseOnHeadsetReconnect"; - public static final String PREF_UNPAUSE_ON_BLUETOOTH_RECONNECT = "prefUnpauseOnBluetoothReconnect"; - public static final String PREF_HARDWARE_FOWARD_BUTTON_SKIPS = "prefHardwareForwardButtonSkips"; - public static final String PREF_HARDWARE_PREVIOUS_BUTTON_RESTARTS = "prefHardwarePreviousButtonRestarts"; + private static final String PREF_UNPAUSE_ON_BLUETOOTH_RECONNECT = "prefUnpauseOnBluetoothReconnect"; + private static final String PREF_HARDWARE_FOWARD_BUTTON_SKIPS = "prefHardwareForwardButtonSkips"; + private static final String PREF_HARDWARE_PREVIOUS_BUTTON_RESTARTS = "prefHardwarePreviousButtonRestarts"; public static final String PREF_FOLLOW_QUEUE = "prefFollowQueue"; - public static final String PREF_SKIP_KEEPS_EPISODE = "prefSkipKeepsEpisode"; - public static final String PREF_FAVORITE_KEEPS_EPISODE = "prefFavoriteKeepsEpisode"; - public static final String PREF_AUTO_DELETE = "prefAutoDelete"; + private static final String PREF_SKIP_KEEPS_EPISODE = "prefSkipKeepsEpisode"; + private static final String PREF_FAVORITE_KEEPS_EPISODE = "prefFavoriteKeepsEpisode"; + private static final String PREF_AUTO_DELETE = "prefAutoDelete"; public static final String PREF_SMART_MARK_AS_PLAYED_SECS = "prefSmartMarkAsPlayedSecs"; - public static final String PREF_PLAYBACK_SPEED_ARRAY = "prefPlaybackSpeedArray"; - public static final String PREF_PAUSE_PLAYBACK_FOR_FOCUS_LOSS = "prefPauseForFocusLoss"; - public static final String PREF_RESUME_AFTER_CALL = "prefResumeAfterCall"; + private static final String PREF_PLAYBACK_SPEED_ARRAY = "prefPlaybackSpeedArray"; + private static final String PREF_PAUSE_PLAYBACK_FOR_FOCUS_LOSS = "prefPauseForFocusLoss"; + private static final String PREF_RESUME_AFTER_CALL = "prefResumeAfterCall"; // Network - public static final String PREF_ENQUEUE_DOWNLOADED = "prefEnqueueDownloaded"; + private static final String PREF_ENQUEUE_DOWNLOADED = "prefEnqueueDownloaded"; public static final String PREF_UPDATE_INTERVAL = "prefAutoUpdateIntervall"; - public static final String PREF_MOBILE_UPDATE = "prefMobileUpdate"; + private static final String PREF_MOBILE_UPDATE = "prefMobileUpdate"; public static final String PREF_EPISODE_CLEANUP = "prefEpisodeCleanup"; public static final String PREF_PARALLEL_DOWNLOADS = "prefParallelDownloads"; public static final String PREF_EPISODE_CACHE_SIZE = "prefEpisodeCacheSize"; public static final String PREF_ENABLE_AUTODL = "prefEnableAutoDl"; public static final String PREF_ENABLE_AUTODL_ON_BATTERY = "prefEnableAutoDownloadOnBattery"; public static final String PREF_ENABLE_AUTODL_WIFI_FILTER = "prefEnableAutoDownloadWifiFilter"; - public static final String PREF_ENABLE_AUTODL_ON_MOBILE = "prefEnableAutoDownloadOnMobile"; - public static final String PREF_AUTODL_SELECTED_NETWORKS = "prefAutodownloadSelectedNetworks"; - public static final String PREF_PROXY_TYPE = "prefProxyType"; - public static final String PREF_PROXY_HOST = "prefProxyHost"; - public static final String PREF_PROXY_PORT = "prefProxyPort"; - public static final String PREF_PROXY_USER = "prefProxyUser"; - public static final String PREF_PROXY_PASSWORD = "prefProxyPassword"; + private static final String PREF_ENABLE_AUTODL_ON_MOBILE = "prefEnableAutoDownloadOnMobile"; + private static final String PREF_AUTODL_SELECTED_NETWORKS = "prefAutodownloadSelectedNetworks"; + private static final String PREF_PROXY_TYPE = "prefProxyType"; + private static final String PREF_PROXY_HOST = "prefProxyHost"; + private static final String PREF_PROXY_PORT = "prefProxyPort"; + private static final String PREF_PROXY_USER = "prefProxyUser"; + private static final String PREF_PROXY_PASSWORD = "prefProxyPassword"; // Services - public static final String PREF_AUTO_FLATTR = "pref_auto_flattr"; - public static final String PREF_AUTO_FLATTR_PLAYED_DURATION_THRESHOLD = "prefAutoFlattrPlayedDurationThreshold"; - public static final String PREF_GPODNET_NOTIFICATIONS = "pref_gpodnet_notifications"; + private static final String PREF_AUTO_FLATTR = "pref_auto_flattr"; + private static final String PREF_AUTO_FLATTR_PLAYED_DURATION_THRESHOLD = "prefAutoFlattrPlayedDurationThreshold"; + private static final String PREF_GPODNET_NOTIFICATIONS = "pref_gpodnet_notifications"; // Other - public static final String PREF_DATA_FOLDER = "prefDataFolder"; + private static final String PREF_DATA_FOLDER = "prefDataFolder"; public static final String PREF_IMAGE_CACHE_SIZE = "prefImageCacheSize"; // Mediaplayer - public static final String PREF_PLAYBACK_SPEED = "prefPlaybackSpeed"; + private static final String PREF_PLAYBACK_SPEED = "prefPlaybackSpeed"; private static final String PREF_FAST_FORWARD_SECS = "prefFastForwardSecs"; private static final String PREF_REWIND_SECS = "prefRewindSecs"; - public static final String PREF_QUEUE_LOCKED = "prefQueueLocked"; - public static final String IMAGE_CACHE_DEFAULT_VALUE = "100"; - public static final int IMAGE_CACHE_SIZE_MINIMUM = 20; - public static final String PREF_LEFT_VOLUME = "prefLeftVolume"; - public static final String PREF_RIGHT_VOLUME = "prefRightVolume"; + private static final String PREF_QUEUE_LOCKED = "prefQueueLocked"; + private static final String IMAGE_CACHE_DEFAULT_VALUE = "100"; + private static final int IMAGE_CACHE_SIZE_MINIMUM = 20; + private static final String PREF_LEFT_VOLUME = "prefLeftVolume"; + private static final String PREF_RIGHT_VOLUME = "prefRightVolume"; // Experimental public static final String PREF_SONIC = "prefSonic"; - public static final String PREF_STEREO_TO_MONO = "PrefStereoToMono"; + private static final String PREF_STEREO_TO_MONO = "PrefStereoToMono"; public static final String PREF_NORMALIZER = "prefNormalizer"; public static final String PREF_CAST_ENABLED = "prefCast"; //Used for enabling Chromecast support public static final int EPISODE_CLEANUP_QUEUE = -1; @@ -786,7 +786,7 @@ public class UserPreferences { /** * Sets the interval in which the feeds are refreshed automatically */ - public static void restartUpdateIntervalAlarm(long triggerAtMillis, long intervalMillis) { + private static void restartUpdateIntervalAlarm(long triggerAtMillis, long intervalMillis) { Log.d(TAG, "Restarting update alarm."); AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); Intent intent = new Intent(context, FeedUpdateReceiver.class); @@ -805,7 +805,7 @@ public class UserPreferences { /** * Sets time of day the feeds are refreshed automatically */ - public static void restartUpdateTimeOfDayAlarm(int hoursOfDay, int minute) { + private static void restartUpdateTimeOfDayAlarm(int hoursOfDay, int minute) { Log.d(TAG, "Restarting update alarm."); AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); PendingIntent updateIntent = PendingIntent.getBroadcast(context, 0, diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java b/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java index 6b3ece4ab..7f45c5ae3 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java @@ -47,11 +47,11 @@ public class GpodnetSyncService extends Service { private static final long WAIT_INTERVAL = 5000L; - public static final String ARG_ACTION = "action"; + private static final String ARG_ACTION = "action"; - public static final String ACTION_SYNC = "de.danoeh.antennapod.intent.action.sync"; - public static final String ACTION_SYNC_SUBSCRIPTIONS = "de.danoeh.antennapod.intent.action.sync_subscriptions"; - public static final String ACTION_SYNC_ACTIONS = "de.danoeh.antennapod.intent.action.sync_ACTIONS"; + private static final String ACTION_SYNC = "de.danoeh.antennapod.intent.action.sync"; + private static final String ACTION_SYNC_SUBSCRIPTIONS = "de.danoeh.antennapod.intent.action.sync_subscriptions"; + private static final String ACTION_SYNC_ACTIONS = "de.danoeh.antennapod.intent.action.sync_ACTIONS"; private GpodnetService service; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java index eb28050f0..57d099dfc 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java @@ -42,10 +42,10 @@ import okhttp3.internal.http.StatusLine; public class AntennapodHttpClient { private static final String TAG = "AntennapodHttpClient"; - public static final int CONNECTION_TIMEOUT = 30000; - public static final int READ_TIMEOUT = 30000; + private static final int CONNECTION_TIMEOUT = 30000; + private static final int READ_TIMEOUT = 30000; - public static final int MAX_CONNECTIONS = 8; + private static final int MAX_CONNECTIONS = 8; private static volatile OkHttpClient httpClient = null; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadRequest.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadRequest.java index de91916a9..d910f6fef 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadRequest.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadRequest.java @@ -22,10 +22,10 @@ public class DownloadRequest implements Parcelable { private final int feedfileType; private final Bundle arguments; - protected int progressPercent; - protected long soFar; - protected long size; - protected int statusMsg; + private int progressPercent; + private long soFar; + private long size; + private int statusMsg; public DownloadRequest(@NonNull String destination, @NonNull String source, @@ -53,7 +53,7 @@ public class DownloadRequest implements Parcelable { this(destination, source, title, feedfileId, feedfileType, null, null, true, null); } - public DownloadRequest(Builder builder) { + private DownloadRequest(Builder builder) { this.destination = builder.destination; this.source = builder.source; this.title = builder.title; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java index f3cc8f86a..dd9ea8171 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java @@ -534,14 +534,14 @@ public class DownloadService extends Service { * Calls query downloads on the services main thread. This method should be used instead of queryDownloads if it is * used from a thread other than the main thread. */ - void queryDownloadsAsync() { + private void queryDownloadsAsync() { handler.post(DownloadService.this::queryDownloads); } /** * Check if there's something else to download, otherwise stop */ - void queryDownloads() { + private void queryDownloads() { Log.d(TAG, numberOfDownloads.get() + " downloads left"); if (numberOfDownloads.get() <= 0 && DownloadRequester.getInstance().hasNoDownloads()) { @@ -1091,7 +1091,7 @@ public class DownloadService extends Service { private long lastPost = 0; - final Runnable postDownloaderTask = new Runnable() { + private final Runnable postDownloaderTask = new Runnable() { @Override public void run() { List<Downloader> list = Collections.unmodifiableList(downloads); diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadStatus.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadStatus.java index ed2b00dfe..a09790f9f 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadStatus.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadStatus.java @@ -19,37 +19,37 @@ public class DownloadStatus { // ----------------------------------- ATTRIBUTES STORED IN DB /** Unique id for storing the object in database. */ - protected long id; + private long id; /** * A human-readable string which is shown to the user so that he can * identify the download. Should be the title of the item/feed/media or the * URL if the download has no other title. */ - protected String title; - protected DownloadError reason; + private String title; + private DownloadError reason; /** * A message which can be presented to the user to give more information. * Should be null if Download was successful. */ - protected String reasonDetailed; - protected boolean successful; - protected Date completionDate; - protected long feedfileId; + private String reasonDetailed; + private boolean successful; + private Date completionDate; + private long feedfileId; /** * Is used to determine the type of the feedfile even if the feedfile does * not exist anymore. The value should be FEEDFILETYPE_FEED, * FEEDFILETYPE_FEEDIMAGE or FEEDFILETYPE_FEEDMEDIA */ - protected int feedfileType; + private int feedfileType; // ------------------------------------ NOT STORED IN DB - protected boolean done; - protected boolean cancelled; + private boolean done; + private boolean cancelled; /** Constructor for restoring Download status entries from DB. */ - public DownloadStatus(long id, String title, long feedfileId, - int feedfileType, boolean successful, DownloadError reason, - Date completionDate, String reasonDetailed) { + private DownloadStatus(long id, String title, long feedfileId, + int feedfileType, boolean successful, DownloadError reason, + Date completionDate, String reasonDetailed) { this.id = id; this.title = title; this.done = true; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/Downloader.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/Downloader.java index d8042d202..4a3377d70 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/Downloader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/Downloader.java @@ -14,14 +14,14 @@ import de.danoeh.antennapod.core.R; public abstract class Downloader implements Callable<Downloader> { private static final String TAG = "Downloader"; - protected volatile boolean finished; + private volatile boolean finished; - protected volatile boolean cancelled; + volatile boolean cancelled; - protected DownloadRequest request; - protected DownloadStatus result; + DownloadRequest request; + DownloadStatus result; - public Downloader(DownloadRequest request) { + Downloader(DownloadRequest request) { super(); this.request = request; this.request.setStatusMsg(R.string.download_pending); diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java index a2105c2e8..6c99f1214 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java @@ -32,7 +32,7 @@ import de.danoeh.antennapod.core.util.playback.VideoPlayer; * Manages the MediaPlayer object of the PlaybackService. */ public class LocalPSMP extends PlaybackServiceMediaPlayer { - public static final String TAG = "LclPlaybackSvcMPlayer"; + private static final String TAG = "LclPlaybackSvcMPlayer"; private final AudioManager audioManager; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index 5fd6600bf..cb69078ca 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -88,7 +88,7 @@ public class PlaybackService extends MediaBrowserServiceCompat { /** * True if cast session should disconnect. */ - public static final String EXTRA_CAST_DISCONNECT = "extra.de.danoeh.antennapod.core.service.castDisconnect"; + private static final String EXTRA_CAST_DISCONNECT = "extra.de.danoeh.antennapod.core.service.castDisconnect"; /** * True if media should be streamed. */ @@ -198,7 +198,7 @@ public class PlaybackService extends MediaBrowserServiceCompat { /** * Is true if the service was running, but paused due to headphone disconnect */ - public static boolean transientPause = false; + private static boolean transientPause = false; /** * Is true if a Cast Device is connected to the service. */ @@ -1630,7 +1630,7 @@ public class PlaybackService extends MediaBrowserServiceCompat { } - public void seekDelta(final int d) { + private void seekDelta(final int d) { mediaPlayer.seekDelta(d); } diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java index 393019fd1..20b3cc6d6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java @@ -24,14 +24,14 @@ import de.danoeh.antennapod.core.util.playback.Playable; * and remote (cast devices) playback. */ public abstract class PlaybackServiceMediaPlayer { - public static final String TAG = "PlaybackSvcMediaPlayer"; + private static final String TAG = "PlaybackSvcMediaPlayer"; /** * Return value of some PSMP methods if the method call failed. */ static final int INVALID_TIME = -1; - volatile PlayerStatus oldPlayerStatus; + private volatile PlayerStatus oldPlayerStatus; volatile PlayerStatus playerStatus; /** @@ -39,8 +39,8 @@ public abstract class PlaybackServiceMediaPlayer { */ private WifiManager.WifiLock wifiLock; - protected final PSMPCallback callback; - protected final Context context; + final PSMPCallback callback; + final Context context; PlaybackServiceMediaPlayer(@NonNull Context context, @NonNull PSMPCallback callback){ diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java index 0c7d5e718..3d97e862a 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java @@ -295,7 +295,7 @@ public class PlaybackServiceTaskManager { /** * Sleeps for a given time and then pauses playback. */ - protected class SleepTimer implements Runnable { + class SleepTimer implements Runnable { private static final String TAG = "SleepTimer"; private static final long UPDATE_INTERVAL = 1000L; private static final long NOTIFICATION_THRESHOLD = 10000; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java index fcd96826b..53b5007b6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java @@ -7,7 +7,7 @@ import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.util.Log; -public class ShakeListener implements SensorEventListener +class ShakeListener implements SensorEventListener { private static final String TAG = ShakeListener.class.getSimpleName(); @@ -22,7 +22,7 @@ public class ShakeListener implements SensorEventListener resume(); } - public void resume() { + private void resume() { // only a precaution, the user should actually not be able to activate shake to reset // when the accelerometer is not available mSensorMgr = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE); diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java index 743accb08..9a4ae1151 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java @@ -44,7 +44,7 @@ public final class DBReader { /** * Maximum size of the list returned by {@link #getDownloadLog()}. */ - public static final int DOWNLOAD_LOG_SIZE = 200; + private static final int DOWNLOAD_LOG_SIZE = 200; private DBReader() { @@ -120,7 +120,7 @@ public final class DBReader { loadFeedDataOfFeedItemList(items); } - public static void loadTagsOfFeedItemList(List<FeedItem> items) { + private static void loadTagsOfFeedItemList(List<FeedItem> items) { LongList favoriteIds = getFavoriteIDList(); LongList queueIds = getQueueIDList(); @@ -141,7 +141,7 @@ public final class DBReader { * * @param items The FeedItems whose Feed-objects should be loaded. */ - public static void loadFeedDataOfFeedItemList(List<FeedItem> items) { + private static void loadFeedDataOfFeedItemList(List<FeedItem> items) { List<Feed> feeds = getFeedList(); Map<Long, Feed> feedIndex = new ArrayMap<>(feeds.size()); @@ -412,7 +412,7 @@ public final class DBReader { } } - public static LongList getFavoriteIDList() { + private static LongList getFavoriteIDList() { Log.d(TAG, "getFavoriteIDList() called"); PodDBAdapter adapter = PodDBAdapter.getInstance(); @@ -663,7 +663,7 @@ public final class DBReader { } } - static FeedItem getFeedItem(final String podcastUrl, final String episodeUrl, PodDBAdapter adapter) { + private static FeedItem getFeedItem(final String podcastUrl, final String episodeUrl, PodDBAdapter adapter) { Log.d(TAG, "Loading feeditem with podcast url " + podcastUrl + " and episode url " + episodeUrl); Cursor cursor = null; try { @@ -797,7 +797,7 @@ public final class DBReader { } } - static void loadChaptersOfFeedItem(PodDBAdapter adapter, FeedItem item) { + private static void loadChaptersOfFeedItem(PodDBAdapter adapter, FeedItem item) { Cursor cursor = null; try { cursor = adapter.getSimpleChaptersOfFeedItemCursor(item); diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java index 90ef217ff..4e332c3ad 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java @@ -47,7 +47,7 @@ import static android.content.Context.MODE_PRIVATE; public final class DBTasks { private static final String TAG = "DBTasks"; - public static final String PREF_NAME = "dbtasks"; + private static final String PREF_NAME = "dbtasks"; private static final String PREF_LAST_REFRESH = "last_refresh"; /** @@ -292,7 +292,7 @@ public final class DBTasks { * @param context Used for requesting the download. * @param feed The Feed object. */ - public static void refreshFeed(Context context, Feed feed) + private static void refreshFeed(Context context, Feed feed) throws DownloadRequestException { Log.d(TAG, "refreshFeed(feed.id: " + feed.getId() +")"); refreshFeed(context, feed, false, false); @@ -820,7 +820,7 @@ public final class DBTasks { public abstract void execute(PodDBAdapter adapter); - protected void setResult(T result) { + void setResult(T result) { this.result = result; } } diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java index aed6fa8b4..75510d2f6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java @@ -838,9 +838,9 @@ public class DBWriter { * * @param startFlattrClickWorker true if FlattrClickWorker should be started after the FlattrStatus has been saved */ - public static Future<?> setFeedItemFlattrStatus(final Context context, - final FeedItem item, - final boolean startFlattrClickWorker) { + private static Future<?> setFeedItemFlattrStatus(final Context context, + final FeedItem item, + final boolean startFlattrClickWorker) { return dbExec.submit(() -> { PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java index 933be07ff..0e0165a37 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java @@ -33,8 +33,8 @@ public class DownloadRequester { private static final String TAG = "DownloadRequester"; public static final String IMAGE_DOWNLOADPATH = "images/"; - public static final String FEED_DOWNLOADPATH = "cache/"; - public static final String MEDIA_DOWNLOADPATH = "media/"; + private static final String FEED_DOWNLOADPATH = "cache/"; + private static final String MEDIA_DOWNLOADPATH = "media/"; /** * Denotes the page of the feed that is contained in the DownloadRequest sent by the DownloadRequester. @@ -305,13 +305,13 @@ public class DownloadRequester { return downloads.size(); } - public synchronized String getFeedfilePath(Context context) + private synchronized String getFeedfilePath(Context context) throws DownloadRequestException { return getExternalFilesDirOrThrowException(context, FEED_DOWNLOADPATH) .toString() + "/"; } - public synchronized String getFeedfileName(Feed feed) { + private synchronized String getFeedfileName(Feed feed) { String filename = feed.getDownload_url(); if (feed.getTitle() != null && !feed.getTitle().isEmpty()) { filename = feed.getTitle(); @@ -319,7 +319,7 @@ public class DownloadRequester { return "feed-" + FileNameGenerator.generateFileName(filename); } - public synchronized String getMediafilePath(Context context, FeedMedia media) + private synchronized String getMediafilePath(Context context, FeedMedia media) throws DownloadRequestException { File externalStorage = getExternalFilesDirOrThrowException( context, diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/EpisodeCleanupAlgorithm.java b/core/src/main/java/de/danoeh/antennapod/core/storage/EpisodeCleanupAlgorithm.java index 97cbdca33..aae5b352e 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/EpisodeCleanupAlgorithm.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/EpisodeCleanupAlgorithm.java @@ -15,7 +15,7 @@ public abstract class EpisodeCleanupAlgorithm { * or getPerformCleanupParameter. * @return The number of episodes that were deleted. */ - public abstract int performCleanup(Context context, int numToRemove); + protected abstract int performCleanup(Context context, int numToRemove); public int performCleanup(Context context) { return performCleanup(context, getDefaultCleanupParameter()); @@ -26,7 +26,7 @@ public abstract class EpisodeCleanupAlgorithm { * space to free to satisfy the episode cache conditions. If the conditions are already satisfied, this * method should not have any effects. */ - public abstract int getDefaultCleanupParameter(); + protected abstract int getDefaultCleanupParameter(); /** * Cleans up just enough episodes to make room for the requested number @@ -48,7 +48,7 @@ public abstract class EpisodeCleanupAlgorithm { * @param amountOfRoomNeeded the number of episodes we want to download * @return the number of episodes to delete in order to make room */ - protected int getNumEpisodesToCleanup(final int amountOfRoomNeeded) { + int getNumEpisodesToCleanup(final int amountOfRoomNeeded) { if (amountOfRoomNeeded >= 0 && UserPreferences.getEpisodeCacheSize() != UserPreferences .getEpisodeCacheSizeUnlimited()) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/FeedItemStatistics.java b/core/src/main/java/de/danoeh/antennapod/core/storage/FeedItemStatistics.java index 09949b87e..6e2434659 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/FeedItemStatistics.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/FeedItemStatistics.java @@ -26,7 +26,7 @@ public class FeedItemStatistics { * @param lastUpdate pubDate of the latest episode. A lastUpdate value of 0 will be interpreted as DATE_UNKOWN if * numberOfItems is 0. */ - public FeedItemStatistics(long feedID, int numberOfItems, int numberOfNewItems, int numberOfInProgressItems, Date lastUpdate) { + private FeedItemStatistics(long feedID, int numberOfItems, int numberOfNewItems, int numberOfInProgressItems, Date lastUpdate) { this.feedID = feedID; this.numberOfItems = numberOfItems; this.numberOfNewItems = numberOfNewItems; diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java index 12a5a56c4..aa11e94a3 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java @@ -73,7 +73,7 @@ public class PodDBAdapter { public static final String KEY_MIME_TYPE = "mime_type"; public static final String KEY_IMAGE = "image"; public static final String KEY_FEED = "feed"; - public static final String KEY_MEDIA = "media"; + private static final String KEY_MEDIA = "media"; public static final String KEY_DOWNLOADED = "downloaded"; public static final String KEY_LASTUPDATE = "last_update"; public static final String KEY_FEEDFILE = "feedfile"; @@ -125,7 +125,7 @@ public class PodDBAdapter { private static final String TABLE_PRIMARY_KEY = KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT ,"; - public static final String CREATE_TABLE_FEEDS = "CREATE TABLE " + private static final String CREATE_TABLE_FEEDS = "CREATE TABLE " + TABLE_NAME_FEEDS + " (" + TABLE_PRIMARY_KEY + KEY_TITLE + " TEXT," + KEY_CUSTOM_TITLE + " TEXT," + KEY_FILE_URL + " TEXT," + KEY_DOWNLOAD_URL + " TEXT," + KEY_DOWNLOADED + " INTEGER," + KEY_LINK + " TEXT," @@ -145,7 +145,7 @@ public class PodDBAdapter { + KEY_LAST_UPDATE_FAILED + " INTEGER DEFAULT 0," + KEY_AUTO_DELETE_ACTION + " INTEGER DEFAULT 0)"; - public static final String CREATE_TABLE_FEED_ITEMS = "CREATE TABLE " + private static final String CREATE_TABLE_FEED_ITEMS = "CREATE TABLE " + TABLE_NAME_FEED_ITEMS + " (" + TABLE_PRIMARY_KEY + KEY_TITLE + " TEXT," + KEY_CONTENT_ENCODED + " TEXT," + KEY_PUBDATE + " INTEGER," + KEY_READ + " INTEGER," + KEY_LINK + " TEXT," @@ -156,12 +156,12 @@ public class PodDBAdapter { + KEY_IMAGE + " INTEGER," + KEY_AUTO_DOWNLOAD + " INTEGER)"; - public static final String CREATE_TABLE_FEED_IMAGES = "CREATE TABLE " + private static final String CREATE_TABLE_FEED_IMAGES = "CREATE TABLE " + TABLE_NAME_FEED_IMAGES + " (" + TABLE_PRIMARY_KEY + KEY_TITLE + " TEXT," + KEY_FILE_URL + " TEXT," + KEY_DOWNLOAD_URL + " TEXT," + KEY_DOWNLOADED + " INTEGER)"; - public static final String CREATE_TABLE_FEED_MEDIA = "CREATE TABLE " + private static final String CREATE_TABLE_FEED_MEDIA = "CREATE TABLE " + TABLE_NAME_FEED_MEDIA + " (" + TABLE_PRIMARY_KEY + KEY_DURATION + " INTEGER," + KEY_FILE_URL + " TEXT," + KEY_DOWNLOAD_URL + " TEXT," + KEY_DOWNLOADED + " INTEGER," + KEY_POSITION @@ -172,53 +172,53 @@ public class PodDBAdapter { + KEY_HAS_EMBEDDED_PICTURE + " INTEGER," + KEY_LAST_PLAYED_TIME + " INTEGER)"; - public static final String CREATE_TABLE_DOWNLOAD_LOG = "CREATE TABLE " + private static final String CREATE_TABLE_DOWNLOAD_LOG = "CREATE TABLE " + TABLE_NAME_DOWNLOAD_LOG + " (" + TABLE_PRIMARY_KEY + KEY_FEEDFILE + " INTEGER," + KEY_FEEDFILETYPE + " INTEGER," + KEY_REASON + " INTEGER," + KEY_SUCCESSFUL + " INTEGER," + KEY_COMPLETION_DATE + " INTEGER," + KEY_REASON_DETAILED + " TEXT," + KEY_DOWNLOADSTATUS_TITLE + " TEXT)"; - public static final String CREATE_TABLE_QUEUE = "CREATE TABLE " + private static final String CREATE_TABLE_QUEUE = "CREATE TABLE " + TABLE_NAME_QUEUE + "(" + KEY_ID + " INTEGER PRIMARY KEY," + KEY_FEEDITEM + " INTEGER," + KEY_FEED + " INTEGER)"; - public static final String CREATE_TABLE_SIMPLECHAPTERS = "CREATE TABLE " + private static final String CREATE_TABLE_SIMPLECHAPTERS = "CREATE TABLE " + TABLE_NAME_SIMPLECHAPTERS + " (" + TABLE_PRIMARY_KEY + KEY_TITLE + " TEXT," + KEY_START + " INTEGER," + KEY_FEEDITEM + " INTEGER," + KEY_LINK + " TEXT," + KEY_CHAPTER_TYPE + " INTEGER)"; // SQL Statements for creating indexes - public static final String CREATE_INDEX_FEEDITEMS_FEED = "CREATE INDEX " + private static final String CREATE_INDEX_FEEDITEMS_FEED = "CREATE INDEX " + TABLE_NAME_FEED_ITEMS + "_" + KEY_FEED + " ON " + TABLE_NAME_FEED_ITEMS + " (" + KEY_FEED + ")"; - public static final String CREATE_INDEX_FEEDITEMS_IMAGE = "CREATE INDEX " + private static final String CREATE_INDEX_FEEDITEMS_IMAGE = "CREATE INDEX " + TABLE_NAME_FEED_ITEMS + "_" + KEY_IMAGE + " ON " + TABLE_NAME_FEED_ITEMS + " (" + KEY_IMAGE + ")"; - public static final String CREATE_INDEX_FEEDITEMS_PUBDATE = "CREATE INDEX IF NOT EXISTS " + private static final String CREATE_INDEX_FEEDITEMS_PUBDATE = "CREATE INDEX IF NOT EXISTS " + TABLE_NAME_FEED_ITEMS + "_" + KEY_PUBDATE + " ON " + TABLE_NAME_FEED_ITEMS + " (" + KEY_PUBDATE + ")"; - public static final String CREATE_INDEX_FEEDITEMS_READ = "CREATE INDEX IF NOT EXISTS " + private static final String CREATE_INDEX_FEEDITEMS_READ = "CREATE INDEX IF NOT EXISTS " + TABLE_NAME_FEED_ITEMS + "_" + KEY_READ + " ON " + TABLE_NAME_FEED_ITEMS + " (" + KEY_READ + ")"; - public static final String CREATE_INDEX_QUEUE_FEEDITEM = "CREATE INDEX " + private static final String CREATE_INDEX_QUEUE_FEEDITEM = "CREATE INDEX " + TABLE_NAME_QUEUE + "_" + KEY_FEEDITEM + " ON " + TABLE_NAME_QUEUE + " (" + KEY_FEEDITEM + ")"; - public static final String CREATE_INDEX_FEEDMEDIA_FEEDITEM = "CREATE INDEX " + private static final String CREATE_INDEX_FEEDMEDIA_FEEDITEM = "CREATE INDEX " + TABLE_NAME_FEED_MEDIA + "_" + KEY_FEEDITEM + " ON " + TABLE_NAME_FEED_MEDIA + " (" + KEY_FEEDITEM + ")"; - public static final String CREATE_INDEX_SIMPLECHAPTERS_FEEDITEM = "CREATE INDEX " + private static final String CREATE_INDEX_SIMPLECHAPTERS_FEEDITEM = "CREATE INDEX " + TABLE_NAME_SIMPLECHAPTERS + "_" + KEY_FEEDITEM + " ON " + TABLE_NAME_SIMPLECHAPTERS + " (" + KEY_FEEDITEM + ")"; - public static final String CREATE_TABLE_FAVORITES = "CREATE TABLE " + private static final String CREATE_TABLE_FAVORITES = "CREATE TABLE " + TABLE_NAME_FAVORITES + "(" + KEY_ID + " INTEGER PRIMARY KEY," + KEY_FEEDITEM + " INTEGER," + KEY_FEED + " INTEGER)"; @@ -391,7 +391,7 @@ public class PodDBAdapter { * * @return the id of the entry */ - public long setFeed(Feed feed) { + private long setFeed(Feed feed) { ContentValues values = new ContentValues(); values.put(KEY_TITLE, feed.getFeedTitle()); values.put(KEY_LINK, feed.getLink()); @@ -838,7 +838,7 @@ public class PodDBAdapter { } } - public void setChapters(FeedItem item) { + private void setChapters(FeedItem item) { ContentValues values = new ContentValues(); for (Chapter chapter : item.getChapters()) { values.put(KEY_TITLE, chapter.getTitle()); @@ -946,7 +946,7 @@ public class PodDBAdapter { db.execSQL(deleteClause); } - public boolean isItemInFavorites(FeedItem item) { + private boolean isItemInFavorites(FeedItem item) { String query = String.format("SELECT %s from %s WHERE %s=%d", KEY_ID, TABLE_NAME_FAVORITES, KEY_FEEDITEM, item.getId()); Cursor c = db.rawQuery(query, null); @@ -990,7 +990,7 @@ public class PodDBAdapter { db.delete(TABLE_NAME_QUEUE, null, null); } - public void removeFeedMedia(FeedMedia media) { + private void removeFeedMedia(FeedMedia media) { // delete download log entries for feed media db.delete(TABLE_NAME_DOWNLOAD_LOG, KEY_FEEDFILE + "=? AND " + KEY_FEEDFILETYPE + "=?", new String[]{String.valueOf(media.getId()), String.valueOf(FeedMedia.FEEDFILETYPE_FEEDMEDIA)}); @@ -999,12 +999,12 @@ public class PodDBAdapter { new String[]{String.valueOf(media.getId())}); } - public void removeChaptersOfItem(FeedItem item) { + private void removeChaptersOfItem(FeedItem item) { db.delete(TABLE_NAME_SIMPLECHAPTERS, KEY_FEEDITEM + "=?", new String[]{String.valueOf(item.getId())}); } - public void removeFeedImage(FeedImage image) { + private void removeFeedImage(FeedImage image) { db.delete(TABLE_NAME_FEED_IMAGES, KEY_ID + "=?", new String[]{String.valueOf(image.getId())}); } @@ -1012,7 +1012,7 @@ public class PodDBAdapter { /** * Remove a FeedItem and its FeedMedia entry. */ - public void removeFeedItem(FeedItem item) { + private void removeFeedItem(FeedItem item) { if (item.getMedia() != null) { removeFeedMedia(item.getMedia()); } @@ -1088,7 +1088,7 @@ public class PodDBAdapter { return getAllItemsOfFeedCursor(feed.getId()); } - public final Cursor getAllItemsOfFeedCursor(final long feedId) { + private Cursor getAllItemsOfFeedCursor(final long feedId) { return db.query(TABLE_NAME_FEED_ITEMS, FEEDITEM_SEL_FI_SMALL, KEY_FEED + "=?", new String[]{String.valueOf(feedId)}, null, null, null); diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java index 66513a12e..eec7ef096 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java @@ -20,29 +20,29 @@ public class HandlerState { /** * Feed that the Handler is currently processing. */ - protected Feed feed; + Feed feed; /** * Contains links to related feeds, e.g. feeds with enclosures in other formats. The key of the map is the * URL of the feed, the value is the title */ - protected Map<String, String> alternateUrls; - protected ArrayList<FeedItem> items; - protected FeedItem currentItem; - protected Stack<SyndElement> tagstack; + Map<String, String> alternateUrls; + private ArrayList<FeedItem> items; + private FeedItem currentItem; + Stack<SyndElement> tagstack; /** * Namespaces that have been defined so far. */ - protected Map<String, Namespace> namespaces; - protected Stack<Namespace> defaultNamespaces; + Map<String, Namespace> namespaces; + Stack<Namespace> defaultNamespaces; /** * Buffer for saving characters. */ - protected StringBuffer contentBuf; + StringBuffer contentBuf; /** * Temporarily saved objects. */ - protected Map<String, Object> tempObjects; + private Map<String, Object> tempObjects; public HandlerState(Feed feed) { this.feed = feed; diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/SyndHandler.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/SyndHandler.java index ae91c0743..ba73e06dd 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/SyndHandler.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/SyndHandler.java @@ -18,10 +18,10 @@ import de.danoeh.antennapod.core.syndication.namespace.SyndElement; import de.danoeh.antennapod.core.syndication.namespace.atom.NSAtom; /** Superclass for all SAX Handlers which process Syndication formats */ -public class SyndHandler extends DefaultHandler { +class SyndHandler extends DefaultHandler { private static final String TAG = "SyndHandler"; private static final String DEFAULT_PREFIX = ""; - protected HandlerState state; + HandlerState state; public SyndHandler(Feed feed, TypeGetter.Type type) { state = new HandlerState(feed); diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java index 7d60566b2..670e99fce 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java @@ -21,8 +21,8 @@ public class NSITunes extends Namespace { private static final String AUTHOR = "author"; public static final String DURATION = "duration"; - public static final String SUBTITLE = "subtitle"; - public static final String SUMMARY = "summary"; + private static final String SUBTITLE = "subtitle"; + private static final String SUMMARY = "summary"; @Override diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSSimpleChapters.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSSimpleChapters.java index 703817a35..45266569a 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSSimpleChapters.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSSimpleChapters.java @@ -17,11 +17,11 @@ public class NSSimpleChapters extends Namespace { public static final String NSTAG = "psc|sc"; public static final String NSURI = "http://podlove.org/simple-chapters"; - public static final String CHAPTERS = "chapters"; - public static final String CHAPTER = "chapter"; - public static final String START = "start"; - public static final String TITLE = "title"; - public static final String HREF = "href"; + private static final String CHAPTERS = "chapters"; + private static final String CHAPTER = "chapter"; + private static final String START = "start"; + private static final String TITLE = "title"; + private static final String HREF = "href"; @Override public SyndElement handleElementStart(String localName, HandlerState state, diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/SyndElement.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/SyndElement.java index 8adcd2086..aa5c40bda 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/SyndElement.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/SyndElement.java @@ -2,8 +2,8 @@ package de.danoeh.antennapod.core.syndication.namespace; /** Defines a XML Element that is pushed on the tagstack */ public class SyndElement { - protected String name; - protected Namespace namespace; + private String name; + private Namespace namespace; public SyndElement(String name, Namespace namespace) { this.name = name; diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java index d4a3edd09..69f302dcb 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java @@ -8,8 +8,8 @@ import de.danoeh.antennapod.core.syndication.namespace.SyndElement; /** Represents Atom Element which contains text (content, title, summary). */ public class AtomText extends SyndElement { public static final String TYPE_TEXT = "text"; - public static final String TYPE_HTML = "html"; - public static final String TYPE_XHTML = "xhtml"; + private static final String TYPE_HTML = "html"; + private static final String TYPE_XHTML = "xhtml"; private String type; private String content; diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java index cfb20d578..1fe388d9d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java @@ -64,8 +64,8 @@ public class NSAtom extends Namespace { private static final String isText = TITLE + "|" + CONTENT + "|" + SUBTITLE + "|" + SUMMARY; - public static final String isFeed = FEED + "|" + NSRSS20.CHANNEL; - public static final String isFeedItem = ENTRY + "|" + NSRSS20.ITEM; + private static final String isFeed = FEED + "|" + NSRSS20.CHANNEL; + private static final String isFeedItem = ENTRY + "|" + NSRSS20.ITEM; @Override public SyndElement handleElementStart(String localName, HandlerState state, diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/DuckType.java b/core/src/main/java/de/danoeh/antennapod/core/util/DuckType.java index f432424f8..69dc38895 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/DuckType.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/DuckType.java @@ -92,7 +92,7 @@ public class DuckType { * false otherwise. */ @SuppressWarnings("rawtypes") - public boolean quacksLikeA(Class iface) { + private boolean quacksLikeA(Class iface) { for (Method method : iface.getMethods()) { if (findMethodBySignature(method) == null) { return false; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/EpisodeFilter.java b/core/src/main/java/de/danoeh/antennapod/core/util/EpisodeFilter.java index 89edd7dbe..fb1b0dc8f 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/EpisodeFilter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/EpisodeFilter.java @@ -5,7 +5,7 @@ import java.util.List; import de.danoeh.antennapod.core.feed.FeedItem; -public class EpisodeFilter { +class EpisodeFilter { private EpisodeFilter() { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/FeedtitleComparator.java b/core/src/main/java/de/danoeh/antennapod/core/util/FeedtitleComparator.java index cc5b0f18f..29d095cd2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/FeedtitleComparator.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/FeedtitleComparator.java @@ -5,7 +5,7 @@ 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> { +class FeedtitleComparator implements Comparator<Feed> { @Override public int compare(Feed lhs, Feed rhs) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/IntList.java b/core/src/main/java/de/danoeh/antennapod/core/util/IntList.java index f48b9169b..1da5417c1 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/IntList.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/IntList.java @@ -8,7 +8,7 @@ import java.util.Arrays; public final class IntList { private int[] values; - protected int size; + private int size; /** * Constructs an empty instance with a default initial capacity. @@ -22,7 +22,7 @@ public final class IntList { * * @param initialCapacity {@code >= 0;} initial capacity of the list */ - public IntList(int initialCapacity) { + private IntList(int initialCapacity) { if(initialCapacity < 0) { throw new IllegalArgumentException("initial capacity must be 0 or higher"); } @@ -200,7 +200,7 @@ public final class IntList { * @param value value to find * @return index of value or -1 */ - public int indexOf(int value) { + private int indexOf(int value) { for (int i = 0; i < size; i++) { if (values[i] == value) { return i; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/LongIntMap.java b/core/src/main/java/de/danoeh/antennapod/core/util/LongIntMap.java index c5ac44bf5..78ed002ac 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/LongIntMap.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/LongIntMap.java @@ -88,7 +88,7 @@ public class LongIntMap { /** * Removes the mapping at the given index. */ - public void removeAt(int index) { + private void removeAt(int index) { System.arraycopy(keys, index + 1, keys, index, size - (index + 1)); System.arraycopy(values, index + 1, values, index, size - (index + 1)); size--; @@ -130,7 +130,7 @@ public class LongIntMap { * smallest key and <code>keyAt(size()-1)</code> will return the largest * key.</p> */ - public long keyAt(int index) { + private long keyAt(int index) { if (index >= size) { throw new IndexOutOfBoundsException("n >= size()"); } else if(index < 0) { @@ -150,7 +150,7 @@ public class LongIntMap { * smallest key and <code>valueAt(size()-1)</code> will return the value * associated with the largest key.</p> */ - public int valueAt(int index) { + private int valueAt(int index) { if (index >= size) { throw new IndexOutOfBoundsException("n >= size()"); } else if(index < 0) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java index 7795ee324..b6bde6232 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java @@ -93,7 +93,7 @@ public class NetworkUtils { return UserPreferences.isAllowMobileUpdate() || !NetworkUtils.isNetworkMetered(); } - public static boolean isNetworkMetered() { + private static boolean isNetworkMetered() { ConnectivityManager connManager = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); return ConnectivityManagerCompat.isActiveNetworkMetered(connManager); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrServiceCreator.java b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrServiceCreator.java index c6150b0fd..45cb56988 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrServiceCreator.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrServiceCreator.java @@ -10,8 +10,8 @@ import de.danoeh.antennapod.core.BuildConfig; /** Ensures that only one instance of the FlattrService class exists at a time */ -public class FlattrServiceCreator { - public static final String TAG = "FlattrServiceCreator"; +class FlattrServiceCreator { + private static final String TAG = "FlattrServiceCreator"; private static volatile FlattrService flattrService; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrStatus.java b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrStatus.java index d82171d1a..40a9fc7d5 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrStatus.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrStatus.java @@ -3,9 +3,9 @@ package de.danoeh.antennapod.core.util.flattr; import java.util.Calendar; public class FlattrStatus { - public static final int STATUS_UNFLATTERED = 0; + private static final int STATUS_UNFLATTERED = 0; public static final int STATUS_QUEUE = 1; - public static final int STATUS_FLATTRED = 2; + private static final int STATUS_FLATTRED = 2; private int status = STATUS_UNFLATTERED; private Calendar lastFlattred; @@ -38,7 +38,7 @@ public class FlattrStatus { status = STATUS_QUEUE; } - public void fromLong(long status) { + private void fromLong(long status) { if (status == STATUS_UNFLATTERED || status == STATUS_QUEUE) this.status = (int) status; else { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java index 8c28e3dd9..313d1c2f2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java @@ -99,7 +99,7 @@ public class FlattrUtils { cachedToken = token; } - public static void deleteToken() { + private static void deleteToken() { Log.d(TAG, "Deleting flattr token"); storeToken(null); } @@ -172,7 +172,7 @@ public class FlattrUtils { // ------------------------------------------------ DIALOGS - public static void showRevokeDialog(final Context context) { + private static void showRevokeDialog(final Context context) { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(R.string.access_revoked_title); builder.setMessage(R.string.access_revoked_info); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/ID3Reader.java b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/ID3Reader.java index 241082213..3b78f4b6f 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/ID3Reader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/ID3Reader.java @@ -19,10 +19,10 @@ public class ID3Reader { private static final int ID3_LENGTH = 3; private static final int FRAME_ID_LENGTH = 4; - protected static final int ACTION_SKIP = 1; - protected static final int ACTION_DONT_SKIP = 2; + private static final int ACTION_SKIP = 1; + static final int ACTION_DONT_SKIP = 2; - protected int readerPosition; + private int readerPosition; private static final byte ENCODING_UTF16_WITH_BOM = 1; private static final byte ENCODING_UTF16_WITHOUT_BOM = 2; @@ -30,7 +30,7 @@ public class ID3Reader { private TagHeader tagHeader; - public ID3Reader() { + ID3Reader() { } public final void readInputStream(InputStream input) throws IOException, @@ -92,7 +92,7 @@ public class ID3Reader { * Read a certain number of bytes from the given input stream. This method * changes the readerPosition-attribute. */ - protected char[] readBytes(InputStream input, int number) + char[] readBytes(InputStream input, int number) throws IOException, ID3ReaderException { char[] header = new char[number]; for (int i = 0; i < number; i++) { @@ -111,7 +111,7 @@ public class ID3Reader { * Skip a certain number of bytes on the given input stream. This method * changes the readerPosition-attribute. */ - protected void skipBytes(InputStream input, int number) throws IOException { + void skipBytes(InputStream input, int number) throws IOException { if (number <= 0) { number = 1; } @@ -170,7 +170,7 @@ public class ID3Reader { return out; } - protected int readString(StringBuffer buffer, InputStream input, int max) throws IOException, + int readString(StringBuffer buffer, InputStream input, int max) throws IOException, ID3ReaderException { if (max > 0) { char[] encoding = readBytes(input, 1); @@ -191,7 +191,7 @@ public class ID3Reader { } } - protected int readISOString(StringBuffer buffer, InputStream input, int max) + int readISOString(StringBuffer buffer, InputStream input, int max) throws IOException, ID3ReaderException { int bytesRead = 0; @@ -231,20 +231,20 @@ public class ID3Reader { return i; } - public int onStartTagHeader(TagHeader header) { + int onStartTagHeader(TagHeader header) { return ACTION_SKIP; } - public int onStartFrameHeader(FrameHeader header, InputStream input) + int onStartFrameHeader(FrameHeader header, InputStream input) throws IOException, ID3ReaderException { return ACTION_SKIP; } - public void onEndTag() { + void onEndTag() { } - public void onNoTagHeaderFound() { + void onNoTagHeaderFound() { } diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/FrameHeader.java b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/FrameHeader.java index 89eab1398..e33ad8cf6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/FrameHeader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/FrameHeader.java @@ -2,7 +2,7 @@ package de.danoeh.antennapod.core.util.id3reader.model; public class FrameHeader extends Header { - protected char flags; + private char flags; public FrameHeader(String id, int size, char flags) { super(id, size); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/Header.java b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/Header.java index 346e2893f..63bb99c03 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/Header.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/Header.java @@ -2,10 +2,10 @@ package de.danoeh.antennapod.core.util.id3reader.model; public abstract class Header { - protected String id; - protected int size; + String id; + int size; - public Header(String id, int size) { + Header(String id, int size) { super(); this.id = id; this.size = size; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/TagHeader.java b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/TagHeader.java index 0a6b8357f..bfad3a445 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/TagHeader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/model/TagHeader.java @@ -2,8 +2,8 @@ package de.danoeh.antennapod.core.util.id3reader.model; public class TagHeader extends Header { - protected char version; - protected byte flags; + private char version; + private byte flags; public TagHeader(String id, int size, char version, byte flags) { super(id, size); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/OggInputStream.java b/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/OggInputStream.java index 4799d3881..a90620f74 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/OggInputStream.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/OggInputStream.java @@ -6,7 +6,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.Arrays; -public class OggInputStream extends InputStream { +class OggInputStream extends InputStream { private InputStream input; /** True if OggInputStream is currently inside an Ogg page. */ diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/VorbisCommentHeader.java b/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/VorbisCommentHeader.java index 5f9dd0faf..fc437190c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/VorbisCommentHeader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/VorbisCommentHeader.java @@ -1,5 +1,5 @@ package de.danoeh.antennapod.core.util.vorbiscommentreader; -public class VorbisCommentHeader { +class VorbisCommentHeader { private String vendorString; private long userCommentLength; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/VorbisCommentReader.java b/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/VorbisCommentReader.java index 49ea18721..55498afcb 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/VorbisCommentReader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/vorbiscommentreader/VorbisCommentReader.java @@ -19,29 +19,29 @@ public abstract class VorbisCommentReader { private static final int PACKET_TYPE_COMMENT = 3; /** Called when Reader finds identification header. */ - public abstract void onVorbisCommentFound(); + protected abstract void onVorbisCommentFound(); - public abstract void onVorbisCommentHeaderFound(VorbisCommentHeader header); + protected abstract void onVorbisCommentHeaderFound(VorbisCommentHeader header); /** * Is called every time the Reader finds a content vector. The handler * should return true if it wants to handle the content vector. */ - public abstract boolean onContentVectorKey(String content); + protected abstract boolean onContentVectorKey(String content); /** * Is called if onContentVectorKey returned true for the key. * * @throws VorbisCommentReaderException */ - public abstract void onContentVectorValue(String key, String value) + protected abstract void onContentVectorValue(String key, String value) throws VorbisCommentReaderException; - public abstract void onNoVorbisCommentFound(); + protected abstract void onNoVorbisCommentFound(); - public abstract void onEndOfComment(); + protected abstract void onEndOfComment(); - public abstract void onError(VorbisCommentReaderException exception); + protected abstract void onError(VorbisCommentReaderException exception); public void readInputStream(InputStream input) throws VorbisCommentReaderException { |