package info.nightscout.androidaps.plugins.SourceMM640g;

import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interfaces.BgSourceInterface;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.plugins.SourceGlimp.SourceGlimpPlugin;

/**
 * Created by mike on 05.08.2016.
 */
public class SourceMM640gPlugin implements PluginBase, BgSourceInterface {
    boolean fragmentEnabled = false;

    static SourceGlimpPlugin plugin = null;

    public static SourceGlimpPlugin getPlugin() {
        if (plugin == null)
            plugin = new SourceGlimpPlugin();
        return plugin;
    }

    @Override
    public String getFragmentClass() {
        return null;
    }

    @Override
    public int getType() {
        return PluginBase.BGSOURCE;
    }

    @Override
    public String getName() {
        return MainApp.instance().getString(R.string.MM640g);
    }

    @Override
    public String getNameShort() {
        // use long name as fallback (no tabs)
        return getName();
    }

    @Override
    public boolean isEnabled(int type) {
        return type == BGSOURCE && fragmentEnabled;
    }

    @Override
    public boolean isVisibleInTabs(int type) {
        return false;
    }

    @Override
    public boolean canBeHidden(int type) {
        return true;
    }

    @Override
    public boolean hasFragment() {
        return false;
    }

    @Override
    public boolean showInList(int type) {
        return true;
    }

    @Override
    public void setFragmentEnabled(int type, boolean fragmentEnabled) {
        if (type == BGSOURCE) this.fragmentEnabled = fragmentEnabled;
    }

    @Override
    public void setFragmentVisible(int type, boolean fragmentVisible) {

    }


}

@@ -255,81 +255,8 @@
 ase;
-%0Aimport info.nightscout.androidaps.plugins.SourceGlimp.SourceGlimpPlugin;
 %0A%0A/*
@@ -421,29 +421,30 @@
 tatic Source
-Glimp
+MM640g
 Plugin plugi
@@ -474,29 +474,30 @@
 tatic Source
-Glimp
+MM640g
 Plugin getPl
@@ -568,13 +568,14 @@
 urce
-Glimp
+MM640g
 Plug

fix 640g plugin