Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.HashSet;

import android.content.Context;

import android.preference.PreferenceManager;
import android.text.TextUtils;

public class Main {
    public static HashSet<String> getExcludedTags(Context context) {
        String tags = PreferenceManager.getDefaultSharedPreferences(context).getString("excludeTagsInheritance",
                null);

        if (tags == null)
            return null;

        HashSet<String> tagsSet = new HashSet<String>();
        for (String tag : tags.split(":")) {
            if (TextUtils.isEmpty(tag) == false)
                tagsSet.add(tag);
        }

        return tagsSet;
    }
}