remove unneeded fragments
This commit is contained in:
parent
5360129e5f
commit
b39f59f59e
|
@ -26,10 +26,10 @@ import info.nightscout.androidaps.plugins.Careportal.CareportalFragment;
|
|||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderFragment;
|
||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.androidaps.plugins.ConstraintsObjectives.ObjectivesFragment;
|
||||
import info.nightscout.androidaps.plugins.ConstraintsSafety.SafetyFragment;
|
||||
import info.nightscout.androidaps.plugins.ConstraintsSafety.SafetyPlugin;
|
||||
import info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment;
|
||||
import info.nightscout.androidaps.plugins.InsulinFastactingProlonged.InsulinFastactingProlongedFragment;
|
||||
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorFragment;
|
||||
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.Loop.LoopFragment;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.NSClientInternalFragment;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSAMA.OpenAPSAMAFragment;
|
||||
|
@ -46,18 +46,18 @@ import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanFragment;
|
|||
import info.nightscout.androidaps.plugins.PumpDanaRKorean.services.DanaRKoreanExecutionService;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaRv2.DanaRv2Fragment;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaRv2.services.DanaRv2ExecutionService;
|
||||
import info.nightscout.androidaps.plugins.PumpMDI.MDIFragment;
|
||||
import info.nightscout.androidaps.plugins.PumpMDI.MDIPlugin;
|
||||
import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpPlugin;
|
||||
import info.nightscout.androidaps.plugins.SensitivityMK.SensitivityMKPlugin;
|
||||
import info.nightscout.androidaps.plugins.SensitivityOref0.SensitivityOref0Plugin;
|
||||
import info.nightscout.androidaps.plugins.SmsCommunicator.SmsCommunicatorFragment;
|
||||
import info.nightscout.androidaps.plugins.SourceGlimp.SourceGlimpFragment;
|
||||
import info.nightscout.androidaps.plugins.SourceMM640g.SourceMM640gFragment;
|
||||
import info.nightscout.androidaps.plugins.SourceNSClient.SourceNSClientFragment;
|
||||
import info.nightscout.androidaps.plugins.SourceXdrip.SourceXdripFragment;
|
||||
import info.nightscout.androidaps.plugins.SourceGlimp.SourceGlimpPlugin;
|
||||
import info.nightscout.androidaps.plugins.SourceMM640g.SourceMM640gPlugin;
|
||||
import info.nightscout.androidaps.plugins.SourceNSClient.SourceNSClientPlugin;
|
||||
import info.nightscout.androidaps.plugins.SourceXdrip.SourceXdripPlugin;
|
||||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsFragment;
|
||||
import info.nightscout.androidaps.plugins.Wear.WearFragment;
|
||||
import info.nightscout.androidaps.plugins.XDripStatusline.StatuslineFragment;
|
||||
import info.nightscout.androidaps.plugins.XDripStatusline.StatuslinePlugin;
|
||||
import info.nightscout.androidaps.receivers.KeepAliveReceiver;
|
||||
import info.nightscout.utils.NSUpload;
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
|
@ -95,7 +95,7 @@ public class MainApp extends Application {
|
|||
pluginsList = new ArrayList<>();
|
||||
// Register all tabs in app here
|
||||
pluginsList.add(OverviewFragment.getPlugin());
|
||||
pluginsList.add(IobCobCalculatorFragment.getPlugin());
|
||||
pluginsList.add(IobCobCalculatorPlugin.getPlugin());
|
||||
if (Config.ACTION) pluginsList.add(ActionsFragment.getPlugin());
|
||||
pluginsList.add(InsulinFastactingFragment.getPlugin());
|
||||
pluginsList.add(InsulinFastactingProlongedFragment.getPlugin());
|
||||
|
@ -105,7 +105,7 @@ public class MainApp extends Application {
|
|||
if (Config.DANAR) pluginsList.add(DanaRKoreanFragment.getPlugin());
|
||||
if (Config.DANARv2) pluginsList.add(DanaRv2Fragment.getPlugin());
|
||||
pluginsList.add(CareportalFragment.getPlugin());
|
||||
if (Config.MDI) pluginsList.add(MDIFragment.getPlugin());
|
||||
if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin());
|
||||
if (Config.VIRTUALPUMP) pluginsList.add(VirtualPumpPlugin.getInstance());
|
||||
if (Config.LOOPENABLED) pluginsList.add(LoopFragment.getPlugin());
|
||||
if (Config.OPENAPSENABLED) pluginsList.add(OpenAPSMAFragment.getPlugin());
|
||||
|
@ -116,19 +116,19 @@ public class MainApp extends Application {
|
|||
if (Config.OTHERPROFILES)
|
||||
pluginsList.add(CircadianPercentageProfileFragment.getPlugin());
|
||||
pluginsList.add(TreatmentsFragment.getPlugin());
|
||||
if (Config.SAFETY) pluginsList.add(SafetyFragment.getPlugin());
|
||||
if (Config.SAFETY) pluginsList.add(SafetyPlugin.getPlugin());
|
||||
if (Config.APS) pluginsList.add(ObjectivesFragment.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceXdripFragment.getPlugin());
|
||||
pluginsList.add(SourceNSClientFragment.getPlugin());
|
||||
pluginsList.add(SourceXdripPlugin.getPlugin());
|
||||
pluginsList.add(SourceNSClientPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceMM640gFragment.getPlugin());
|
||||
pluginsList.add(SourceMM640gPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceGlimpFragment.getPlugin());
|
||||
pluginsList.add(SourceGlimpPlugin.getPlugin());
|
||||
if (Config.SMSCOMMUNICATORENABLED) pluginsList.add(SmsCommunicatorFragment.getPlugin());
|
||||
|
||||
if (Config.WEAR) pluginsList.add(WearFragment.getPlugin(this));
|
||||
pluginsList.add(StatuslineFragment.getPlugin(this));
|
||||
pluginsList.add(StatuslinePlugin.getPlugin(this));
|
||||
pluginsList.add(new PersistentNotificationPlugin(this));
|
||||
pluginsList.add(NSClientInternalFragment.getPlugin());
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.ConstraintsSafety;
|
||||
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class SafetyFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(SafetyFragment.class);
|
||||
|
||||
private static SafetyPlugin safetyPlugin = new SafetyPlugin();
|
||||
|
||||
public static SafetyPlugin getPlugin() {
|
||||
return safetyPlugin;
|
||||
}
|
||||
}
|
|
@ -21,9 +21,17 @@ import info.nightscout.utils.SP;
|
|||
public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
||||
private static Logger log = LoggerFactory.getLogger(SafetyPlugin.class);
|
||||
|
||||
static SafetyPlugin plugin = null;
|
||||
|
||||
public static SafetyPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new SafetyPlugin();
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFragmentClass() {
|
||||
return SafetyFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.IobCobCalculator;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
/**
|
||||
* Created by adrian on 17/11/16.
|
||||
*/
|
||||
|
||||
public class IobCobCalculatorFragment extends Fragment {
|
||||
|
||||
private static IobCobCalculatorPlugin iobCobCalculatorPlugin = new IobCobCalculatorPlugin();
|
||||
|
||||
public static IobCobCalculatorPlugin getPlugin() {
|
||||
return iobCobCalculatorPlugin;
|
||||
}
|
||||
}
|
|
@ -57,6 +57,14 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
|||
|
||||
private static Object dataLock = new Object();
|
||||
|
||||
static IobCobCalculatorPlugin plugin = null;
|
||||
|
||||
public static IobCobCalculatorPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new IobCobCalculatorPlugin();
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return GENERAL;
|
||||
|
@ -64,7 +72,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
|||
|
||||
@Override
|
||||
public String getFragmentClass() {
|
||||
return IobCobCalculatorFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.Persistentnotification;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
/**
|
||||
* Created by adrian on 23/12/16.
|
||||
*/
|
||||
|
||||
public class PersistentNotificationFragment extends Fragment {
|
||||
|
||||
|
||||
}
|
|
@ -54,7 +54,7 @@ public class PersistentNotificationPlugin implements PluginBase {
|
|||
|
||||
@Override
|
||||
public String getFragmentClass() {
|
||||
return PersistentNotificationFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.PumpMDI;
|
||||
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
public class MDIFragment extends Fragment {
|
||||
private static MDIPlugin mdiPlugin = new MDIPlugin();
|
||||
|
||||
public static MDIPlugin getPlugin() {
|
||||
return mdiPlugin;
|
||||
}
|
||||
}
|
|
@ -12,11 +12,11 @@ import info.nightscout.androidaps.Config;
|
|||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.interfaces.PumpDescription;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.utils.DateUtil;
|
||||
|
||||
/**
|
||||
|
@ -30,6 +30,14 @@ public class MDIPlugin implements PluginBase, PumpInterface {
|
|||
|
||||
PumpDescription pumpDescription = new PumpDescription();
|
||||
|
||||
static MDIPlugin plugin = null;
|
||||
|
||||
public static MDIPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new MDIPlugin();
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public MDIPlugin() {
|
||||
pumpDescription.isBolusCapable = true;
|
||||
pumpDescription.bolusStep = 0.5d;
|
||||
|
@ -42,7 +50,7 @@ public class MDIPlugin implements PluginBase, PumpInterface {
|
|||
|
||||
@Override
|
||||
public String getFragmentClass() {
|
||||
return MDIFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.SourceGlimp;
|
||||
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
public class SourceGlimpFragment extends Fragment {
|
||||
|
||||
private static SourceGlimpPlugin sourceGlimpPlugin = new SourceGlimpPlugin();
|
||||
|
||||
public static SourceGlimpPlugin getPlugin() {
|
||||
return sourceGlimpPlugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -4,7 +4,6 @@ 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.SourceMM640g.SourceMM640gFragment;
|
||||
|
||||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
|
@ -12,9 +11,17 @@ import info.nightscout.androidaps.plugins.SourceMM640g.SourceMM640gFragment;
|
|||
public class SourceGlimpPlugin 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 SourceGlimpFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.SourceMM640g;
|
||||
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
public class SourceMM640gFragment extends Fragment {
|
||||
|
||||
private static SourceMM640gPlugin sourceMM640gPlugin = new SourceMM640gPlugin();
|
||||
|
||||
public static SourceMM640gPlugin getPlugin() {
|
||||
return sourceMM640gPlugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -4,7 +4,7 @@ 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.SourceNSClient.SourceNSClientFragment;
|
||||
import info.nightscout.androidaps.plugins.SourceGlimp.SourceGlimpPlugin;
|
||||
|
||||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
|
@ -12,9 +12,17 @@ import info.nightscout.androidaps.plugins.SourceNSClient.SourceNSClientFragment;
|
|||
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 SourceMM640gFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.SourceNSClient;
|
||||
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
public class SourceNSClientFragment extends Fragment {
|
||||
|
||||
private static SourceNSClientPlugin sourceNSClientPlugin = new SourceNSClientPlugin();
|
||||
|
||||
public static SourceNSClientPlugin getPlugin() {
|
||||
return sourceNSClientPlugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -12,9 +12,17 @@ import info.nightscout.androidaps.interfaces.PluginBase;
|
|||
public class SourceNSClientPlugin implements PluginBase, BgSourceInterface {
|
||||
boolean fragmentEnabled = true;
|
||||
|
||||
static SourceNSClientPlugin plugin = null;
|
||||
|
||||
public static SourceNSClientPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new SourceNSClientPlugin();
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFragmentClass() {
|
||||
return SourceNSClientFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.SourceXdrip;
|
||||
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
public class SourceXdripFragment extends Fragment {
|
||||
|
||||
private static SourceXdripPlugin sourceXdripPlugin = new SourceXdripPlugin();
|
||||
|
||||
public static SourceXdripPlugin getPlugin() {
|
||||
return sourceXdripPlugin;
|
||||
}
|
||||
}
|
|
@ -4,16 +4,23 @@ 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.SourceNSClient.SourceNSClientFragment;
|
||||
|
||||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
*/
|
||||
public class SourceXdripPlugin implements PluginBase, BgSourceInterface {
|
||||
|
||||
static SourceXdripPlugin plugin = null;
|
||||
|
||||
public static SourceXdripPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new SourceXdripPlugin();
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFragmentClass() {
|
||||
return SourceNSClientFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
private static boolean fragmentEnabled = false;
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.XDripStatusline;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
|
||||
/**
|
||||
* Created by adrian on 17/11/16.
|
||||
*/
|
||||
|
||||
public class StatuslineFragment extends Fragment {
|
||||
|
||||
private static StatuslinePlugin statuslinePlugin;
|
||||
|
||||
public static StatuslinePlugin getPlugin(Context ctx) {
|
||||
|
||||
if (statuslinePlugin == null) {
|
||||
statuslinePlugin = new StatuslinePlugin(ctx);
|
||||
}
|
||||
|
||||
return statuslinePlugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -44,6 +44,17 @@ public class StatuslinePlugin implements PluginBase {
|
|||
private final Context ctx;
|
||||
SharedPreferences mPrefs;
|
||||
|
||||
private static StatuslinePlugin statuslinePlugin;
|
||||
|
||||
public static StatuslinePlugin getPlugin(Context ctx) {
|
||||
|
||||
if (statuslinePlugin == null) {
|
||||
statuslinePlugin = new StatuslinePlugin(ctx);
|
||||
}
|
||||
|
||||
return statuslinePlugin;
|
||||
}
|
||||
|
||||
StatuslinePlugin(Context ctx) {
|
||||
this.ctx = ctx;
|
||||
this.mPrefs = PreferenceManager.getDefaultSharedPreferences(ctx);
|
||||
|
@ -56,7 +67,7 @@ public class StatuslinePlugin implements PluginBase {
|
|||
|
||||
@Override
|
||||
public String getFragmentClass() {
|
||||
return StatuslineFragment.class.getName();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue