Use custom Reset RileyLink icon for Omnipod and rename badly named local variable

This commit is contained in:
Bart Sopers 2020-12-01 22:49:33 +01:00
parent 7994f2fca2
commit 02ce6f5c74

View file

@ -141,7 +141,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
private final PumpType pumpType = PumpType.Insulet_Omnipod; private final PumpType pumpType = PumpType.Insulet_Omnipod;
private final List<CustomAction> customActions = Collections.singletonList(new CustomAction( private final List<CustomAction> customActions = Collections.singletonList(new CustomAction(
R.string.omnipod_custom_action_reset_rileylink, OmnipodCustomActionType.RESET_RILEY_LINK_CONFIGURATION, true)); R.string.omnipod_custom_action_reset_rileylink, OmnipodCustomActionType.RESET_RILEY_LINK_CONFIGURATION, R.drawable.icon_pod_activity_reset_rileylink_config, true));
private final CompositeDisposable disposables = new CompositeDisposable(); private final CompositeDisposable disposables = new CompositeDisposable();
private final NSUpload nsUpload; private final NSUpload nsUpload;
@ -810,12 +810,12 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
@Override @Override
public void executeCustomAction(CustomActionType customActionType) { public void executeCustomAction(CustomActionType customActionType) {
OmnipodCustomActionType mcat = (OmnipodCustomActionType) customActionType; OmnipodCustomActionType omnipodCustomActionType = (OmnipodCustomActionType) customActionType;
if (mcat == OmnipodCustomActionType.RESET_RILEY_LINK_CONFIGURATION) { if (omnipodCustomActionType == OmnipodCustomActionType.RESET_RILEY_LINK_CONFIGURATION) {
serviceTaskExecutor.startTask(new ResetRileyLinkConfigurationTask(getInjector())); serviceTaskExecutor.startTask(new ResetRileyLinkConfigurationTask(getInjector()));
} else { } else {
aapsLogger.warn(LTag.PUMP, "Unknown custom action: " + mcat); aapsLogger.warn(LTag.PUMP, "Unknown custom action: " + omnipodCustomActionType);
} }
} }