Commit 2e3ba272 authored by Geoffrey Métais's avatar Geoffrey Métais

Remove lint warnings for API version

parent eae964fe
......@@ -20,6 +20,7 @@
*****************************************************************************/
package org.videolan.vlc.gui.tv;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.FragmentManager;
import android.content.Intent;
......@@ -74,6 +75,7 @@ import org.videolan.vlc.util.VLCInstance;
import java.util.ArrayList;
import java.util.List;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public class MainTvActivity extends BaseTvActivity implements IVideoBrowser, OnItemViewSelectedListener,
OnItemViewClickedListener, OnClickListener, PlaybackService.Callback {
......
......@@ -20,7 +20,9 @@
*****************************************************************************/
package org.videolan.vlc.gui.tv;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.support.v17.leanback.widget.ArrayObjectAdapter;
......@@ -41,6 +43,7 @@ import org.videolan.vlc.media.MediaWrapper;
import java.util.ArrayList;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public class SearchFragment extends android.support.v17.leanback.app.SearchFragment
implements android.support.v17.leanback.app.SearchFragment.SearchResultProvider {
......@@ -106,7 +109,7 @@ public class SearchFragment extends android.support.v17.leanback.app.SearchFragm
@Override
public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item, RowPresenter.ViewHolder rowViewHolder, Row row) {
if (item instanceof MediaWrapper) {
TvUtil.openMedia(mActivity, (MediaWrapper) item, row);
TvUtil.openMedia(mActivity, item, row);
}
}
};
......
......@@ -23,6 +23,7 @@
package org.videolan.vlc.gui.tv.browser;
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
......@@ -30,6 +31,7 @@ import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
......@@ -42,6 +44,7 @@ import org.videolan.vlc.gui.PlaybackServiceActivity;
import org.videolan.vlc.gui.tv.SearchActivity;
import org.videolan.vlc.util.WeakHandler;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public abstract class BaseTvActivity extends PlaybackServiceActivity {
protected MediaLibrary mMediaLibrary;
protected SharedPreferences mSettings;
......@@ -57,13 +60,13 @@ public abstract class BaseTvActivity extends PlaybackServiceActivity {
protected void onResume() {
super.onResume();
//Handle network connection state
IntentFilter networkfilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
IntentFilter networkFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
IntentFilter storageFilter = new IntentFilter(Intent.ACTION_MEDIA_MOUNTED);
storageFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
storageFilter.addDataScheme("file");
registerReceiver(mExternalDevicesReceiver, networkfilter);
registerReceiver(mExternalDevicesReceiver, networkFilter);
registerReceiver(mExternalDevicesReceiver, storageFilter);
}
......
......@@ -23,6 +23,8 @@
package org.videolan.vlc.gui.tv.browser;
import android.annotation.TargetApi;
import android.os.Build;
import android.text.TextUtils;
import org.videolan.libvlc.util.AndroidUtil;
......@@ -33,6 +35,7 @@ import org.videolan.vlc.util.AndroidDevices;
import java.io.File;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public class DirectoryBrowserFragment extends SortedBrowserFragment{
public static final String TAG = "VLC/NetworkBrowserFragment";
......
......@@ -23,10 +23,14 @@
package org.videolan.vlc.gui.tv.browser;
import android.annotation.TargetApi;
import android.os.Build;
import org.videolan.libvlc.Media;
import org.videolan.vlc.media.MediaWrapper;
import org.videolan.vlc.util.Util;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public class NetworkBrowserFragment extends SortedBrowserFragment {
public static final String TAG = "VLC/NetworkBrowserFragment";
......
......@@ -20,7 +20,9 @@
*****************************************************************************/
package org.videolan.vlc.gui.tv.browser;
import android.annotation.TargetApi;
import android.app.Fragment;
import android.os.Build;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
......@@ -32,6 +34,7 @@ import org.videolan.vlc.gui.tv.MainTvActivity;
import org.videolan.vlc.gui.tv.browser.interfaces.BrowserActivityInterface;
import org.videolan.vlc.gui.tv.browser.interfaces.BrowserFragmentInterface;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public class VerticalGridActivity extends BaseTvActivity implements BrowserActivityInterface {
BrowserFragmentInterface mFragment;
......
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