From 3023385574d870c080d94e0152e83cc63ad88dce Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Fri, 28 Jan 2022 17:52:09 +0000 Subject: [PATCH] Switch from `valueOf` to `parse` methods This fixes some warnings that show up in Android Studio (due to using methods that autobox unnecessarily). PiperOrigin-RevId: 424892352 --- .../transformerdemo/ConfigurationActivity.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/ConfigurationActivity.java b/demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/ConfigurationActivity.java index 7b1cd08cba..a0f96d8b69 100644 --- a/demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/ConfigurationActivity.java +++ b/demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/ConfigurationActivity.java @@ -196,25 +196,25 @@ public final class ConfigurationActivity extends AppCompatActivity { } String selectedResolutionHeight = String.valueOf(resolutionHeightSpinner.getSelectedItem()); if (!SAME_AS_INPUT_OPTION.equals(selectedResolutionHeight)) { - bundle.putInt(RESOLUTION_HEIGHT, Integer.valueOf(selectedResolutionHeight)); + bundle.putInt(RESOLUTION_HEIGHT, Integer.parseInt(selectedResolutionHeight)); } String selectedTranslate = String.valueOf(translateSpinner.getSelectedItem()); if (!SAME_AS_INPUT_OPTION.equals(selectedTranslate)) { List translateXY = Arrays.asList(selectedTranslate.split(", ")); checkState(translateXY.size() == 2); - bundle.putFloat(TRANSLATE_X, Float.valueOf(translateXY.get(0))); - bundle.putFloat(TRANSLATE_Y, Float.valueOf(translateXY.get(1))); + bundle.putFloat(TRANSLATE_X, Float.parseFloat(translateXY.get(0))); + bundle.putFloat(TRANSLATE_Y, Float.parseFloat(translateXY.get(1))); } String selectedScale = String.valueOf(scaleSpinner.getSelectedItem()); if (!SAME_AS_INPUT_OPTION.equals(selectedScale)) { List scaleXY = Arrays.asList(selectedScale.split(", ")); checkState(scaleXY.size() == 2); - bundle.putFloat(SCALE_X, Float.valueOf(scaleXY.get(0))); - bundle.putFloat(SCALE_Y, Float.valueOf(scaleXY.get(1))); + bundle.putFloat(SCALE_X, Float.parseFloat(scaleXY.get(0))); + bundle.putFloat(SCALE_Y, Float.parseFloat(scaleXY.get(1))); } String selectedRotate = String.valueOf(rotateSpinner.getSelectedItem()); if (!SAME_AS_INPUT_OPTION.equals(selectedRotate)) { - bundle.putFloat(ROTATE_DEGREES, Float.valueOf(selectedRotate)); + bundle.putFloat(ROTATE_DEGREES, Float.parseFloat(selectedRotate)); } transformerIntent.putExtras(bundle);