Search in sources :

Example 11 with InputEvent

use of android.view.InputEvent in project platform_frameworks_base by android.

the class TvView method dispatchTouchEvent.

@Override
public boolean dispatchTouchEvent(MotionEvent event) {
    if (super.dispatchTouchEvent(event)) {
        return true;
    }
    if (DEBUG)
        Log.d(TAG, "dispatchTouchEvent(" + event + ")");
    if (mSession == null) {
        return false;
    }
    InputEvent copiedEvent = event.copy();
    int ret = mSession.dispatchInputEvent(copiedEvent, copiedEvent, mFinishedInputEventCallback, mHandler);
    return ret != Session.DISPATCH_NOT_HANDLED;
}
Also used : InputEvent(android.view.InputEvent)

Example 12 with InputEvent

use of android.view.InputEvent in project platform_frameworks_base by android.

the class TvView method dispatchGenericMotionEvent.

@Override
public boolean dispatchGenericMotionEvent(MotionEvent event) {
    if (super.dispatchGenericMotionEvent(event)) {
        return true;
    }
    if (DEBUG)
        Log.d(TAG, "dispatchGenericMotionEvent(" + event + ")");
    if (mSession == null) {
        return false;
    }
    InputEvent copiedEvent = event.copy();
    int ret = mSession.dispatchInputEvent(copiedEvent, copiedEvent, mFinishedInputEventCallback, mHandler);
    return ret != Session.DISPATCH_NOT_HANDLED;
}
Also used : InputEvent(android.view.InputEvent)

Example 13 with InputEvent

use of android.view.InputEvent in project platform_frameworks_base by android.

the class InputMethodManager method sendInputEventOnMainLooperLocked.

// Must be called on the main looper
int sendInputEventOnMainLooperLocked(PendingEvent p) {
    if (mCurChannel != null) {
        if (mCurSender == null) {
            mCurSender = new ImeInputEventSender(mCurChannel, mH.getLooper());
        }
        final InputEvent event = p.mEvent;
        final int seq = event.getSequenceNumber();
        if (mCurSender.sendInputEvent(seq, event)) {
            mPendingEvents.put(seq, p);
            Trace.traceCounter(Trace.TRACE_TAG_INPUT, PENDING_EVENT_COUNTER, mPendingEvents.size());
            Message msg = mH.obtainMessage(MSG_TIMEOUT_INPUT_EVENT, p);
            msg.setAsynchronous(true);
            mH.sendMessageDelayed(msg, INPUT_METHOD_NOT_RESPONDING_TIMEOUT);
            return DISPATCH_IN_PROGRESS;
        }
        Log.w(TAG, "Unable to send input event to IME: " + mCurId + " dropping: " + event);
    }
    return DISPATCH_NOT_HANDLED;
}
Also used : Message(android.os.Message) InputEvent(android.view.InputEvent)

Example 14 with InputEvent

use of android.view.InputEvent in project android_frameworks_base by crdroidandroid.

the class TvView method dispatchGenericMotionEvent.

@Override
public boolean dispatchGenericMotionEvent(MotionEvent event) {
    if (super.dispatchGenericMotionEvent(event)) {
        return true;
    }
    if (DEBUG)
        Log.d(TAG, "dispatchGenericMotionEvent(" + event + ")");
    if (mSession == null) {
        return false;
    }
    InputEvent copiedEvent = event.copy();
    int ret = mSession.dispatchInputEvent(copiedEvent, copiedEvent, mFinishedInputEventCallback, mHandler);
    return ret != Session.DISPATCH_NOT_HANDLED;
}
Also used : InputEvent(android.view.InputEvent)

Example 15 with InputEvent

use of android.view.InputEvent in project android_frameworks_base by crdroidandroid.

the class InputMethodManager method sendInputEventOnMainLooperLocked.

// Must be called on the main looper
int sendInputEventOnMainLooperLocked(PendingEvent p) {
    if (mCurChannel != null) {
        if (mCurSender == null) {
            mCurSender = new ImeInputEventSender(mCurChannel, mH.getLooper());
        }
        final InputEvent event = p.mEvent;
        final int seq = event.getSequenceNumber();
        if (mCurSender.sendInputEvent(seq, event)) {
            mPendingEvents.put(seq, p);
            Trace.traceCounter(Trace.TRACE_TAG_INPUT, PENDING_EVENT_COUNTER, mPendingEvents.size());
            Message msg = mH.obtainMessage(MSG_TIMEOUT_INPUT_EVENT, seq, 0, p);
            msg.setAsynchronous(true);
            mH.sendMessageDelayed(msg, INPUT_METHOD_NOT_RESPONDING_TIMEOUT);
            return DISPATCH_IN_PROGRESS;
        }
        Log.w(TAG, "Unable to send input event to IME: " + mCurId + " dropping: " + event);
    }
    return DISPATCH_NOT_HANDLED;
}
Also used : Message(android.os.Message) InputEvent(android.view.InputEvent)

Aggregations

InputEvent (android.view.InputEvent)27 Message (android.os.Message)7 SuppressLint (android.annotation.SuppressLint)1 Activity (android.app.Activity)1 Bitmap (android.graphics.Bitmap)1 Uri (android.net.Uri)1 SslError (android.net.http.SslError)1 FragmentActivity (android.support.v4.app.FragmentActivity)1 KeyEvent (android.view.KeyEvent)1 View (android.view.View)1 ClientCertRequest (android.webkit.ClientCertRequest)1 ConsoleMessage (android.webkit.ConsoleMessage)1 DownloadListener (android.webkit.DownloadListener)1 Callback (android.webkit.GeolocationPermissions.Callback)1 HttpAuthHandler (android.webkit.HttpAuthHandler)1 JsPromptResult (android.webkit.JsPromptResult)1 JsResult (android.webkit.JsResult)1 PermissionRequest (android.webkit.PermissionRequest)1 SslErrorHandler (android.webkit.SslErrorHandler)1 ValueCallback (android.webkit.ValueCallback)1