is Keyguard - Android android.app

Android examples for android.app:KeyguardManager

Description

is Keyguard

Demo Code


//package com.java2s;

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

public class Main {

    public static boolean isKeyguard(Context context) {
        KeyguardManager mKeyguardManager = (KeyguardManager) context
                .getSystemService(Context.KEYGUARD_SERVICE);
        boolean flag = mKeyguardManager.inKeyguardRestrictedInputMode();
        return flag;
    }/*from   w ww.j a  va  2 s . c o m*/
}

Related Tutorials