Remove Java 8 usage from release

This commit is contained in:
Oliver Woodman 2018-08-06 13:34:53 +01:00
parent 4cd57e0963
commit 27f05c412d

View File

@ -220,8 +220,6 @@ public class DefaultTimeBar extends View implements TimeBar {
private @Nullable boolean[] playedAdGroups; private @Nullable boolean[] playedAdGroups;
/** Creates a new time bar. */ /** Creates a new time bar. */
// Suppress warnings due to usage of View methods in the constructor.
@SuppressWarnings("nullness:method.invocation.invalid")
public DefaultTimeBar(Context context, AttributeSet attrs) { public DefaultTimeBar(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
seekBounds = new Rect(); seekBounds = new Rect();
@ -307,7 +305,12 @@ public class DefaultTimeBar extends View implements TimeBar {
} }
formatBuilder = new StringBuilder(); formatBuilder = new StringBuilder();
formatter = new Formatter(formatBuilder, Locale.getDefault()); formatter = new Formatter(formatBuilder, Locale.getDefault());
stopScrubbingRunnable = () -> stopScrubbing(/* canceled= */ false); stopScrubbingRunnable = new Runnable() {
@Override
public void run() {
stopScrubbing(false);
}
};
if (scrubberDrawable != null) { if (scrubberDrawable != null) {
scrubberPadding = (scrubberDrawable.getMinimumWidth() + 1) / 2; scrubberPadding = (scrubberDrawable.getMinimumWidth() + 1) / 2;
} else { } else {