remove direct access to sResources 9
This commit is contained in:
parent
166f2843df
commit
5aa3a88c7f
3 changed files with 6 additions and 6 deletions
|
@ -158,7 +158,7 @@ public class WearPlugin extends PluginBase {
|
|||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventBolusRequested ev) {
|
||||
String status = String.format(MainApp.sResources.getString(R.string.bolusrequested), ev.getAmount());
|
||||
String status = String.format(MainApp.gs(R.string.bolusrequested), ev.getAmount());
|
||||
Intent intent = new Intent(ctx, WatchUpdaterService.class).setAction(WatchUpdaterService.ACTION_SEND_BOLUSPROGRESS);
|
||||
intent.putExtra("progresspercent", 0);
|
||||
intent.putExtra("progressstatus", status);
|
||||
|
@ -172,9 +172,9 @@ public class WearPlugin extends PluginBase {
|
|||
|
||||
String status;
|
||||
if (ev.result.success) {
|
||||
status = MainApp.sResources.getString(R.string.success);
|
||||
status = MainApp.gs(R.string.success);
|
||||
} else {
|
||||
status = MainApp.sResources.getString(R.string.nosuccess);
|
||||
status = MainApp.gs(R.string.nosuccess);
|
||||
}
|
||||
Intent intent = new Intent(ctx, WatchUpdaterService.class).setAction(WatchUpdaterService.ACTION_SEND_BOLUSPROGRESS);
|
||||
intent.putExtra("progresspercent", 100);
|
||||
|
|
|
@ -55,7 +55,7 @@ public class QueueThread extends Thread {
|
|||
PumpInterface pump = ConfigBuilderPlugin.getActivePump();
|
||||
if (pump == null) {
|
||||
log.debug("QUEUE: pump == null");
|
||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.pumpNotInitialized)));
|
||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.pumpNotInitialized)));
|
||||
SystemClock.sleep(1000);
|
||||
continue;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class QueueThread extends Thread {
|
|||
|
||||
if (!pump.isConnected() && secondsElapsed > Constants.PUMP_MAX_CONNECTION_TIME_IN_SECONDS) {
|
||||
MainApp.bus().post(new EventDismissBolusprogressIfRunning(null));
|
||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.connectiontimedout)));
|
||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.connectiontimedout)));
|
||||
log.debug("QUEUE: timed out");
|
||||
pump.stopConnecting();
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public class CommandSetProfile extends Command {
|
|||
if (r.enacted && profileSwitch.source == Source.NIGHTSCOUT) {
|
||||
SmsCommunicatorPlugin smsCommunicatorPlugin = MainApp.getSpecificPlugin(SmsCommunicatorPlugin.class);
|
||||
if (smsCommunicatorPlugin != null && smsCommunicatorPlugin.isEnabled(PluginType.GENERAL)) {
|
||||
smsCommunicatorPlugin.sendNotificationToAllNumbers(MainApp.sResources.getString(R.string.profile_set_ok));
|
||||
smsCommunicatorPlugin.sendNotificationToAllNumbers(MainApp.gs(R.string.profile_set_ok));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue