package com.dlc.eboard.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent

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

    override fun onReceive(context: Context?, intent: Intent?) {
        val localIntent: Intent
        if (intent!!.action.equals("android.intent.action.PACKAGE_REPLACED")) {
            localIntent = Intent()
            localIntent.setClassName("com.dlc.eboard", "com.dlc.eboard.ui.SplashActivity")
            localIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
            context!!.startActivity(localIntent)
        }
    }

}