diff options
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
31 files changed, 100 insertions, 100 deletions
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) { |