public String getExtendedText() { switch (this) { case Ok: if (DexSessionKeeper.isStarted()) { return getText() + " " + DexSessionKeeper.prettyTime(); } else { return getText() + " time?"; } case WarmingUp: if (DexSessionKeeper.isStarted()) { if (DexSessionKeeper.warmUpTimeValid()) { return getText() + "\n" + DexSessionKeeper.prettyTime() + " left"; } else { return getText(); } } else { return getText(); } default: return getText(); } } }
public String getExtendedText() { switch (this) { case Ok: if (DexSessionKeeper.isStarted()) { return getText() + " " + DexSessionKeeper.prettyTime(); } else { return getText() + " time?"; } case WarmingUp: if (DexSessionKeeper.isStarted()) { if (DexSessionKeeper.warmUpTimeValid()) { return getText() + "\n" + DexSessionKeeper.prettyTime() + " left"; } else { return getText(); } } else { return getText(); } default: return getText(); } } }
public String getExtendedText() { switch (this) { case Ok: if (DexSessionKeeper.isStarted()) { return getText() + " " + DexSessionKeeper.prettyTime(); } else { return getText() + " time?"; } case WarmingUp: if (DexSessionKeeper.isStarted()) { if (DexSessionKeeper.warmUpTimeValid()) { return getText() + "\n" + DexSessionKeeper.prettyTime() + " left"; } else { return getText(); } } else { return getText(); } default: return getText(); } } }
final PendingIntent pi = PendingIntent.getActivity(xdrip.getAppContext(), G5_CALIBRATION_REQUEST, JoH.getStartActivityIntent(c), PendingIntent.FLAG_UPDATE_CURRENT); JoH.showNotification(state.getText(), "G5 Calibration Required", android_wear ? null : pi, G5_CALIBRATION_REQUEST, state == CalibrationState.NeedsFirstCalibration, true, false); JoH.showNotification(state.getText(), "G5 Sensor Stopped", pi, G5_SENSOR_STARTED, true, true, false); UserError.Log.ueh(TAG, "Native Sensor is now Stopped: " + state.getExtendedText()); } else if (is_started && !was_started) { JoH.showNotification(state.getText(), "G5 Sensor FAILED", pi, G5_SENSOR_FAILED, true, true, false); UserError.Log.ueh(TAG, "Native Sensor is now marked FAILED: " + state.getExtendedText());
final PendingIntent pi = PendingIntent.getActivity(xdrip.getAppContext(), G5_CALIBRATION_REQUEST, JoH.getStartActivityIntent(c), PendingIntent.FLAG_UPDATE_CURRENT); JoH.showNotification(state.getText(), "G5 Calibration Required", android_wear ? null : pi, G5_CALIBRATION_REQUEST, state == CalibrationState.NeedsFirstCalibration, true, false); JoH.showNotification(state.getText(), "G5 Sensor Stopped", pi, G5_SENSOR_STARTED, true, true, false); UserError.Log.ueh(TAG, "Native Sensor is now Stopped: " + state.getExtendedText()); } else if (is_started && !was_started) { JoH.showNotification(state.getText(), "G5 Sensor FAILED", pi, G5_SENSOR_FAILED, true, true, false); UserError.Log.ueh(TAG, "Native Sensor is now marked FAILED: " + state.getExtendedText());
final PendingIntent pi = PendingIntent.getActivity(xdrip.getAppContext(), G5_CALIBRATION_REQUEST, JoH.getStartActivityIntent(c), PendingIntent.FLAG_UPDATE_CURRENT); JoH.showNotification(state.getText(), "G5 Calibration Required", android_wear ? null : pi, G5_CALIBRATION_REQUEST, state == CalibrationState.NeedsFirstCalibration, true, false); JoH.showNotification(state.getText(), "G5 Sensor Stopped", pi, G5_SENSOR_STARTED, true, true, false); UserError.Log.ueh(TAG, "Native Sensor is now Stopped: " + state.getExtendedText()); } else if (is_started && !was_started) { JoH.showNotification(state.getText(), "G5 Sensor FAILED", pi, G5_SENSOR_FAILED, true, true, false); UserError.Log.ueh(TAG, "Native Sensor is now marked FAILED: " + state.getExtendedText());