package com.gem.media;

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

import com.gem.media.splash.base.utils.ALog;

import java.util.Objects;

public class ScreenBroadcastReceiver  extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if (null != intent) {
            ALog.d("ScreenBroadcastReceiver", "onReceive action =" + intent.getAction());
            if (Objects.equals(intent.getAction(), Intent.ACTION_SCREEN_ON)) {
                PViewManager.getInstance().showOrRemoveWindow();
            }
        } else {
            ALog.d("ScreenBroadcastReceiver", "intent == null" );
        }
    }
}
