Convert to Kotlin

This commit is contained in:
Tim Gunn 2020-05-03 17:06:10 +12:00
parent a1450feb2b
commit 0e2de9d140
No known key found for this signature in database
GPG key ID: C9BC1E9D0D0AED8C
2 changed files with 15 additions and 20 deletions

View file

@ -1,20 +0,0 @@
package info.nightscout.androidaps.plugins.aps.loop;
import android.content.Context;
import android.content.Intent;
import javax.inject.Inject;
import dagger.android.DaggerBroadcastReceiver;
public class CarbSuggestionReceiver extends DaggerBroadcastReceiver {
@Inject LoopPlugin loopPlugin;
@Override
public void onReceive(Context context, Intent intent) {
super.onReceive(context, intent);
int duartion = intent.getIntExtra("ignoreDuration", 5);
loopPlugin.disableCarbSuggestions(duartion);
}
}

View file

@ -0,0 +1,15 @@
package info.nightscout.androidaps.plugins.aps.loop
import android.content.Context
import android.content.Intent
import dagger.android.DaggerBroadcastReceiver
import javax.inject.Inject
class CarbSuggestionReceiver : DaggerBroadcastReceiver() {
@Inject lateinit var loopPlugin: LoopPlugin
override fun onReceive(context: Context, intent: Intent) {
super.onReceive(context, intent)
val duration = intent.getIntExtra("ignoreDuration", 5)
loopPlugin.disableCarbSuggestions(duration)
}
}