Search in sources :

Example 91 with SomeArgs

use of com.android.internal.os.SomeArgs in project android_frameworks_base by DirtyUnicorns.

the class AccessibilityInteractionController method performAccessibilityActionClientThread.

public void performAccessibilityActionClientThread(long accessibilityNodeId, int action, Bundle arguments, int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid, long interrogatingTid) {
    Message message = mHandler.obtainMessage();
    message.what = PrivateHandler.MSG_PERFORM_ACCESSIBILITY_ACTION;
    message.arg1 = flags;
    message.arg2 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
    SomeArgs args = SomeArgs.obtain();
    args.argi1 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId);
    args.argi2 = action;
    args.argi3 = interactionId;
    args.arg1 = callback;
    args.arg2 = arguments;
    message.obj = args;
    // client can handle the message to generate the result.
    if (interogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
        AccessibilityInteractionClient.getInstanceForThread(interrogatingTid).setSameThreadMessage(message);
    } else {
        mHandler.sendMessage(message);
    }
}
Also used : Message(android.os.Message) SomeArgs(com.android.internal.os.SomeArgs)

Example 92 with SomeArgs

use of com.android.internal.os.SomeArgs in project android_frameworks_base by DirtyUnicorns.

the class AccessibilityInteractionController method focusSearchClientThread.

public void focusSearchClientThread(long accessibilityNodeId, int direction, Region interactiveRegion, int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid, long interrogatingTid, MagnificationSpec spec) {
    Message message = mHandler.obtainMessage();
    message.what = PrivateHandler.MSG_FOCUS_SEARCH;
    message.arg1 = flags;
    message.arg2 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
    SomeArgs args = SomeArgs.obtain();
    args.argi2 = direction;
    args.argi3 = interactionId;
    args.arg1 = callback;
    args.arg2 = spec;
    args.arg3 = interactiveRegion;
    message.obj = args;
    // client can handle the message to generate the result.
    if (interogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
        AccessibilityInteractionClient.getInstanceForThread(interrogatingTid).setSameThreadMessage(message);
    } else {
        mHandler.sendMessage(message);
    }
}
Also used : Message(android.os.Message) SomeArgs(com.android.internal.os.SomeArgs)

Example 93 with SomeArgs

use of com.android.internal.os.SomeArgs in project android_frameworks_base by DirtyUnicorns.

the class ViewRootImpl method dispatchResized.

public void dispatchResized(Rect frame, Rect overscanInsets, Rect contentInsets, Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw, Configuration newConfig, Rect backDropFrame, boolean forceLayout, boolean alwaysConsumeNavBar) {
    if (DEBUG_LAYOUT)
        Log.v(mTag, "Resizing " + this + ": frame=" + frame.toShortString() + " contentInsets=" + contentInsets.toShortString() + " visibleInsets=" + visibleInsets.toShortString() + " reportDraw=" + reportDraw + " backDropFrame=" + backDropFrame);
    // updated as fast as possible on a separate thread,
    if (mDragResizing) {
        boolean fullscreen = frame.equals(backDropFrame);
        synchronized (mWindowCallbacks) {
            for (int i = mWindowCallbacks.size() - 1; i >= 0; i--) {
                mWindowCallbacks.get(i).onWindowSizeIsChanging(backDropFrame, fullscreen, visibleInsets, stableInsets);
            }
        }
    }
    Message msg = mHandler.obtainMessage(reportDraw ? MSG_RESIZED_REPORT : MSG_RESIZED);
    if (mTranslator != null) {
        mTranslator.translateRectInScreenToAppWindow(frame);
        mTranslator.translateRectInScreenToAppWindow(overscanInsets);
        mTranslator.translateRectInScreenToAppWindow(contentInsets);
        mTranslator.translateRectInScreenToAppWindow(visibleInsets);
    }
    SomeArgs args = SomeArgs.obtain();
    final boolean sameProcessCall = (Binder.getCallingPid() == android.os.Process.myPid());
    args.arg1 = sameProcessCall ? new Rect(frame) : frame;
    args.arg2 = sameProcessCall ? new Rect(contentInsets) : contentInsets;
    args.arg3 = sameProcessCall ? new Rect(visibleInsets) : visibleInsets;
    args.arg4 = sameProcessCall && newConfig != null ? new Configuration(newConfig) : newConfig;
    args.arg5 = sameProcessCall ? new Rect(overscanInsets) : overscanInsets;
    args.arg6 = sameProcessCall ? new Rect(stableInsets) : stableInsets;
    args.arg7 = sameProcessCall ? new Rect(outsets) : outsets;
    args.arg8 = sameProcessCall ? new Rect(backDropFrame) : backDropFrame;
    args.argi1 = forceLayout ? 1 : 0;
    args.argi2 = alwaysConsumeNavBar ? 1 : 0;
    msg.obj = args;
    mHandler.sendMessage(msg);
}
Also used : Rect(android.graphics.Rect) Message(android.os.Message) Configuration(android.content.res.Configuration) SomeArgs(com.android.internal.os.SomeArgs) Point(android.graphics.Point)

Example 94 with SomeArgs

use of com.android.internal.os.SomeArgs in project platform_frameworks_base by android.

the class ActivityThread method sendMessage.

private void sendMessage(int what, Object obj, int arg1, int arg2, int seq) {
    if (DEBUG_MESSAGES)
        Slog.v(TAG, "SCHEDULE " + mH.codeToString(what) + " arg1=" + arg1 + " arg2=" + arg2 + "seq= " + seq);
    Message msg = Message.obtain();
    msg.what = what;
    SomeArgs args = SomeArgs.obtain();
    args.arg1 = obj;
    args.argi1 = arg1;
    args.argi2 = arg2;
    args.argi3 = seq;
    msg.obj = args;
    mH.sendMessage(msg);
}
Also used : Message(android.os.Message) SomeArgs(com.android.internal.os.SomeArgs)

Example 95 with SomeArgs

use of com.android.internal.os.SomeArgs in project platform_frameworks_base by android.

the class AccessibilityInteractionController method performAccessibilityActionClientThread.

public void performAccessibilityActionClientThread(long accessibilityNodeId, int action, Bundle arguments, int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid, long interrogatingTid) {
    Message message = mHandler.obtainMessage();
    message.what = PrivateHandler.MSG_PERFORM_ACCESSIBILITY_ACTION;
    message.arg1 = flags;
    message.arg2 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
    SomeArgs args = SomeArgs.obtain();
    args.argi1 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId);
    args.argi2 = action;
    args.argi3 = interactionId;
    args.arg1 = callback;
    args.arg2 = arguments;
    message.obj = args;
    // client can handle the message to generate the result.
    if (interogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
        AccessibilityInteractionClient.getInstanceForThread(interrogatingTid).setSameThreadMessage(message);
    } else {
        mHandler.sendMessage(message);
    }
}
Also used : Message(android.os.Message) SomeArgs(com.android.internal.os.SomeArgs)

Aggregations

SomeArgs (com.android.internal.os.SomeArgs)187 Message (android.os.Message)67 Point (android.graphics.Point)46 RemoteException (android.os.RemoteException)42 IAccessibilityInteractionConnectionCallback (android.view.accessibility.IAccessibilityInteractionConnectionCallback)36 AccessibilityNodeInfo (android.view.accessibility.AccessibilityNodeInfo)30 Region (android.graphics.Region)25 AccessibilityNodeProvider (android.view.accessibility.AccessibilityNodeProvider)18 IInputMethod (com.android.internal.view.IInputMethod)12 InputChannel (android.view.InputChannel)11 EditorInfo (android.view.inputmethod.EditorInfo)11 IInputContext (com.android.internal.view.IInputContext)11 Rect (android.graphics.Rect)7 Configuration (android.content.res.Configuration)6 Bundle (android.os.Bundle)6 IBinder (android.os.IBinder)6 InputBinding (android.view.inputmethod.InputBinding)6 InputConnection (android.view.inputmethod.InputConnection)6 InputMethod (android.view.inputmethod.InputMethod)6 IInputMethodClient (com.android.internal.view.IInputMethodClient)6