package com.dlc.eboard.broadcast

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.dlc.eboard.ui.SplashActivity

/**
 * info
 *
 * @author ReiChin_
 */
class BootBroadcastReceiver : BroadcastReceiver() {

    override fun onReceive(context: Context?, intent: Intent?) {
        if (Intent.ACTION_BOOT_COMPLETED == intent?.action) {
            context?.let {
                val splashIntent = Intent(
                    it,
                    SplashActivity::class.java
                ).apply { addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) }
                it.startActivity(splashIntent)
            }
        }
    }
}