public VlcSession(Context context,Handler serviceHandler){
  super(context,serviceHandler);
  Log.d(TAG,"Session created (" + mSessionNumber + ")");
  SharedPreferences sharedPreferences=context.getSharedPreferences(Constants.PREFERENCE_TVHEADEND,Context.MODE_PRIVATE);
  ArrayList<String> options=new ArrayList<>();
  options.add("--http-reconnect");
  options.add("--network-caching=2000");
  if (sharedPreferences.getBoolean(Constants.KEY_DEINTERLACE_ENABLED,false)) {
    String method=sharedPreferences.getString(Constants.KEY_DEINTERLACE_METHOD,null);
    Log.d(TAG,"Using VLC deinterlace mode: " + method);
    options.add("--video-filter=deinterlace");
    options.add("--deinterlace=-1");
    options.add("--deinterlace-mode=" + method);
  }
  mLibVLC=new LibVLC(options);
  String userAgent=getUserAgent(mContext);
  mLibVLC.setUserAgent(userAgent,userAgent);
}

public VlcSession ( Context context , Handler serviceHandler ) { super ( context , serviceHandler ) ; Log . d ( TAG , "Session created (" + mSessionNumber + ")" ) ; SharedPreferences sharedPreferences = context . getSharedPreferences ( Constants . PREFERENCE_TVHEADEND , Context . MODE_PRIVATE ) ; ArrayList < String > options = new ArrayList < > ( ) ; options . add ( "--http-reconnect" ) ; options . add ( "--network-caching=2000" ) ; if ( sharedPreferences . getBoolean ( Constants . KEY_DEINTERLACE_ENABLED , false ) ) { String method = sharedPreferences . getString ( Constants . KEY_DEINTERLACE_METHOD , null ) ; Log . d ( TAG , "Using VLC deinterlace mode: " + method ) ; options . add ( "--video-filter=deinterlace" ) ; options . add ( "--deinterlace=-1" ) ; options . add ( "--deinterlace-mode=" + method ) ; } mLibVLC = new LibVLC ( options ) ; String userAgent = getUserAgent ( mContext ) ; mLibVLC . setUserAgent ( userAgent , userAgent ) ; }
creates a new session .
