package com.xhly.manageapp.broadcastreceiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.xhly.corelib.Const
import com.xhly.corelib.eventbus.UIEvent
import com.xhly.corelib.utils.LogShow

class ScreenReceiver: BroadcastReceiver() {
    override fun onReceive(context: Context, intent: Intent) {
        val action = intent.action
        if (Intent.ACTION_SCREEN_ON==action){
            UIEvent(Const.ACTION_SCREEN_ON).post()
        }else if (Intent.ACTION_SCREEN_OFF==action){
            UIEvent(Const.ACTION_SCREEN_OFF).post()
        }
    }
}