<commit_before>package com.vackosar.searchbasedlauncher;

import android.content.SharedPreferences;
import android.widget.RadioGroup;
import android.widget.TextView;

public class AppTypeSelector implements RadioGroup.OnCheckedChangeListener {
    public static final AppsType DEFAULT_SELECTED = AppsType.normal;
    final private MainActivity mainActivity;
    private AppsType selected = DEFAULT_SELECTED;
    private final RadioGroup radioGroup;
    private final SharedPreferences sharedPreferences;
    private final ColorService colorService = new ColorService();
    private final TextView wifiButton;
    private final TextView button3;
    private final TextView bluetoothButton;

    public AppTypeSelector(MainActivity mainActivity) {
        this.mainActivity = mainActivity;
        radioGroup = (RadioGroup) mainActivity.findViewById(R.id.appListRadioGroup);
        radioGroup.setOnCheckedChangeListener(this);
        sharedPreferences = mainActivity.getApplicationContext().getSharedPreferences("preferencename", 0);
        selected = AppsType.parseOrdinal(sharedPreferences.getInt("selected", 0));
        wifiButton = (TextView) mainActivity.findViewById(R.id.wifiButton);
        button3 = (TextView) mainActivity.findViewById(R.id.bluetoothButton);
        bluetoothButton = (TextView) mainActivity.findViewById(R.id.cameraButton);
    }

    @Override
    public void onCheckedChanged(RadioGroup group, int checkedId) {
        selected = AppsType.parseViewId(checkedId);
        mainActivity.getMenuButton().toggle();
    }

    public void setInvisible() {
        colorService.setInvisible(wifiButton);
        colorService.setInvisible(button3);
        colorService.setInvisible(bluetoothButton);
    }

    public AppsType getSelected() {
        return selected;
    }

    public void save() {
        SharedPreferences.Editor editor = sharedPreferences.edit();
        editor.putInt("selected", selected.ordinal());
        editor.commit();
    }

    public void requestFocus() {
        radioGroup.requestFocus();<commit_msg>Clean up.<commit_after>package com.vackosar.searchbasedlauncher;

import android.content.SharedPreferences;
import android.widget.RadioGroup;

public class AppTypeSelector implements RadioGroup.OnCheckedChangeListener {
    public static final AppsType DEFAULT_SELECTED = AppsType.normal;
    final private MainActivity mainActivity;
    private AppsType selected = DEFAULT_SELECTED;
    private final RadioGroup radioGroup;
    private final SharedPreferences sharedPreferences;

    public AppTypeSelector(MainActivity mainActivity) {
        this.mainActivity = mainActivity;
        radioGroup = (RadioGroup) mainActivity.findViewById(R.id.appListRadioGroup);
        radioGroup.setOnCheckedChangeListener(this);
        sharedPreferences = mainActivity.getApplicationContext().getSharedPreferences("preferencename", 0);
        selected = AppsType.parseOrdinal(sharedPreferences.getInt("selected", 0));
    }

    @Override
    public void onCheckedChanged(RadioGroup group, int checkedId) {
        selected = AppsType.parseViewId(checkedId);
        mainActivity.getMenuButton().toggle();
    }

    public AppsType getSelected() {
        return selected;
    }

    public void save() {
        SharedPreferences.Editor editor = sharedPreferences.edit();
        editor.putInt("selected", selected.ordinal());
        editor.commit();
    }

    public void requestFocus() {
        radioGroup.requestFocus();
{'fraction_non_alphanumeric': 0.08340523439746908, 'fraction_numerical': 0.0020132297958009777, 'mean_word_length': 4.00431654676259, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '528690', 'n_tokens_mistral': 888, 'n_tokens_neox': 850, 'n_words': 187}