package com.tofly.ghrq_route.common.util.Power;

import android.app.KeyguardManager;
import android.content.Context;

/**
 * Created by Amu on 2018/1/8.
 */

public class PowerUtils {


    /**检测当前系统是否锁屏状态
     * @param context
     * @return
     */
    public static boolean isScreenLocked(Context context){
        KeyguardManager keyguardManager = (KeyguardManager)
                context.getSystemService(Context.KEYGUARD_SERVICE);
        return keyguardManager.inKeyguardRestrictedInputMode();
    }
}
