inject instead of static get
This commit is contained in:
parent
389ef01861
commit
a12026c73e
3 changed files with 6 additions and 3 deletions
|
@ -154,6 +154,7 @@ public class MainApp extends DaggerApplication {
|
||||||
@Inject TreatmentsPlugin treatmentsPlugin;
|
@Inject TreatmentsPlugin treatmentsPlugin;
|
||||||
@Inject VirtualPumpPlugin virtualPumpPlugin;
|
@Inject VirtualPumpPlugin virtualPumpPlugin;
|
||||||
@Inject VersionCheckerPlugin versionCheckerPlugin;
|
@Inject VersionCheckerPlugin versionCheckerPlugin;
|
||||||
|
@Inject WearPlugin wearPlugin;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
|
@ -251,7 +252,7 @@ public class MainApp extends DaggerApplication {
|
||||||
if (!Config.NSCLIENT) pluginsList.add(smsCommunicatorPlugin);
|
if (!Config.NSCLIENT) pluginsList.add(smsCommunicatorPlugin);
|
||||||
pluginsList.add(FoodPlugin.getPlugin());
|
pluginsList.add(FoodPlugin.getPlugin());
|
||||||
|
|
||||||
pluginsList.add(WearPlugin.initPlugin(this));
|
pluginsList.add(wearPlugin);
|
||||||
pluginsList.add(statusLinePlugin);
|
pluginsList.add(statusLinePlugin);
|
||||||
pluginsList.add(PersistentNotificationPlugin.getPlugin());
|
pluginsList.add(PersistentNotificationPlugin.getPlugin());
|
||||||
pluginsList.add(NSClientPlugin.getPlugin());
|
pluginsList.add(NSClientPlugin.getPlugin());
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class MyPreferenceFragment extends PreferenceFragment implements HasAndro
|
||||||
@Inject StatusLinePlugin statusLinePlugin;
|
@Inject StatusLinePlugin statusLinePlugin;
|
||||||
@Inject TidepoolPlugin tidepoolPlugin;
|
@Inject TidepoolPlugin tidepoolPlugin;
|
||||||
@Inject VirtualPumpPlugin virtualPumpPlugin;
|
@Inject VirtualPumpPlugin virtualPumpPlugin;
|
||||||
|
@Inject WearPlugin wearPlugin;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setArguments(Bundle args) {
|
public void setArguments(Bundle args) {
|
||||||
|
@ -144,7 +145,7 @@ public class MyPreferenceFragment extends PreferenceFragment implements HasAndro
|
||||||
addPreferencesFromResource(R.xml.pref_others);
|
addPreferencesFromResource(R.xml.pref_others);
|
||||||
addPreferencesFromResource(R.xml.pref_datachoices);
|
addPreferencesFromResource(R.xml.pref_datachoices);
|
||||||
|
|
||||||
addPreferencesFromResourceIfEnabled(WearPlugin.getPlugin(), PluginType.GENERAL);
|
addPreferencesFromResourceIfEnabled(wearPlugin, PluginType.GENERAL);
|
||||||
addPreferencesFromResourceIfEnabled(statusLinePlugin, PluginType.GENERAL);
|
addPreferencesFromResourceIfEnabled(statusLinePlugin, PluginType.GENERAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
||||||
@Inject TreatmentsPlugin treatmentsPlugin;
|
@Inject TreatmentsPlugin treatmentsPlugin;
|
||||||
@Inject IobCobCalculatorPlugin iobCobCalculatorPlugin;
|
@Inject IobCobCalculatorPlugin iobCobCalculatorPlugin;
|
||||||
@Inject NotificationStore notificationStore;
|
@Inject NotificationStore notificationStore;
|
||||||
|
@Inject ActionStringHandler actionStringHandler;
|
||||||
|
|
||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
|
|
||||||
|
@ -967,7 +968,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
||||||
(NotificationManager) mainApp.getSystemService(Context.NOTIFICATION_SERVICE);
|
(NotificationManager) mainApp.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
notificationManager.cancel(Constants.notificationID);
|
notificationManager.cancel(Constants.notificationID);
|
||||||
|
|
||||||
ActionStringHandler.handleInitiate("cancelChangeRequest");
|
actionStringHandler.handleInitiate("cancelChangeRequest");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updatePumpStatus(String status) {
|
private void updatePumpStatus(String status) {
|
||||||
|
|
Loading…
Reference in a new issue