[Android] Remove unnecessary casting and import

Geoffrey Métais git at videolan.org
Fri Jun 16 17:50:10 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jun 16 17:49:42 2017 +0200| [c167066247173eef21b3305cf412cee8652ce100] | committer: Geoffrey Métais

Remove unnecessary casting and import

> https://code.videolan.org/videolan/vlc-android/commit/c167066247173eef21b3305cf412cee8652ce100
---

 .../src/org/videolan/vlc/gui/audio/EqualizerFragment.java     | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
index 861d746b7..30fc228a7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
@@ -21,7 +21,6 @@ package org.videolan.vlc.gui.audio;
 
 import android.content.Context;
 import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
 import android.support.v7.app.AppCompatDialogFragment;
 import android.support.v7.widget.SwitchCompat;
 import android.view.LayoutInflater;
@@ -79,10 +78,10 @@ public class EqualizerFragment extends AppCompatDialogFragment implements Playba
     }
 
     private void saveViewChildren(View v) {
-        button = (SwitchCompat) v.findViewById(R.id.equalizer_button);
-        equalizer_presets = (Spinner) v.findViewById(R.id.equalizer_presets);
-        preamp = (SeekBar) v.findViewById(R.id.equalizer_preamp);
-        bands_layout = (LinearLayout) v.findViewById(R.id.equalizer_bands);
+        button = v.findViewById(R.id.equalizer_button);
+        equalizer_presets = v.findViewById(R.id.equalizer_presets);
+        preamp = v.findViewById(R.id.equalizer_preamp);
+        bands_layout = v.findViewById(R.id.equalizer_bands);
     }
 
     @Override
@@ -119,7 +118,7 @@ public class EqualizerFragment extends AppCompatDialogFragment implements Playba
         });
 
         // presets
-        equalizer_presets.setAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_dropdown_item, presets));
+        equalizer_presets.setAdapter(new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_dropdown_item, presets));
 
         // Set the default selection asynchronously to prevent a layout initialization bug.
         final int equalizer_preset_pref = VLCOptions.getEqualizerPreset(context);



More information about the Android mailing list