remove wear flavours

This commit is contained in:
AdrianLxM 2017-10-12 18:24:48 +02:00
parent f751638a7f
commit 746d71bcff
6 changed files with 8 additions and 28 deletions

View file

@ -62,7 +62,7 @@ android {
}
}
productFlavors {
flavorDimensions "standard", "wear"
flavorDimensions "standard"
full {
dimension "standard"
resValue "string", "app_name", "AndroidAPS"
@ -111,22 +111,6 @@ android {
buildConfigField "boolean", "NSCLIENTOLNY", "true"
buildConfigField "boolean", "CLOSEDLOOP", "false"
}
wear {
dimension "wear"
buildConfigField "boolean", "WEAR", "true"
buildConfigField "boolean", "WEAR_CONTROL", "false"
}
wearcontrol {
dimension "wear"
buildConfigField "boolean", "WEAR", "true"
buildConfigField "boolean", "WEAR_CONTROL", "true"
}
nowear {
dimension "wear"
buildConfigField "boolean", "WEAR", "false"
buildConfigField "boolean", "WEAR_CONTROL", "false"
}
}
}

View file

@ -11,7 +11,6 @@ public class Config {
// PLUGINS
public static final boolean OPENAPSENABLED = APS;
public static final boolean LOOPENABLED = APS;
public static final boolean WEAR = BuildConfig.WEAR;
public static final boolean NSCLIENT = BuildConfig.NSCLIENTOLNY;

View file

@ -150,7 +150,7 @@ public class MainApp extends Application {
pluginsList.add(SourceGlimpPlugin.getPlugin());
if (Config.SMSCOMMUNICATORENABLED) pluginsList.add(SmsCommunicatorPlugin.getPlugin());
if (Config.WEAR) pluginsList.add(WearFragment.getPlugin(this));
pluginsList.add(WearFragment.getPlugin(this));
pluginsList.add(StatuslinePlugin.getPlugin(this));
pluginsList.add(new PersistentNotificationPlugin(this));
pluginsList.add(NSClientInternalPlugin.getPlugin());

View file

@ -170,11 +170,9 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
}
addPreferencesFromResource(R.xml.pref_advanced);
if (Config.WEAR) {
WearPlugin wearPlugin = MainApp.getSpecificPlugin(WearPlugin.class);
if (wearPlugin != null && wearPlugin.isEnabled(PluginBase.GENERAL)) {
addPreferencesFromResource(R.xml.pref_wear);
}
WearPlugin wearPlugin = MainApp.getSpecificPlugin(WearPlugin.class);
if (wearPlugin != null && wearPlugin.isEnabled(PluginBase.GENERAL)) {
addPreferencesFromResource(R.xml.pref_wear);
}
StatuslinePlugin statuslinePlugin = MainApp.getSpecificPlugin(StatuslinePlugin.class);

View file

@ -69,8 +69,7 @@ public class ActionStringHandler {
public synchronized static void handleInitiate(String actionstring) {
if (!BuildConfig.WEAR_CONTROL) return;
if (!SP.getBoolean("wearcontrol", false)) return;
lastBolusWizard = null;
@ -522,7 +521,7 @@ public class ActionStringHandler {
public synchronized static void handleConfirmation(String actionString) {
if (!BuildConfig.WEAR_CONTROL) return;
if (!SP.getBoolean("wearcontrol", false)) return;
//Guard from old or duplicate confirmations

View file

@ -29,7 +29,7 @@ import info.nightscout.utils.SP;
public class WearPlugin implements PluginBase {
private static boolean fragmentEnabled = Config.WEAR;
private static boolean fragmentEnabled = true;
private boolean fragmentVisible = true;
private static WatchUpdaterService watchUS;
private final Context ctx;