Code example for KeyguardManager

Methods: newKeyguardLock

        mImm = InputMethodManager.getInstance();
        KeyguardManager keyguardManager =
            (KeyguardManager) getInstrumentation().getContext().getSystemService(
    // Utility test methods 
    public void verifyEditTextAdjustment(final View editText, int rootViewHeight) {
        int[] origLocation = new int[2];
        int[] newLocation = new int[2];
        // Tell the keyboard to go away. 
        mImm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
        // Bring the target EditText into focus. 
        mTargetActivity.runOnUiThread(new Runnable() {
            public void run() { 
Connect your IDE to all the code out there  Get Codota for Java