|
30 | 30 | import org.schabi.newpipe.util.SimpleOnSeekBarChangeListener; |
31 | 31 | import org.schabi.newpipe.util.SliderStrategy; |
32 | 32 |
|
33 | | -import java.util.HashMap; |
34 | 33 | import java.util.Map; |
35 | 34 | import java.util.Objects; |
36 | 35 | import java.util.function.Consumer; |
@@ -334,10 +333,8 @@ private void setupPitchControlModeTextView( |
334 | 333 | } |
335 | 334 |
|
336 | 335 | private Map<Boolean, TextView> getPitchControlModeComponentMappings() { |
337 | | - final Map<Boolean, TextView> mappings = new HashMap<>(); |
338 | | - mappings.put(PITCH_CTRL_MODE_PERCENT, binding.pitchControlModePercent); |
339 | | - mappings.put(PITCH_CTRL_MODE_SEMITONE, binding.pitchControlModeSemitone); |
340 | | - return mappings; |
| 336 | + return Map.of(PITCH_CTRL_MODE_PERCENT, binding.pitchControlModePercent, |
| 337 | + PITCH_CTRL_MODE_SEMITONE, binding.pitchControlModeSemitone); |
341 | 338 | } |
342 | 339 |
|
343 | 340 | private void changePitchControlMode(final boolean semitones) { |
@@ -407,13 +404,11 @@ private void setupStepTextView( |
407 | 404 | } |
408 | 405 |
|
409 | 406 | private Map<Double, TextView> getStepSizeComponentMappings() { |
410 | | - final Map<Double, TextView> mappings = new HashMap<>(); |
411 | | - mappings.put(STEP_1_PERCENT_VALUE, binding.stepSizeOnePercent); |
412 | | - mappings.put(STEP_5_PERCENT_VALUE, binding.stepSizeFivePercent); |
413 | | - mappings.put(STEP_10_PERCENT_VALUE, binding.stepSizeTenPercent); |
414 | | - mappings.put(STEP_25_PERCENT_VALUE, binding.stepSizeTwentyFivePercent); |
415 | | - mappings.put(STEP_100_PERCENT_VALUE, binding.stepSizeOneHundredPercent); |
416 | | - return mappings; |
| 407 | + return Map.of(STEP_1_PERCENT_VALUE, binding.stepSizeOnePercent, |
| 408 | + STEP_5_PERCENT_VALUE, binding.stepSizeFivePercent, |
| 409 | + STEP_10_PERCENT_VALUE, binding.stepSizeTenPercent, |
| 410 | + STEP_25_PERCENT_VALUE, binding.stepSizeTwentyFivePercent, |
| 411 | + STEP_100_PERCENT_VALUE, binding.stepSizeOneHundredPercent); |
417 | 412 | } |
418 | 413 |
|
419 | 414 | private void setStepSizeToUI(final double newStepSize) { |
|
0 commit comments