Commit 6ec9eacf authored by Geoffrey Métais's avatar Geoffrey Métais

Remove dead code

parent 5f69a614
......@@ -35,7 +35,6 @@ import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.content.ContextCompat;
import android.support.v7.preference.PreferenceManager;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
......@@ -91,7 +90,6 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
private static final int ID_SHUFFLE = 11 ;
private Activity mActivity;
private int mTheme;
private int mMode = -1;
AutoFitRecyclerView mRecyclerView;
......@@ -204,19 +202,19 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
String tag;
switch (id) {
case ID_PLAYBACK_SPEED:
newFragment = PlaybackSpeedDialog.newInstance(mTheme);
newFragment = PlaybackSpeedDialog.newInstance();
tag = "playback_speed";
break;
case ID_JUMP_TO:
newFragment = JumpToTimeDialog.newInstance(mTheme);
newFragment = JumpToTimeDialog.newInstance();
tag = "time";
break;
case ID_SLEEP:
newFragment = SleepTimerDialog.newInstance(mTheme);
newFragment = SleepTimerDialog.newInstance();
tag = "time";
break;
case ID_CHAPTER_TITLE:
newFragment = SelectChapterDialog.newInstance(mTheme);
newFragment = SelectChapterDialog.newInstance();
tag = "select_chapter";
break;
case ID_EQUALIZER:
......@@ -230,8 +228,7 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
default:
return;
}
if (newFragment != null)
newFragment.show(getActivity().getSupportFragmentManager(), tag);
newFragment.show(getActivity().getSupportFragmentManager(), tag);
dismiss();
}
......@@ -661,7 +658,6 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
public void setSelection(int position) {
if (mSelection == position || position < 0 || position >= mList.size())
return;
int formerSelection = mSelection;
mSelection = position;
notifyDataSetChanged();
}
......
......@@ -23,9 +23,6 @@
package org.videolan.vlc.gui.dialogs;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import org.videolan.vlc.R;
public class JumpToTimeDialog extends PickTimeFragment {
......@@ -34,20 +31,8 @@ public class JumpToTimeDialog extends PickTimeFragment {
super();
}
public static JumpToTimeDialog newInstance(int theme) {
JumpToTimeDialog myFragment = new JumpToTimeDialog();
Bundle args = new Bundle();
args.putInt("theme", theme);
myFragment.setArguments(args);
return myFragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(DialogFragment.STYLE_NO_FRAME, getArguments().getInt("theme"));
public static JumpToTimeDialog newInstance() {
return new JumpToTimeDialog();
}
protected void executeAction() {
......
......@@ -56,20 +56,8 @@ public class PlaybackSpeedDialog extends DialogFragment implements PlaybackServi
public PlaybackSpeedDialog() {
}
public static PlaybackSpeedDialog newInstance(int theme) {
PlaybackSpeedDialog myFragment = new PlaybackSpeedDialog();
Bundle args = new Bundle();
args.putInt("theme", theme);
myFragment.setArguments(args);
return myFragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(DialogFragment.STYLE_NO_FRAME, getArguments().getInt("theme"));
public static PlaybackSpeedDialog newInstance() {
return new PlaybackSpeedDialog();
}
@Override
......
......@@ -54,27 +54,15 @@ public class SelectChapterDialog extends DialogFragment implements PlaybackServi
public SelectChapterDialog() {
}
public static SelectChapterDialog newInstance(int theme) {
SelectChapterDialog myFragment = new SelectChapterDialog();
Bundle args = new Bundle();
args.putInt("theme", theme);
myFragment.setArguments(args);
return myFragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(DialogFragment.STYLE_NO_FRAME, getArguments().getInt("theme"));
public static SelectChapterDialog newInstance() {
return new SelectChapterDialog();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dialog_select_chapter, container);
mChapterList = (ListView) view.findViewById(R.id.chapter_list);
mChapterList = view.findViewById(R.id.chapter_list);
getDialog().setCancelable(true);
getDialog().setCanceledOnTouchOutside(true);
......
......@@ -23,7 +23,6 @@
package org.videolan.vlc.gui.dialogs;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -40,20 +39,8 @@ public class SleepTimerDialog extends PickTimeFragment {
super();
}
public static SleepTimerDialog newInstance(int theme) {
SleepTimerDialog myFragment = new SleepTimerDialog();
Bundle args = new Bundle();
args.putInt("theme", theme);
myFragment.setArguments(args);
return myFragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(DialogFragment.STYLE_NO_FRAME, getArguments().getInt("theme"));
public static SleepTimerDialog newInstance() {
return new SleepTimerDialog();
}
@Override
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment