Code example for HashSet

Methods: add, contains

0
    public final static String TAG = "VLC/Util";
    private final static boolean hasNavBar;
    /** A set of utility functions for the VLC application */ 
 
    static { 
        HashSet<String> devicesWithoutNavBar = new HashSet<String>();
        devicesWithoutNavBar.add("HTC One V");
        devicesWithoutNavBar.add("HTC One S");
        devicesWithoutNavBar.add("HTC One X");
        devicesWithoutNavBar.add("HTC One XL");
        hasNavBar = isICSOrLater() && !devicesWithoutNavBar.contains(android.os.Build.MODEL);
    } 
 
    public static LibVLC getLibVlcInstance() throws LibVlcException { 
        LibVLC instance = LibVLC.getExistingInstance();
        if (instance == null) {
            Thread.setDefaultUncaughtExceptionHandler(new VlcCrashHandler());
 
            instance = LibVLC.getInstance();
            Context context = VLCApplication.getAppContext();
            SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);