This commit is contained in:
Milos Kozak 2022-08-04 10:29:01 +02:00
commit 7ae066dde2
2 changed files with 11 additions and 2 deletions

View file

@ -74,7 +74,7 @@ class AlarmSoundService : DaggerService() {
if (intent?.hasExtra(ErrorHelperActivity.SOUND_ID) == true) resourceId = intent.getIntExtra(ErrorHelperActivity.SOUND_ID, R.raw.error)
player = MediaPlayer()
try {
val afd = rh.openRawResourceFd(resourceId) ?: return START_STICKY
val afd = rh.openRawResourceFd(resourceId) ?: return START_NOT_STICKY
player?.setDataSource(afd.fileDescriptor, afd.startOffset, afd.length)
afd.close()
player?.isLooping = true
@ -94,7 +94,7 @@ class AlarmSoundService : DaggerService() {
aapsLogger.error("Unhandled exception", e)
}
aapsLogger.debug(LTag.CORE, "onStartCommand End")
return START_STICKY
return START_NOT_STICKY
}
override fun onDestroy() {

View file

@ -291,6 +291,15 @@ public class AapsOmnipodErosManager {
return new PumpEnactResult(injector).success(false).enacted(false).comment(note);
}
// #1963 return synthetic success if pre-activation
// to allow profile switch prior to pod activation
// otherwise a catch-22
if (!podStateManager.getActivationProgress().isCompleted()) {
// TODO: i18n string
return new PumpEnactResult(injector).success(true).enacted(false).comment("pre" +
"-activation basal change moot");
}
PodHistoryEntryType historyEntryType = podStateManager.isSuspended() ? PodHistoryEntryType.RESUME_DELIVERY : PodHistoryEntryType.SET_BASAL_SCHEDULE;
try {