remove g5uploader flavor
This commit is contained in:
parent
fcf47ecc03
commit
fff2e84608
|
@ -102,12 +102,6 @@ android {
|
|||
appIcon: "@mipmap/ic_launcher",
|
||||
appIconRound: "@mipmap/ic_launcher_round"
|
||||
]
|
||||
buildConfigField "boolean", "APS", "true"
|
||||
buildConfigField "boolean", "PUMPDRIVERS", "true"
|
||||
buildConfigField "boolean", "NSCLIENT", "false"
|
||||
buildConfigField "boolean", "NSCLIENT2", "false"
|
||||
buildConfigField "boolean", "G5UPLOADER", "false"
|
||||
buildConfigField "boolean", "PUMPCONTROL", "false"
|
||||
}
|
||||
pumpcontrol {
|
||||
applicationId "info.nightscout.androidaps"
|
||||
|
@ -118,12 +112,6 @@ android {
|
|||
appIcon: "@mipmap/blueowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
buildConfigField "boolean", "APS", "false"
|
||||
buildConfigField "boolean", "PUMPDRIVERS", "true"
|
||||
buildConfigField "boolean", "NSCLIENT", "false"
|
||||
buildConfigField "boolean", "NSCLIENT2", "false"
|
||||
buildConfigField "boolean", "G5UPLOADER", "false"
|
||||
buildConfigField "boolean", "PUMPCONTROL", "true"
|
||||
}
|
||||
nsclient {
|
||||
applicationId "info.nightscout.nsclient"
|
||||
|
@ -134,12 +122,6 @@ android {
|
|||
appIcon: "@mipmap/yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
buildConfigField "boolean", "APS", "false"
|
||||
buildConfigField "boolean", "PUMPDRIVERS", "false"
|
||||
buildConfigField "boolean", "NSCLIENT", "true"
|
||||
buildConfigField "boolean", "NSCLIENT2", "false"
|
||||
buildConfigField "boolean", "G5UPLOADER", "false"
|
||||
buildConfigField "boolean", "PUMPCONTROL", "false"
|
||||
}
|
||||
nsclient2 {
|
||||
applicationId "info.nightscout.nsclient2"
|
||||
|
@ -150,28 +132,6 @@ android {
|
|||
appIcon: "@mipmap/yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
buildConfigField "boolean", "APS", "false"
|
||||
buildConfigField "boolean", "PUMPDRIVERS", "false"
|
||||
buildConfigField "boolean", "NSCLIENT", "false"
|
||||
buildConfigField "boolean", "NSCLIENT2", "true"
|
||||
buildConfigField "boolean", "G5UPLOADER", "false"
|
||||
buildConfigField "boolean", "PUMPCONTROL", "false"
|
||||
}
|
||||
g5uploader {
|
||||
applicationId "info.nightscout.nsclient"
|
||||
dimension "standard"
|
||||
resValue "string", "app_name", "NSClient"
|
||||
versionName version + "-nsclient"
|
||||
manifestPlaceholders = [
|
||||
appIcon: "@mipmap/yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
buildConfigField "boolean", "APS", "false"
|
||||
buildConfigField "boolean", "PUMPDRIVERS", "false"
|
||||
buildConfigField "boolean", "NSCLIENT", "false"
|
||||
buildConfigField "boolean", "NSCLIENT2", "false"
|
||||
buildConfigField "boolean", "G5UPLOADER", "true"
|
||||
buildConfigField "boolean", "PUMPCONTROL", "false"
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
|
|
|
@ -6,21 +6,19 @@ package info.nightscout.androidaps;
|
|||
public class Config {
|
||||
public static int SUPPORTEDNSVERSION = 1002; // 0.10.00
|
||||
|
||||
// MAIN FUCTIONALITY
|
||||
public static final boolean APS = BuildConfig.APS;
|
||||
// PLUGINS
|
||||
public static final boolean NSCLIENT = BuildConfig.NSCLIENT || BuildConfig.NSCLIENT2;
|
||||
public static final boolean G5UPLOADER = BuildConfig.G5UPLOADER;
|
||||
public static final boolean PUMPCONTROL = BuildConfig.PUMPCONTROL;
|
||||
public static final boolean APS = BuildConfig.FLAVOR.equals("full");
|
||||
|
||||
public static final boolean PUMPDRIVERS = BuildConfig.PUMPDRIVERS;
|
||||
public static final boolean NSCLIENT = BuildConfig.FLAVOR.equals("nsclient") || BuildConfig.FLAVOR.equals("nsclient2");
|
||||
public static final boolean PUMPCONTROL = BuildConfig.FLAVOR.equals("pumpcontrol");
|
||||
|
||||
public static final boolean ACTION = !NSCLIENT && !G5UPLOADER;
|
||||
public static final boolean MDI = !NSCLIENT && !G5UPLOADER;
|
||||
public static final boolean OTHERPROFILES = !NSCLIENT && !G5UPLOADER;
|
||||
public static final boolean SAFETY = !NSCLIENT && !G5UPLOADER;
|
||||
public static final boolean PUMPDRIVERS = BuildConfig.FLAVOR.equals("full") || BuildConfig.FLAVOR.equals("pumpcontrol");
|
||||
|
||||
public static final boolean SMSCOMMUNICATORENABLED = !NSCLIENT && !G5UPLOADER;
|
||||
public static final boolean ACTION = !NSCLIENT;
|
||||
public static final boolean MDI = !NSCLIENT;
|
||||
public static final boolean OTHERPROFILES = !NSCLIENT;
|
||||
public static final boolean SAFETY = !NSCLIENT;
|
||||
|
||||
public static final boolean SMSCOMMUNICATORENABLED = !NSCLIENT;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -377,7 +377,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
case R.id.nav_about:
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(MainApp.gs(R.string.app_name) + " " + BuildConfig.VERSION);
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER)
|
||||
if (Config.NSCLIENT)
|
||||
builder.setIcon(R.mipmap.yellowowl);
|
||||
else
|
||||
builder.setIcon(R.mipmap.blueowl);
|
||||
|
|
|
@ -108,7 +108,7 @@ public class MainApp extends Application {
|
|||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
log.debug("onCreate");
|
||||
log.debug("onCreate");
|
||||
sInstance = this;
|
||||
sResources = getResources();
|
||||
sConstraintsChecker = new ConstraintChecker(this);
|
||||
|
@ -172,13 +172,12 @@ public class MainApp extends Application {
|
|||
pluginsList.add(TreatmentsPlugin.getPlugin());
|
||||
if (Config.SAFETY) pluginsList.add(SafetyPlugin.getPlugin());
|
||||
if (Config.APS) pluginsList.add(ObjectivesPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER)
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceXdripPlugin.getPlugin());
|
||||
if (!Config.G5UPLOADER)
|
||||
pluginsList.add(SourceNSClientPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER)
|
||||
pluginsList.add(SourceNSClientPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceMM640gPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER)
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceGlimpPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceDexcomG5Plugin.getPlugin());
|
||||
|
|
|
@ -135,7 +135,7 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
|||
addPreferencesFromResource(id);
|
||||
} else {
|
||||
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER) {
|
||||
if (!Config.NSCLIENT) {
|
||||
addPreferencesFromResource(R.xml.pref_password);
|
||||
}
|
||||
addPreferencesFromResource(R.xml.pref_age);
|
||||
|
@ -174,7 +174,7 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
|||
}
|
||||
}
|
||||
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER) {
|
||||
if (!Config.NSCLIENT) {
|
||||
addPreferencesFromResourceIfEnabled(VirtualPumpPlugin.getPlugin(), PluginType.PUMP);
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
|||
addPreferencesFromResourceIfEnabled(NSClientPlugin.getPlugin(), PluginType.GENERAL);
|
||||
addPreferencesFromResourceIfEnabled(SmsCommunicatorPlugin.getPlugin(), PluginType.GENERAL);
|
||||
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER) {
|
||||
if (!Config.NSCLIENT) {
|
||||
addPreferencesFromResource(R.xml.pref_others);
|
||||
}
|
||||
addPreferencesFromResource(R.xml.pref_datachoices);
|
||||
|
|
|
@ -109,7 +109,7 @@ public class CareportalFragment extends SubscriberFragment implements View.OnCli
|
|||
butonsLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER)
|
||||
if (Config.NSCLIENT)
|
||||
statsLayout.setVisibility(View.GONE); // visible on overview
|
||||
|
||||
updateGUI();
|
||||
|
|
|
@ -53,8 +53,8 @@ public class ObjectivesPlugin extends PluginBase implements ConstraintsInterface
|
|||
super(new PluginDescription()
|
||||
.mainType(PluginType.CONSTRAINTS)
|
||||
.fragmentClass(ObjectivesFragment.class.getName())
|
||||
.alwaysEnabled(!Config.NSCLIENT && !Config.G5UPLOADER)
|
||||
.showInList(!Config.NSCLIENT && !Config.G5UPLOADER)
|
||||
.alwaysEnabled(!Config.NSCLIENT)
|
||||
.showInList(!Config.NSCLIENT)
|
||||
.pluginName(R.string.objectives)
|
||||
.shortName(R.string.objectives_shortname)
|
||||
.description(R.string.description_objectives)
|
||||
|
|
|
@ -73,7 +73,7 @@ public class NSClientPlugin extends PluginBase {
|
|||
.description(R.string.description_ns_client)
|
||||
);
|
||||
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER) {
|
||||
if (Config.NSCLIENT) {
|
||||
pluginDescription.alwaysEnabled(true).visibleByDefault(true);
|
||||
}
|
||||
paused = SP.getBoolean(R.string.key_nsclientinternal_paused, false);
|
||||
|
|
|
@ -215,9 +215,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
|
||||
View view;
|
||||
|
||||
if (MainApp.sResources.getBoolean(R.bool.isTablet) && (Config.NSCLIENT || Config.G5UPLOADER)) {
|
||||
if (MainApp.sResources.getBoolean(R.bool.isTablet) && (Config.NSCLIENT)) {
|
||||
view = inflater.inflate(R.layout.overview_fragment_nsclient_tablet, container, false);
|
||||
} else if (Config.NSCLIENT || Config.G5UPLOADER) {
|
||||
} else if (Config.NSCLIENT) {
|
||||
view = inflater.inflate(R.layout.overview_fragment_nsclient, container, false);
|
||||
shorttextmode = true;
|
||||
} else if (smallHeight || landscape) {
|
||||
|
@ -1201,7 +1201,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
if (activeTemp != null) {
|
||||
basalText = activeTemp.toStringFull() + " ";
|
||||
}
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER)
|
||||
if (Config.NSCLIENT)
|
||||
basalText += "(" + DecimalFormatter.to2Decimal(profile.getBasal()) + " U/h)";
|
||||
else if (pump.getPumpDescription().isTempBasalCapable) {
|
||||
basalText += "(" + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + "U/h)";
|
||||
|
@ -1229,11 +1229,11 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
}
|
||||
}
|
||||
extendedBolusView.setText(extendedBolusText);
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER) {
|
||||
if (Config.NSCLIENT) {
|
||||
extendedBolusView.setOnClickListener(v -> OKDialog.show(getActivity(), MainApp.gs(R.string.extendedbolus), extendedBolus.toString(), null));
|
||||
}
|
||||
if (extendedBolusText.equals(""))
|
||||
extendedBolusView.setVisibility(Config.NSCLIENT || Config.G5UPLOADER ? View.INVISIBLE : View.GONE);
|
||||
extendedBolusView.setVisibility(Config.NSCLIENT ? View.INVISIBLE : View.GONE);
|
||||
else
|
||||
extendedBolusView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ public class NotificationStore {
|
|||
NotificationManager mgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
Bitmap largeIcon = BitmapFactory.decodeResource(context.getResources(), R.mipmap.blueowl);
|
||||
int smallIcon = R.drawable.ic_notification;
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER) {
|
||||
if (Config.NSCLIENT) {
|
||||
largeIcon = BitmapFactory.decodeResource(MainApp.instance().getResources(), R.mipmap.yellowowl);
|
||||
smallIcon = R.drawable.nsclient_smallicon;
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ public class PersistentNotificationPlugin extends PluginBase {
|
|||
builder.setOngoing(true);
|
||||
builder.setOnlyAlertOnce(true);
|
||||
builder.setCategory(NotificationCompat.CATEGORY_STATUS);
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER){
|
||||
if (Config.NSCLIENT){
|
||||
builder.setSmallIcon(R.drawable.nsclient_smallicon);
|
||||
Bitmap largeIcon = BitmapFactory.decodeResource(ctx.getResources(), R.mipmap.yellowowl);
|
||||
builder.setLargeIcon(largeIcon);
|
||||
|
|
|
@ -276,7 +276,7 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
}
|
||||
|
||||
// TODO review
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER)
|
||||
if (!Config.NSCLIENT)
|
||||
NSUpload.uploadDeviceStatus();
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
.pluginName(R.string.virtualpump)
|
||||
.shortName(R.string.virtualpump_shortname)
|
||||
.preferencesId(R.xml.pref_virtualpump)
|
||||
.neverVisible(Config.NSCLIENT || Config.G5UPLOADER)
|
||||
.neverVisible(Config.NSCLIENT)
|
||||
.description(R.string.description_pump_virtual)
|
||||
);
|
||||
pumpDescription.isBolusCapable = true;
|
||||
|
@ -114,7 +114,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
|
||||
@Override
|
||||
public boolean isFakingTempsByExtendedBoluses() {
|
||||
return (Config.NSCLIENT || Config.G5UPLOADER) && fromNSAreCommingFakedExtendedBoluses;
|
||||
return (Config.NSCLIENT) && fromNSAreCommingFakedExtendedBoluses;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -151,7 +151,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
|
||||
@Override
|
||||
public void connect(String reason) {
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER)
|
||||
if (!Config.NSCLIENT)
|
||||
NSUpload.uploadDeviceStatus();
|
||||
lastDataTime = new Date();
|
||||
}
|
||||
|
|
|
@ -122,8 +122,6 @@ public class FabricPrivacy {
|
|||
CustomEvent type = new CustomEvent("AppUsageType");
|
||||
if (Config.NSCLIENT)
|
||||
type.putCustomAttribute("type", "NSClient");
|
||||
else if (Config.G5UPLOADER)
|
||||
type.putCustomAttribute("type", "G5Uploader");
|
||||
else if (Config.PUMPCONTROL)
|
||||
type.putCustomAttribute("type", "PumpControl");
|
||||
else if (MainApp.getConstraintChecker().isClosedLoopAllowed().value())
|
||||
|
|
|
@ -73,7 +73,7 @@ public class MainAppTest {
|
|||
public void getSpecificPluginsListTest() {
|
||||
// currently MDI, VP, R, Rv2, KoreanR, RS
|
||||
int expected;
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER)
|
||||
if (Config.NSCLIENT)
|
||||
expected = 1; // VirtualPump only
|
||||
else
|
||||
expected = 7;
|
||||
|
@ -84,7 +84,7 @@ public class MainAppTest {
|
|||
public void getSpecificPluginsVisibleInListTest() {
|
||||
// currently MDI, VP, R, Rv2, KoreanR, RS
|
||||
int expected;
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER)
|
||||
if (Config.NSCLIENT)
|
||||
expected = 1; // VirtualPump only
|
||||
else
|
||||
expected = 7;
|
||||
|
@ -95,7 +95,7 @@ public class MainAppTest {
|
|||
public void getSpecificPluginsListByInterfaceTest() {
|
||||
// currently MDI, VP, R, Rv2, KoreanR, RS
|
||||
int expected;
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER)
|
||||
if (Config.NSCLIENT)
|
||||
expected = 1; // VirtualPump only
|
||||
else
|
||||
expected = 7;
|
||||
|
@ -106,7 +106,7 @@ public class MainAppTest {
|
|||
public void getSpecificPluginsVisibleInListByInterfaceTest() {
|
||||
// currently MDI, VP, R, Rv2, KoreanR, RS
|
||||
int expected;
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER)
|
||||
if (Config.NSCLIENT)
|
||||
expected = 1; // VirtualPump only
|
||||
else
|
||||
expected = 7;
|
||||
|
|
Loading…
Reference in a new issue