Convert to Kotlin
This commit is contained in:
parent
a1450feb2b
commit
0e2de9d140
2 changed files with 15 additions and 20 deletions
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue