Android KeyguardManager key board lock mode

Description

Android KeyguardManager key board lock mode


import android.app.KeyguardManager;

import android.content.Context;

public class Main {


    public final static boolean isScreenLocked(Context c) {

        KeyguardManager mKeyguardManager = (KeyguardManager) c.getSystemService(c.KEYGUARD_SERVICE);
        return mKeyguardManager.inKeyguardRestrictedInputMode();

    }// w  ww. j a  va2s . c om
}



PreviousNext

Related