Cleanups based on Android Studio analysis.
This commit is contained in:
parent
8b81925ccb
commit
4c66199142
|
@ -157,7 +157,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis
|
|||
double bolusHoursAgo = agoMsc / 60d / 60d / 1000d;
|
||||
// TODO i18n
|
||||
if ((agoMsc < 60 * 1000)) {
|
||||
lastBolusView.setText(String.format("%.1f U (now)", bolus.amount, (int) bolusMinAgo));
|
||||
lastBolusView.setText(String.format("%.1f U (now)", bolus.amount));
|
||||
} else if (bolusMinAgo < 60) {
|
||||
lastBolusView.setText(String.format("%.1f U (%d min ago)", bolus.amount, (int) bolusMinAgo));
|
||||
// lastBolusView.setText(getString(R.string.combo_last_bolus, bolus.amount,
|
||||
|
|
|
@ -525,7 +525,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
ConfigBuilderPlugin treatmentsInterface = MainApp.getConfigBuilder();
|
||||
treatmentsInterface.addToHistoryTempBasal(tempStart);
|
||||
|
||||
pump.tbrSetTime = state.timestamp;
|
||||
MainApp.bus().post(new EventComboPumpUpdateGUI());
|
||||
}
|
||||
|
||||
|
@ -632,8 +631,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
pump.lastSuccessfulCmdTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
pump.lastCmdResult = commandResult;
|
||||
|
||||
if (commandResult.success) {
|
||||
updateLocalData(commandResult);
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@ class ComboPump {
|
|||
boolean initialized = false;
|
||||
volatile long lastSuccessfulCmdTime;
|
||||
|
||||
@Nullable
|
||||
volatile CommandResult lastCmdResult;
|
||||
public volatile String activity;
|
||||
@NonNull
|
||||
volatile PumpState state = new PumpState();
|
||||
|
@ -28,9 +26,6 @@ class ComboPump {
|
|||
@NonNull
|
||||
volatile BasalProfile basalProfile = new BasalProfile();
|
||||
|
||||
/** Time the active TBR was set (if any). Needed to calculate remaining time in fragment */
|
||||
long tbrSetTime;
|
||||
|
||||
// Last known history record times to skip over old ones when reading history
|
||||
long lastHistoryBolusTime = PumpHistoryRequest.FULL;
|
||||
long lastHistoryTbrTime = PumpHistoryRequest.FULL;
|
||||
|
|
|
@ -7,9 +7,6 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -100,11 +100,7 @@ public class PairingActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
mDevices.add(item);
|
||||
new Handler().post(new Runnable() {
|
||||
public void run() {
|
||||
mListAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
new Handler().post(() -> mListAdapter.notifyDataSetChanged());
|
||||
}
|
||||
|
||||
private ScanCallback mBleScanCallback = new ScanCallback() {
|
||||
|
|
Loading…
Reference in a new issue