Commit 5f79e0b6 authored by Geoffrey Métais's avatar Geoffrey Métais

Remove dead code

parent 46e7242d
......@@ -22,10 +22,7 @@ package org.videolan.vlc.gui.video;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
......@@ -35,7 +32,6 @@ import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.annotation.MainThread;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.view.ActionMode;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.RecyclerView;
......@@ -131,20 +127,6 @@ public class VideoGridFragment extends MediaBrowserFragment implements MediaUpda
return v;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// init the information for the scan (2/2)
IntentFilter filter = new IntentFilter();
filter.addAction(MediaUtils.ACTION_SCAN_START);
filter.addAction(MediaUtils.ACTION_SCAN_STOP);
LocalBroadcastManager.getInstance(getActivity()).registerReceiver(messageReceiverVideoListFragment, filter);
if (mMediaLibrary.isWorking()) {
MediaUtils.actionScanStart();
}
}
public void onStart() {
super.onStart();
......@@ -182,12 +164,6 @@ public class VideoGridFragment extends MediaBrowserFragment implements MediaUpda
outState.putString(KEY_GROUP, mGroup);
}
@Override
public void onDestroyView() {
LocalBroadcastManager.getInstance(getActivity()).unregisterReceiver(messageReceiverVideoListFragment);
super.onDestroyView();
}
@Override
public void onDestroy() {
super.onDestroy();
......@@ -426,19 +402,6 @@ public class VideoGridFragment extends MediaBrowserFragment implements MediaUpda
mGroup = prefix;
}
private final BroadcastReceiver messageReceiverVideoListFragment = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equalsIgnoreCase(MediaUtils.ACTION_SCAN_START)) {
mLayoutFlipperLoading.setVisibility(View.VISIBLE);
} else if (action.equalsIgnoreCase(MediaUtils.ACTION_SCAN_STOP)) {
mLayoutFlipperLoading.setVisibility(View.INVISIBLE);
}
}
};
@Override
public void onRefresh() {
getActivity().startService(new Intent(MediaParsingService.ACTION_RELOAD, null, getActivity(), MediaParsingService.class));
......
......@@ -4,11 +4,9 @@ import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.provider.MediaStore;
import android.support.v4.content.LocalBroadcastManager;
import android.text.TextUtils;
import org.videolan.libvlc.util.AndroidUtil;
......@@ -27,17 +25,9 @@ import java.util.Arrays;
import java.util.List;
public class MediaUtils {
public static final String ACTION_SCAN_START = Strings.buildPkgString("gui.ScanStart");
public static final String ACTION_SCAN_STOP = Strings.buildPkgString("gui.ScanStop");
private static SubtitlesDownloader sSubtitlesDownloader;
public static void actionScanStart() {
Intent intent = new Intent();
intent.setAction(ACTION_SCAN_START);
LocalBroadcastManager.getInstance(VLCApplication.getAppContext()).sendBroadcast(intent);
}
public static void getSubs(Activity activity, List<MediaWrapper> mediaList) {
getSubs(activity, mediaList, null);
}
......@@ -66,12 +56,6 @@ public class MediaUtils {
sSubtitlesDownloader.setActivity(activity);
}
public static void actionScanStop() {
Intent intent = new Intent();
intent.setAction(ACTION_SCAN_STOP);
LocalBroadcastManager.getInstance(VLCApplication.getAppContext()).sendBroadcast(intent);
}
public static void appendMedia(final Context context, final List<MediaWrapper> media){
if (media == null)
return;
......
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