Demo entry 6324438

aaa

   

Submitted by dean on Nov 17, 2016 at 10:08
Language: Java. Code size: 473 Bytes.

private void injectKeyEvent(KeyEvent event) {
    Log.i(TAG, "injectKeyEvent: " + event);
           // Fix CTS power key bug -- android.trustedvoice.cts.TrustedVoiceHostTest
    if (event.getKeyCode() == 26 && event.getDeviceId() == -1) {
        Log.i(TAG, "injectKeyEvent: keyCode=26, deviceId=-1, just return.");
        return;
    }
    InputManager.getInstance().injectInputEvent(event,
            InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH);
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).