Java Code Examples for com.android.internal.os.SomeArgs#obtain()
The following examples show how to use
com.android.internal.os.SomeArgs#obtain() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AccessibilityController.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
public void onRectangleOnScreenRequestedLocked(Rect rectangle) { 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(); }
Example 2
Source File: AccessibilityInteractionController.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
public void findAccessibilityNodeInfoByAccessibilityIdClientThread( long accessibilityNodeId, Region interactiveRegion, int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid, long interrogatingTid, MagnificationSpec spec, Bundle arguments) { final Message message = mHandler.obtainMessage(); message.what = PrivateHandler.MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID; message.arg1 = flags; final SomeArgs args = SomeArgs.obtain(); args.argi1 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId); args.argi2 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId); args.argi3 = interactionId; args.arg1 = callback; args.arg2 = spec; args.arg3 = interactiveRegion; args.arg4 = arguments; message.obj = args; scheduleMessage(message, interrogatingPid, interrogatingTid, CONSIDER_REQUEST_PREPARERS); }
Example 3
Source File: NotificationAssistantService.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
@Override public void onNotificationSnoozedUntilContext( IStatusBarNotificationHolder sbnHolder, String snoozeCriterionId) throws RemoteException { StatusBarNotification sbn; try { sbn = sbnHolder.get(); } catch (RemoteException e) { Log.w(TAG, "onNotificationSnoozed: Error receiving StatusBarNotification", e); return; } SomeArgs args = SomeArgs.obtain(); args.arg1 = sbn; args.arg2 = snoozeCriterionId; mHandler.obtainMessage(MyHandler.MSG_ON_NOTIFICATION_SNOOZED, args).sendToTarget(); }
Example 4
Source File: AccessibilityInteractionController.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
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; scheduleMessage(message, interrogatingPid, interrogatingTid, CONSIDER_REQUEST_PREPARERS); }
Example 5
Source File: StorageManager.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
@Override public void onStorageStateChanged(String path, String oldState, String newState) { final SomeArgs args = SomeArgs.obtain(); args.arg1 = path; args.arg2 = oldState; args.arg3 = newState; mHandler.obtainMessage(MSG_STORAGE_STATE_CHANGED, args).sendToTarget(); }
Example 6
Source File: StorageManagerService.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
private void notifyVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { final SomeArgs args = SomeArgs.obtain(); args.arg1 = vol.clone(); args.argi2 = oldState; args.argi3 = newState; obtainMessage(MSG_VOLUME_STATE_CHANGED, args).sendToTarget(); }
Example 7
Source File: StorageManagerService.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
private void notifyStorageStateChanged(String path, String oldState, String newState) { final SomeArgs args = SomeArgs.obtain(); args.arg1 = path; args.arg2 = oldState; args.arg3 = newState; obtainMessage(MSG_STORAGE_STATE_CHANGED, args).sendToTarget(); }
Example 8
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 5 votes |
@Override public void onCreated(int moveId, Bundle extras) { final SomeArgs args = SomeArgs.obtain(); args.argi1 = moveId; args.arg2 = extras; mHandler.obtainMessage(MSG_CREATED, args).sendToTarget(); }
Example 9
Source File: ApplicationPackageManager.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
@Override public void onCreated(int moveId, Bundle extras) { final SomeArgs args = SomeArgs.obtain(); args.argi1 = moveId; args.arg2 = extras; mHandler.obtainMessage(MSG_CREATED, args).sendToTarget(); }
Example 10
Source File: InputManager.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
public void sendTabletModeChanged(long whenNanos, boolean inTabletMode) { SomeArgs args = SomeArgs.obtain(); args.argi1 = (int) (whenNanos & 0xFFFFFFFF); args.argi2 = (int) (whenNanos >> 32); args.arg1 = (Boolean) inTabletMode; obtainMessage(MSG_TABLET_MODE_CHANGED, args).sendToTarget(); }
Example 11
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 5 votes |
@Override public void onStatusChanged(int moveId, int status, long estMillis) { final SomeArgs args = SomeArgs.obtain(); args.argi1 = moveId; args.argi2 = status; args.arg3 = estMillis; mHandler.obtainMessage(MSG_STATUS_CHANGED, args).sendToTarget(); }
Example 12
Source File: NotificationAssistantService.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
@Override public void onNotificationEnqueued(IStatusBarNotificationHolder sbnHolder) { StatusBarNotification sbn; try { sbn = sbnHolder.get(); } catch (RemoteException e) { Log.w(TAG, "onNotificationEnqueued: Error receiving StatusBarNotification", e); return; } SomeArgs args = SomeArgs.obtain(); args.arg1 = sbn; mHandler.obtainMessage(MyHandler.MSG_ON_NOTIFICATION_ENQUEUED, args).sendToTarget(); }
Example 13
Source File: InstantAppRegistry.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
private void addPendingPersistCookieLPw(@UserIdInt int userId, @NonNull PackageParser.Package pkg, @NonNull byte[] cookie, @NonNull File cookieFile) { ArrayMap<PackageParser.Package, SomeArgs> pendingWorkForUser = mPendingPersistCookies.get(userId); if (pendingWorkForUser == null) { pendingWorkForUser = new ArrayMap<>(); mPendingPersistCookies.put(userId, pendingWorkForUser); } SomeArgs args = SomeArgs.obtain(); args.arg1 = cookie; args.arg2 = cookieFile; pendingWorkForUser.put(pkg, args); }
Example 14
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 5 votes |
@Override public void onStatusChanged(int moveId, int status, long estMillis) { final SomeArgs args = SomeArgs.obtain(); args.argi1 = moveId; args.argi2 = status; args.arg3 = estMillis; mHandler.obtainMessage(MSG_STATUS_CHANGED, args).sendToTarget(); }
Example 15
Source File: AccessibilityService.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
public void onMagnificationChanged(@NonNull Region region, float scale, float centerX, float centerY) { final SomeArgs args = SomeArgs.obtain(); args.arg1 = region; args.arg2 = scale; args.arg3 = centerX; args.arg4 = centerY; final Message message = mCaller.obtainMessageO(DO_ON_MAGNIFICATION_CHANGED, args); mCaller.sendMessage(message); }
Example 16
Source File: TvInputManagerService.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
@Override public void tune(IBinder sessionToken, final Uri channelUri, Bundle params, int userId) { final int callingUid = Binder.getCallingUid(); final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid, userId, "tune"); final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { try { getSessionLocked(sessionToken, callingUid, resolvedUserId).tune( channelUri, params); if (TvContract.isChannelUriForPassthroughInput(channelUri)) { // Do not log the watch history for passthrough inputs. return; } UserState userState = getOrCreateUserStateLocked(resolvedUserId); SessionState sessionState = userState.sessionStateMap.get(sessionToken); if (sessionState.isRecordingSession) { return; } // Log the start of watch. SomeArgs args = SomeArgs.obtain(); args.arg1 = sessionState.componentName.getPackageName(); args.arg2 = System.currentTimeMillis(); args.arg3 = ContentUris.parseId(channelUri); args.arg4 = params; args.arg5 = sessionToken; mWatchLogHandler.obtainMessage(WatchLogHandler.MSG_LOG_WATCH_START, args) .sendToTarget(); } catch (RemoteException | SessionNotFoundException e) { Slog.e(TAG, "error in tune", e); } } } finally { Binder.restoreCallingIdentity(identity); } }
Example 17
Source File: StorageManager.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
@Override public void onDiskDestroyed(DiskInfo disk) throws RemoteException { final SomeArgs args = SomeArgs.obtain(); args.arg1 = disk; mHandler.obtainMessage(MSG_DISK_DESTROYED, args).sendToTarget(); }
Example 18
Source File: StorageManager.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
@Override public void onVolumeForgotten(String fsUuid) { final SomeArgs args = SomeArgs.obtain(); args.arg1 = fsUuid; mHandler.obtainMessage(MSG_VOLUME_FORGOTTEN, args).sendToTarget(); }
Example 19
Source File: StorageManagerService.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
private void notifyDiskDestroyed(DiskInfo disk) { final SomeArgs args = SomeArgs.obtain(); args.arg1 = disk.clone(); obtainMessage(MSG_DISK_DESTROYED, args).sendToTarget(); }
Example 20
Source File: StorageManagerService.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
private void notifyVolumeForgotten(String fsUuid) { final SomeArgs args = SomeArgs.obtain(); args.arg1 = fsUuid; obtainMessage(MSG_VOLUME_FORGOTTEN, args).sendToTarget(); }