List of usage examples for android.app KeyguardManager inKeyguardRestrictedInputMode
public boolean inKeyguardRestrictedInputMode()
From source file:Main.java
public static boolean haveLockScreen(Context context) { KeyguardManager km = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); return km.inKeyguardRestrictedInputMode(); }
From source file:Main.java
public static boolean isScreenLock(Context context) { KeyguardManager km = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); return km.inKeyguardRestrictedInputMode(); }
From source file:Main.java
public static boolean isSleeping(Context context) { KeyguardManager kgMgr = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); return kgMgr.inKeyguardRestrictedInputMode(); }
From source file:Main.java
public static boolean inKeyguardRestrictedInputMode(Context context) { KeyguardManager mKeyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); return mKeyguardManager.inKeyguardRestrictedInputMode(); }
From source file:Main.java
public static boolean isScreenLocked(Context context) { KeyguardManager mKeyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); return mKeyguardManager.inKeyguardRestrictedInputMode(); }
From source file:Main.java
public static boolean isSleeping(Context context) { KeyguardManager kgMgr = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); boolean isSleeping = kgMgr.inKeyguardRestrictedInputMode(); return isSleeping; }
From source file:Main.java
/** * telephone is sleeping// w w w.j a va 2 s. com * * @param context * @return */ public static boolean isSleeping(Context context) { KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); return keyguardManager.inKeyguardRestrictedInputMode(); }
From source file:Main.java
public static boolean isScreenLocked(Context context) { KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); return keyguardManager.inKeyguardRestrictedInputMode(); }
From source file:Main.java
private static boolean isScreenOffOrLocked(Context context) { KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); boolean off = !powerManager.isScreenOn(); off |= keyguardManager.inKeyguardRestrictedInputMode(); return off;//from w ww . j a v a 2 s . c o m }
From source file:library.artaris.cn.library.utils.SystemUtils.java
/** * ???/*from w ww .ja va 2 s.c o m*/ * @param context * @return */ public static boolean isSleeping(Context context) { KeyguardManager kgMgr = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); return kgMgr.inKeyguardRestrictedInputMode(); }