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();
}
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();
}
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();
}
}
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();
}
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));
}
Aggregations