use of com.android.internal.os.SomeArgs in project android_frameworks_base by DirtyUnicorns.
the class RuntimePermissionPresenter method getAppsUsingPermissions.
/**
* Gets the system apps that use runtime permissions. System apps are ones
* that are considered system for presentation purposes instead of ones
* that are preinstalled on the system image. System apps are ones that
* are on the system image, haven't been updated (a.k.a factory apps)
* that do not have a launcher icon.
*
* @param system If true only system apps are returned otherwise only
* non-system ones are returned.
* @param callback Callback to receive the result.
* @param handler Handler on which to invoke the callback.
*/
public void getAppsUsingPermissions(boolean system, @NonNull OnResultCallback callback, @Nullable Handler handler) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = callback;
args.arg2 = handler;
args.argi1 = system ? 1 : 0;
Message message = mRemoteService.obtainMessage(RemoteService.MSG_GET_APPS_USING_PERMISSIONS, args);
mRemoteService.processMessage(message);
}
use of com.android.internal.os.SomeArgs in project android_frameworks_base by DirtyUnicorns.
the class ViewRootImpl method dispatchInputEvent.
public void dispatchInputEvent(InputEvent event, InputEventReceiver receiver) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = event;
args.arg2 = receiver;
Message msg = mHandler.obtainMessage(MSG_DISPATCH_INPUT_EVENT, args);
msg.setAsynchronous(true);
mHandler.sendMessage(msg);
}
use of com.android.internal.os.SomeArgs in project android_frameworks_base by DirtyUnicorns.
the class PrintPreviewController method onContentUpdated.
public void onContentUpdated(boolean documentChanged, int documentPageCount, PageRange[] writtenPages, PageRange[] selectedPages, MediaSize mediaSize, Margins minMargins) {
boolean contentChanged = false;
if (documentChanged) {
contentChanged = true;
}
if (documentPageCount != mDocumentPageCount) {
mDocumentPageCount = documentPageCount;
contentChanged = true;
}
if (contentChanged) {
// If not closed, close as we start over.
if (mPageAdapter.isOpened()) {
Message operation = mHandler.obtainMessage(MyHandler.MSG_CLOSE);
mHandler.enqueueOperation(operation);
}
}
// all rendered pages and reopen the file...
if ((contentChanged || !mPageAdapter.isOpened()) && writtenPages != null) {
Message operation = mHandler.obtainMessage(MyHandler.MSG_OPEN);
mHandler.enqueueOperation(operation);
}
// Update the attributes before after closed to avoid flicker.
SomeArgs args = SomeArgs.obtain();
args.arg1 = writtenPages;
args.arg2 = selectedPages;
args.arg3 = mediaSize;
args.arg4 = minMargins;
args.argi1 = documentPageCount;
Message operation = mHandler.obtainMessage(MyHandler.MSG_UPDATE, args);
mHandler.enqueueOperation(operation);
// If document changed and has pages we want to start preloading.
if (contentChanged && writtenPages != null) {
operation = mHandler.obtainMessage(MyHandler.MSG_START_PRELOAD);
mHandler.enqueueOperation(operation);
}
}
use of com.android.internal.os.SomeArgs in project android_frameworks_base by DirtyUnicorns.
the class AccessibilityInteractionController method findAccessibilityNodeInfosByViewIdClientThread.
public void findAccessibilityNodeInfosByViewIdClientThread(long accessibilityNodeId, String viewId, Region interactiveRegion, int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
Message message = mHandler.obtainMessage();
message.what = PrivateHandler.MSG_FIND_ACCESSIBILITY_NODE_INFOS_BY_VIEW_ID;
message.arg1 = flags;
message.arg2 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
SomeArgs args = SomeArgs.obtain();
args.argi1 = interactionId;
args.arg1 = callback;
args.arg2 = spec;
args.arg3 = viewId;
args.arg4 = interactiveRegion;
message.obj = args;
// client can handle the message to generate the result.
if (interrogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
AccessibilityInteractionClient.getInstanceForThread(interrogatingTid).setSameThreadMessage(message);
} else {
mHandler.sendMessage(message);
}
}
use of com.android.internal.os.SomeArgs in project android_frameworks_base by DirtyUnicorns.
the class AccessibilityInteractionController method findFocusClientThread.
public void findFocusClientThread(long accessibilityNodeId, int focusType, Region interactiveRegion, int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid, long interrogatingTid, MagnificationSpec spec) {
Message message = mHandler.obtainMessage();
message.what = PrivateHandler.MSG_FIND_FOCUS;
message.arg1 = flags;
message.arg2 = focusType;
SomeArgs args = SomeArgs.obtain();
args.argi1 = interactionId;
args.argi2 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
args.argi3 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId);
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);
}
}
Aggregations