Fix indentation in last 8 files
This commit is contained in:
parent
6c0f9eec62
commit
cae848b505
|
@ -241,8 +241,9 @@ public class MainActivity extends CastEnabledActivity {
|
||||||
outState.putInt(KEY_GENERATED_VIEW_ID, View.generateViewId());
|
outState.putInt(KEY_GENERATED_VIEW_ID, View.generateViewId());
|
||||||
}
|
}
|
||||||
|
|
||||||
private final BottomSheetBehavior.BottomSheetCallback bottomSheetCallback =
|
private final BottomSheetBehavior.BottomSheetCallback bottomSheetCallback = new AntennaPodBottomSheetCallback();
|
||||||
new BottomSheetBehavior.BottomSheetCallback() {
|
|
||||||
|
private class AntennaPodBottomSheetCallback extends BottomSheetBehavior.BottomSheetCallback {
|
||||||
@Override
|
@Override
|
||||||
public void onStateChanged(@NonNull View view, int state) {
|
public void onStateChanged(@NonNull View view, int state) {
|
||||||
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
|
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||||
|
@ -266,7 +267,7 @@ public class MainActivity extends CastEnabledActivity {
|
||||||
|
|
||||||
audioPlayer.fadePlayerToToolbar(slideOffset);
|
audioPlayer.fadePlayerToToolbar(slideOffset);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
public void setupToolbarToggle(@NonNull MaterialToolbar toolbar, boolean displayUpArrow) {
|
public void setupToolbarToggle(@NonNull MaterialToolbar toolbar, boolean displayUpArrow) {
|
||||||
if (drawerLayout != null) { // Tablet layout does not have a drawer
|
if (drawerLayout != null) { // Tablet layout does not have a drawer
|
||||||
|
|
|
@ -125,6 +125,14 @@
|
||||||
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||||
</module>
|
</module>
|
||||||
<module name="MethodParamPad"/>
|
<module name="MethodParamPad"/>
|
||||||
|
<module name="Indentation">
|
||||||
|
<property name="basicOffset" value="4"/>
|
||||||
|
<property name="braceAdjustment" value="0"/>
|
||||||
|
<property name="caseIndent" value="4"/>
|
||||||
|
<property name="throwsIndent" value="8"/>
|
||||||
|
<property name="lineWrappingIndentation" value="8"/>
|
||||||
|
<property name="arrayInitIndent" value="4"/>
|
||||||
|
</module>
|
||||||
<module name="NoWhitespaceBefore">
|
<module name="NoWhitespaceBefore">
|
||||||
<property name="tokens"
|
<property name="tokens"
|
||||||
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
|
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
|
||||||
|
|
|
@ -221,8 +221,7 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer {
|
||||||
|
|
||||||
if (playerStatus == PlayerStatus.PREPARED && media.getPosition() > 0) {
|
if (playerStatus == PlayerStatus.PREPARED && media.getPosition() > 0) {
|
||||||
int newPosition = RewindAfterPauseUtils.calculatePositionWithRewind(
|
int newPosition = RewindAfterPauseUtils.calculatePositionWithRewind(
|
||||||
media.getPosition(),
|
media.getPosition(), media.getLastPlayedTime());
|
||||||
media.getLastPlayedTime());
|
|
||||||
seekTo(newPosition);
|
seekTo(newPosition);
|
||||||
}
|
}
|
||||||
mediaPlayer.start();
|
mediaPlayer.start();
|
||||||
|
|
|
@ -1628,7 +1628,6 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
= ((FeedMedia) getPlayable()).getItem().getFeed().getPreferences();
|
= ((FeedMedia) getPlayable()).getItem().getFeed().getPreferences();
|
||||||
feedPreferences.setFeedSkipIntro(event.getSkipIntro());
|
feedPreferences.setFeedSkipIntro(event.getSkipIntro());
|
||||||
feedPreferences.setFeedSkipEnding(event.getSkipEnding());
|
feedPreferences.setFeedSkipEnding(event.getSkipEnding());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,9 +108,9 @@ public class Atom extends Namespace {
|
||||||
* feed-object has no link yet b) type of link is
|
* feed-object has no link yet b) type of link is
|
||||||
* LINK_TYPE_HTML or LINK_TYPE_XHTML
|
* LINK_TYPE_HTML or LINK_TYPE_XHTML
|
||||||
*/
|
*/
|
||||||
if (state.getFeed() != null &&
|
if (state.getFeed() != null
|
||||||
((type == null && state.getFeed().getLink() == null) ||
|
&& ((type == null && state.getFeed().getLink() == null)
|
||||||
(LINK_TYPE_HTML.equals(type) || LINK_TYPE_XHTML.equals(type)))) {
|
|| (LINK_TYPE_HTML.equals(type) || LINK_TYPE_XHTML.equals(type)))) {
|
||||||
state.getFeed().setLink(href);
|
state.getFeed().setLink(href);
|
||||||
} else if (LINK_TYPE_ATOM.equals(type) || LINK_TYPE_RSS.equals(type)) {
|
} else if (LINK_TYPE_ATOM.equals(type) || LINK_TYPE_RSS.equals(type)) {
|
||||||
// treat as podlove alternate feed
|
// treat as podlove alternate feed
|
||||||
|
@ -188,17 +188,17 @@ public class Atom extends Namespace {
|
||||||
} else if (ENTRY.equals(second) && state.getCurrentItem() != null) {
|
} else if (ENTRY.equals(second) && state.getCurrentItem() != null) {
|
||||||
state.getCurrentItem().setTitle(textElement.getProcessedContent());
|
state.getCurrentItem().setTitle(textElement.getProcessedContent());
|
||||||
}
|
}
|
||||||
} else if (SUBTITLE.equals(top) && FEED.equals(second) && textElement != null &&
|
} else if (SUBTITLE.equals(top) && FEED.equals(second) && textElement != null
|
||||||
state.getFeed() != null) {
|
&& state.getFeed() != null) {
|
||||||
state.getFeed().setDescription(textElement.getProcessedContent());
|
state.getFeed().setDescription(textElement.getProcessedContent());
|
||||||
} else if (CONTENT.equals(top) && ENTRY.equals(second) && textElement != null &&
|
} else if (CONTENT.equals(top) && ENTRY.equals(second) && textElement != null
|
||||||
state.getCurrentItem() != null) {
|
&& state.getCurrentItem() != null) {
|
||||||
state.getCurrentItem().setDescriptionIfLonger(textElement.getProcessedContent());
|
state.getCurrentItem().setDescriptionIfLonger(textElement.getProcessedContent());
|
||||||
} else if (SUMMARY.equals(top) && ENTRY.equals(second) && textElement != null
|
} else if (SUMMARY.equals(top) && ENTRY.equals(second) && textElement != null
|
||||||
&& state.getCurrentItem() != null) {
|
&& state.getCurrentItem() != null) {
|
||||||
state.getCurrentItem().setDescriptionIfLonger(textElement.getProcessedContent());
|
state.getCurrentItem().setDescriptionIfLonger(textElement.getProcessedContent());
|
||||||
} else if (UPDATED.equals(top) && ENTRY.equals(second) && state.getCurrentItem() != null &&
|
} else if (UPDATED.equals(top) && ENTRY.equals(second) && state.getCurrentItem() != null
|
||||||
state.getCurrentItem().getPubDate() == null) {
|
&& state.getCurrentItem().getPubDate() == null) {
|
||||||
state.getCurrentItem().setPubDate(DateUtils.parseOrNullIfFuture(content));
|
state.getCurrentItem().setPubDate(DateUtils.parseOrNullIfFuture(content));
|
||||||
} else if (PUBLISHED.equals(top) && ENTRY.equals(second) && state.getCurrentItem() != null) {
|
} else if (PUBLISHED.equals(top) && ENTRY.equals(second) && state.getCurrentItem() != null) {
|
||||||
state.getCurrentItem().setPubDate(DateUtils.parseOrNullIfFuture(content));
|
state.getCurrentItem().setPubDate(DateUtils.parseOrNullIfFuture(content));
|
||||||
|
@ -206,8 +206,8 @@ public class Atom extends Namespace {
|
||||||
state.getFeed().setImageUrl(content);
|
state.getFeed().setImageUrl(content);
|
||||||
} else if (IMAGE_ICON.equals(top) && state.getFeed() != null) {
|
} else if (IMAGE_ICON.equals(top) && state.getFeed() != null) {
|
||||||
state.getFeed().setImageUrl(content);
|
state.getFeed().setImageUrl(content);
|
||||||
} else if (AUTHOR_NAME.equals(top) && AUTHOR.equals(second) &&
|
} else if (AUTHOR_NAME.equals(top) && AUTHOR.equals(second)
|
||||||
state.getFeed() != null && state.getCurrentItem() == null) {
|
&& state.getFeed() != null && state.getCurrentItem() == null) {
|
||||||
String currentName = state.getFeed().getAuthor();
|
String currentName = state.getFeed().getAuthor();
|
||||||
if (currentName == null) {
|
if (currentName == null) {
|
||||||
state.getFeed().setAuthor(content);
|
state.getFeed().setAuthor(content);
|
||||||
|
|
|
@ -22,8 +22,8 @@ public class DublinCore extends Namespace {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleElementEnd(String localName, HandlerState state) {
|
public void handleElementEnd(String localName, HandlerState state) {
|
||||||
if (state.getCurrentItem() != null && state.getContentBuf() != null &&
|
if (state.getCurrentItem() != null && state.getContentBuf() != null
|
||||||
state.getTagstack() != null && state.getTagstack().size() >= 2) {
|
&& state.getTagstack() != null && state.getTagstack().size() >= 2) {
|
||||||
FeedItem currentItem = state.getCurrentItem();
|
FeedItem currentItem = state.getCurrentItem();
|
||||||
String top = state.getTagstack().peek().getName();
|
String top = state.getTagstack().peek().getName();
|
||||||
String second = state.getSecondTag().getName();
|
String second = state.getSecondTag().getName();
|
||||||
|
|
|
@ -372,7 +372,9 @@ public class UserPreferences {
|
||||||
prefs.edit().putBoolean(UserPreferences.PREF_FOLLOW_QUEUE, value).apply();
|
prefs.edit().putBoolean(UserPreferences.PREF_FOLLOW_QUEUE, value).apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldSkipKeepEpisode() { return prefs.getBoolean(PREF_SKIP_KEEPS_EPISODE, true); }
|
public static boolean shouldSkipKeepEpisode() {
|
||||||
|
return prefs.getBoolean(PREF_SKIP_KEEPS_EPISODE, true);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean shouldFavoriteKeepEpisode() {
|
public static boolean shouldFavoriteKeepEpisode() {
|
||||||
return prefs.getBoolean(PREF_FAVORITE_KEEPS_EPISODE, true);
|
return prefs.getBoolean(PREF_FAVORITE_KEEPS_EPISODE, true);
|
||||||
|
@ -589,33 +591,23 @@ public class UserPreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setFastForwardSecs(int secs) {
|
public static void setFastForwardSecs(int secs) {
|
||||||
prefs.edit()
|
prefs.edit().putInt(PREF_FAST_FORWARD_SECS, secs).apply();
|
||||||
.putInt(PREF_FAST_FORWARD_SECS, secs)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setRewindSecs(int secs) {
|
public static void setRewindSecs(int secs) {
|
||||||
prefs.edit()
|
prefs.edit().putInt(PREF_REWIND_SECS, secs).apply();
|
||||||
.putInt(PREF_REWIND_SECS, secs)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPlaybackSpeed(float speed) {
|
public static void setPlaybackSpeed(float speed) {
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_PLAYBACK_SPEED, String.valueOf(speed)).apply();
|
||||||
.putString(PREF_PLAYBACK_SPEED, String.valueOf(speed))
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setVideoPlaybackSpeed(float speed) {
|
public static void setVideoPlaybackSpeed(float speed) {
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_VIDEO_PLAYBACK_SPEED, String.valueOf(speed)).apply();
|
||||||
.putString(PREF_VIDEO_PLAYBACK_SPEED, String.valueOf(speed))
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setSkipSilence(boolean skipSilence) {
|
public static void setSkipSilence(boolean skipSilence) {
|
||||||
prefs.edit()
|
prefs.edit().putBoolean(PREF_PLAYBACK_SKIP_SILENCE, skipSilence).apply();
|
||||||
.putBoolean(PREF_PLAYBACK_SKIP_SILENCE, skipSilence)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPlaybackSpeedArray(List<Float> speeds) {
|
public static void setPlaybackSpeedArray(List<Float> speeds) {
|
||||||
|
@ -626,15 +618,11 @@ public class UserPreferences {
|
||||||
for (float speed : speeds) {
|
for (float speed : speeds) {
|
||||||
jsonArray.put(speedFormat.format(speed));
|
jsonArray.put(speedFormat.format(speed));
|
||||||
}
|
}
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_PLAYBACK_SPEED_ARRAY, jsonArray.toString()).apply();
|
||||||
.putString(PREF_PLAYBACK_SPEED_ARRAY, jsonArray.toString())
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setAutodownloadSelectedNetworks(String[] value) {
|
public static void setAutodownloadSelectedNetworks(String[] value) {
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_AUTODL_SELECTED_NETWORKS, TextUtils.join(",", value)).apply();
|
||||||
.putString(PREF_AUTODL_SELECTED_NETWORKS, TextUtils.join(",", value))
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean gpodnetNotificationsEnabled() {
|
public static boolean gpodnetNotificationsEnabled() {
|
||||||
|
@ -652,29 +640,21 @@ public class UserPreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setGpodnetNotificationsEnabled() {
|
public static void setGpodnetNotificationsEnabled() {
|
||||||
prefs.edit()
|
prefs.edit().putBoolean(PREF_GPODNET_NOTIFICATIONS, true).apply();
|
||||||
.putBoolean(PREF_GPODNET_NOTIFICATIONS, true)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setHiddenDrawerItems(List<String> items) {
|
public static void setHiddenDrawerItems(List<String> items) {
|
||||||
String str = TextUtils.join(",", items);
|
String str = TextUtils.join(",", items);
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_HIDDEN_DRAWER_ITEMS, str).apply();
|
||||||
.putString(PREF_HIDDEN_DRAWER_ITEMS, str)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setFullNotificationButtons(List<Integer> items) {
|
public static void setFullNotificationButtons(List<Integer> items) {
|
||||||
String str = TextUtils.join(",", items);
|
String str = TextUtils.join(",", items);
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_FULL_NOTIFICATION_BUTTONS, str).apply();
|
||||||
.putString(PREF_FULL_NOTIFICATION_BUTTONS, str)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setQueueLocked(boolean locked) {
|
public static void setQueueLocked(boolean locked) {
|
||||||
prefs.edit()
|
prefs.edit().putBoolean(PREF_QUEUE_LOCKED, locked).apply();
|
||||||
.putBoolean(PREF_QUEUE_LOCKED, locked)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<Float> readPlaybackSpeedArray(String valueFromPrefs) {
|
private static List<Float> readPlaybackSpeedArray(String valueFromPrefs) {
|
||||||
|
@ -700,9 +680,7 @@ public class UserPreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setEpisodeCleanupValue(int episodeCleanupValue) {
|
public static void setEpisodeCleanupValue(int episodeCleanupValue) {
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_EPISODE_CLEANUP, Integer.toString(episodeCleanupValue)).apply();
|
||||||
.putString(PREF_EPISODE_CLEANUP, Integer.toString(episodeCleanupValue))
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -748,9 +726,7 @@ public class UserPreferences {
|
||||||
|
|
||||||
public static void setDataFolder(String dir) {
|
public static void setDataFolder(String dir) {
|
||||||
Log.d(TAG, "setDataFolder(dir: " + dir + ")");
|
Log.d(TAG, "setDataFolder(dir: " + dir + ")");
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_DATA_FOLDER, dir).apply();
|
||||||
.putString(PREF_DATA_FOLDER, dir)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -808,9 +784,7 @@ public class UserPreferences {
|
||||||
* @see #setQueueKeepSortedOrder(SortOrder)
|
* @see #setQueueKeepSortedOrder(SortOrder)
|
||||||
*/
|
*/
|
||||||
public static void setQueueKeepSorted(boolean keepSorted) {
|
public static void setQueueKeepSorted(boolean keepSorted) {
|
||||||
prefs.edit()
|
prefs.edit().putBoolean(PREF_QUEUE_KEEP_SORTED, keepSorted).apply();
|
||||||
.putBoolean(PREF_QUEUE_KEEP_SORTED, keepSorted)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -833,9 +807,7 @@ public class UserPreferences {
|
||||||
if (sortOrder == null) {
|
if (sortOrder == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_QUEUE_KEEP_SORTED_ORDER, sortOrder.name()).apply();
|
||||||
.putString(PREF_QUEUE_KEEP_SORTED_ORDER, sortOrder.name())
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FeedPreferences.NewEpisodesAction getNewEpisodesAction() {
|
public static FeedPreferences.NewEpisodesAction getNewEpisodesAction() {
|
||||||
|
@ -874,9 +846,7 @@ public class UserPreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setSubscriptionsFilter(SubscriptionsFilter value) {
|
public static void setSubscriptionsFilter(SubscriptionsFilter value) {
|
||||||
prefs.edit()
|
prefs.edit().putString(PREF_FILTER_FEED, value.serialize()).apply();
|
||||||
.putString(PREF_FILTER_FEED, value.serialize())
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldShowSubscriptionTitle() {
|
public static boolean shouldShowSubscriptionTitle() {
|
||||||
|
|
Loading…
Reference in New Issue