//判断屏幕是否处于唤醒状态
if (!PMUtils.isScreenOn(AppApplication.getAppContext())){
//唤醒屏幕
PMUtils.wakeAndUnlock(AppApplication.getAppContext());
}
工具类
public class PMUtils {
public static boolean isScreenOn(Context context) {
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
if (pm.isScreenOn()) {
return true;
}
return