Migrate library to Kotlin.

This commit is contained in:
inorichi
2016-02-23 14:51:18 +01:00
parent 9062e40ec5
commit 59276b7160
20 changed files with 1149 additions and 925 deletions
@@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.util
import android.app.AlarmManager
import android.app.Notification
import android.app.NotificationManager
import android.content.Context
import android.support.annotation.StringRes
import android.support.v4.app.NotificationCompat
@@ -27,6 +28,12 @@ inline fun Context.notification(func: NotificationCompat.Builder.() -> Unit): No
return builder.build()
}
/**
* Property to get the notification manager from the context.
*/
val Context.notificationManager : NotificationManager
get() = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
/**
* Property to get the alarm manager from the context.
* @return the alarm manager.