Search in sources :

Example 6 with SomeArgs

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

the class ScreenMagnifier method onRectangleOnScreenRequested.

@Override
public void onRectangleOnScreenRequested(int left, int top, int right, int bottom) {
    SomeArgs args = SomeArgs.obtain();
    args.argi1 = left;
    args.argi2 = top;
    args.argi3 = right;
    args.argi4 = bottom;
    mHandler.obtainMessage(MESSAGE_ON_RECTANGLE_ON_SCREEN_REQUESTED, args).sendToTarget();
}
Also used : SomeArgs(com.android.internal.os.SomeArgs)

Example 7 with SomeArgs

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

the class DisplayMagnifier method onRectangleOnScreenRequestedLocked.

public void onRectangleOnScreenRequestedLocked(Rect rectangle, boolean immediate) {
    if (DEBUG_RECTANGLE_REQUESTED) {
        Slog.i(LOG_TAG, "Rectangle on screen requested: " + rectangle);
    }
    if (!mMagnifedViewport.isMagnifyingLocked()) {
        return;
    }
    Rect magnifiedRegionBounds = mTempRect2;
    mMagnifedViewport.getMagnifiedFrameInContentCoordsLocked(magnifiedRegionBounds);
    if (magnifiedRegionBounds.contains(rectangle)) {
        return;
    }
    SomeArgs args = SomeArgs.obtain();
    args.argi1 = rectangle.left;
    args.argi2 = rectangle.top;
    args.argi3 = rectangle.right;
    args.argi4 = rectangle.bottom;
    mHandler.obtainMessage(MyHandler.MESSAGE_NOTIFY_RECTANGLE_ON_SCREEN_REQUESTED, args).sendToTarget();
}
Also used : Rect(android.graphics.Rect) SomeArgs(com.android.internal.os.SomeArgs)

Example 8 with SomeArgs

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

the class AppWidgetServiceImpl method scheduleNotifyGroupHostsForProvidersChangedLocked.

private void scheduleNotifyGroupHostsForProvidersChangedLocked(int userId) {
    final int[] profileIds = mSecurityPolicy.getEnabledGroupProfileIds(userId);
    final int N = mHosts.size();
    for (int i = N - 1; i >= 0; i--) {
        Host host = mHosts.get(i);
        boolean hostInGroup = false;
        final int M = profileIds.length;
        for (int j = 0; j < M; j++) {
            final int profileId = profileIds[j];
            if (host.getUserId() == profileId) {
                hostInGroup = true;
                break;
            }
        }
        if (!hostInGroup) {
            continue;
        }
        if (host == null || host.zombie || host.callbacks == null) {
            continue;
        }
        SomeArgs args = SomeArgs.obtain();
        args.arg1 = host;
        args.arg2 = host.callbacks;
        mCallbackHandler.obtainMessage(CallbackHandler.MSG_NOTIFY_PROVIDERS_CHANGED, args).sendToTarget();
    }
}
Also used : SomeArgs(com.android.internal.os.SomeArgs) IAppWidgetHost(com.android.internal.appwidget.IAppWidgetHost) Point(android.graphics.Point)

Example 9 with SomeArgs

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

the class AppWidgetServiceImpl method scheduleNotifyUpdateAppWidgetLocked.

private void scheduleNotifyUpdateAppWidgetLocked(Widget widget, RemoteViews updateViews) {
    long requestTime = SystemClock.uptimeMillis();
    if (widget != null) {
        widget.updateTimes.put(ID_VIEWS_UPDATE, requestTime);
    }
    if (widget == null || widget.provider == null || widget.provider.zombie || widget.host.callbacks == null || widget.host.zombie) {
        return;
    }
    SomeArgs args = SomeArgs.obtain();
    args.arg1 = widget.host;
    args.arg2 = widget.host.callbacks;
    args.arg3 = (updateViews != null) ? updateViews.clone() : null;
    args.arg4 = requestTime;
    args.argi1 = widget.appWidgetId;
    mCallbackHandler.obtainMessage(CallbackHandler.MSG_NOTIFY_UPDATE_APP_WIDGET, args).sendToTarget();
}
Also used : SomeArgs(com.android.internal.os.SomeArgs)

Example 10 with SomeArgs

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

the class MotionEventInjector method injectEvents.

/**
     * Schedule a series of events for injection. These events must comprise a complete, valid
     * sequence. All gestures currently in progress will be cancelled, and all {@code downTime}
     * and {@code eventTime} fields will be offset by the current time.
     *
     * @param events The events to inject. Must all be from the same source.
     * @param serviceInterface The interface to call back with a result when the gesture is
     * either complete or cancelled.
     */
public void injectEvents(List<MotionEvent> events, IAccessibilityServiceClient serviceInterface, int sequence) {
    SomeArgs args = SomeArgs.obtain();
    args.arg1 = events;
    args.arg2 = serviceInterface;
    args.argi1 = sequence;
    mHandler.sendMessage(mHandler.obtainMessage(MESSAGE_INJECT_EVENTS, args));
}
Also used : 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