/development/samples/browseable/MidiScope/src/com.example.android.common.midi/ |
D | EventScheduler.java | 55 FastEventQueue(SchedulableEvent event) { in FastEventQueue() argument 56 mFirst = event; in FastEventQueue() 74 SchedulableEvent event = mFirst; in remove() local 75 mFirst = event.mNext; in remove() 76 return event; in remove() 82 public void add(SchedulableEvent event) { in add() argument 83 event.mNext = null; in add() 84 mLast.mNext = event; in add() 85 mLast = event; in add() 126 SchedulableEvent event = null; in removeEventfromPool() local [all …]
|
D | MidiEventScheduler.java | 42 MidiEvent event = createScheduledEvent(msg, offset, count, timestamp); in onSend() local 43 if (event != null) { in onSend() 44 add(event); in onSend() 80 MidiEvent event; in createScheduledEvent() local 82 event = new MidiEvent(msg, offset, count, timestamp); in createScheduledEvent() 84 event = (MidiEvent) removeEventfromPool(); in createScheduledEvent() 85 if (event == null) { in createScheduledEvent() 86 event = new MidiEvent(POOL_EVENT_SIZE); in createScheduledEvent() 88 System.arraycopy(msg, offset, event.data, 0, count); in createScheduledEvent() 89 event.count = count; in createScheduledEvent() [all …]
|
D | MidiEventThread.java | 37 MidiEvent event = (MidiEvent) waitNextEvent(); in run() local 39 Log.i(TAG, "Fire event " + event.data[0] + " at " in run() 40 + event.getTimestamp()); in run() 41 mDispatcher.send(event.data, 0, in run() 42 event.count, event.getTimestamp()); in run() 47 addEventToPool(event); in run()
|
/development/samples/browseable/MidiSynth/src/com.example.android.common.midi/ |
D | EventScheduler.java | 55 FastEventQueue(SchedulableEvent event) { in FastEventQueue() argument 56 mFirst = event; in FastEventQueue() 74 SchedulableEvent event = mFirst; in remove() local 75 mFirst = event.mNext; in remove() 76 return event; in remove() 82 public void add(SchedulableEvent event) { in add() argument 83 event.mNext = null; in add() 84 mLast.mNext = event; in add() 85 mLast = event; in add() 126 SchedulableEvent event = null; in removeEventfromPool() local [all …]
|
D | MidiEventScheduler.java | 42 MidiEvent event = createScheduledEvent(msg, offset, count, timestamp); in onSend() local 43 if (event != null) { in onSend() 44 add(event); in onSend() 80 MidiEvent event; in createScheduledEvent() local 82 event = new MidiEvent(msg, offset, count, timestamp); in createScheduledEvent() 84 event = (MidiEvent) removeEventfromPool(); in createScheduledEvent() 85 if (event == null) { in createScheduledEvent() 86 event = new MidiEvent(POOL_EVENT_SIZE); in createScheduledEvent() 88 System.arraycopy(msg, offset, event.data, 0, count); in createScheduledEvent() 89 event.count = count; in createScheduledEvent() [all …]
|
D | MidiEventThread.java | 37 MidiEvent event = (MidiEvent) waitNextEvent(); in run() local 39 Log.i(TAG, "Fire event " + event.data[0] + " at " in run() 40 + event.getTimestamp()); in run() 41 mDispatcher.send(event.data, 0, in run() 42 event.count, event.getTimestamp()); in run() 47 addEventToPool(event); in run()
|
/development/samples/browseable/DragAndDropAcrossApps/DropTarget/src/com.example.android/droptarget/ |
D | ImageDragListener.java | 34 public boolean onDrag(View view, DragEvent event) { in onDrag() argument 35 switch (event.getAction()) { in onDrag() 45 processLocation(event.getX(), event.getY()); in onDrag() 53 return processDrop(view, event); in onDrag() 70 private boolean processDrop(View view, DragEvent event) { in processDrop() argument 71 ClipData clipData = event.getClipData(); in processDrop() 83 return setImageUri(view, event, uri); in processDrop() 89 protected boolean setImageUri(View view, DragEvent event, Uri uri) { in setImageUri() argument
|
D | DropTargetFragment.java | 107 protected boolean setImageUri(View view, DragEvent event, Uri uri) { in setImageUri() argument 109 Log.d(TAG, "ClipDescription extra: " + getExtra(event)); in setImageUri() 117 .requestDragAndDropPermissions(getActivity(), event); in setImageUri() 126 final boolean result = super.setImageUri(view, event, uri); in setImageUri() 144 return super.setImageUri(view, event, uri); in setImageUri() 149 public boolean onDrag(View view, DragEvent event) { in onDrag() argument 153 ClipDescription clipDescription = event.getClipDescription(); in onDrag() 158 return super.onDrag(view, event); in onDrag() 167 private String getExtra(DragEvent event) { in getExtra() argument 169 ClipDescription clipDescription = event.getClipDescription(); in getExtra()
|
/development/samples/browseable/DragAndDropAcrossApps/DragSource/src/com.example.android/dragsource/ |
D | ImageDragListener.java | 40 public boolean onDrag(View view, DragEvent event) { in onDrag() argument 43 switch (event.getAction()) { in onDrag() 53 processLocation(event.getX(), event.getY()); in onDrag() 61 return processDrop(view, event); in onDrag() 78 private boolean processDrop(View view, DragEvent event) { in processDrop() argument 79 ClipData clipData = event.getClipData(); in processDrop() 91 return setImageUri(view, event, uri); in processDrop() 97 protected boolean setImageUri(View view, DragEvent event, Uri uri) { in setImageUri() argument
|
/development/samples/browseable/BatchStepSensor/src/com.example.android.batchstepsensor/cardstream/ |
D | CardLayout.java | 61 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 62 switch(event.getAction()){ in onTouchEvent() 68 return super.onTouchEvent(event); in onTouchEvent() 72 public boolean onInterceptTouchEvent(MotionEvent event) { in onInterceptTouchEvent() argument 74 switch(event.getAction()){ in onInterceptTouchEvent() 77 mSwiping = Math.abs(mDownX - event.getX()) > mTouchSlop; in onInterceptTouchEvent() 81 mDownX = event.getX(); in onInterceptTouchEvent() 82 mDownY = event.getY(); in onInterceptTouchEvent()
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
D | TouchPaint.java | 339 public boolean onTrackballEvent(MotionEvent event) { in onTrackballEvent() argument 340 final int action = event.getActionMasked(); in onTrackballEvent() 347 final int N = event.getHistorySize(); in onTrackballEvent() 348 final float scaleX = event.getXPrecision() * TRACKBALL_SCALE; in onTrackballEvent() 349 final float scaleY = event.getYPrecision() * TRACKBALL_SCALE; in onTrackballEvent() 351 moveTrackball(event.getHistoricalX(i) * scaleX, in onTrackballEvent() 352 event.getHistoricalY(i) * scaleY); in onTrackballEvent() 354 moveTrackball(event.getX() * scaleX, event.getY() * scaleY); in onTrackballEvent() 369 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 370 return onTouchOrHoverEvent(event, true /*isTouch*/); in onTouchEvent() [all …]
|
D | ShadowCardDrag.java | 212 public boolean onTouch(View v, MotionEvent event) { in onCreate() 213 switch (event.getAction()) { in onCreate() 215 downX = event.getX() - mCard.getTranslationX(); in onCreate() 216 downY = event.getY() - mCard.getTranslationY(); in onCreate() 217 downTime = event.getDownTime(); in onCreate() 224 mDragState.onDown(event.getDownTime(), event.getX(), event.getY()); in onCreate() 228 mCard.setTranslationX(event.getX() - downX); in onCreate() 229 mCard.setTranslationY(event.getY() - downY); in onCreate() 231 mDragState.onMove(event.getEventTime(), event.getX(), event.getY()); in onCreate()
|
/development/samples/browseable/BasicMultitouch/src/com.example.android.basicmultitouch/ |
D | TouchDisplayView.java | 133 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 135 final int action = event.getAction(); in onTouchEvent() 152 int id = event.getPointerId(0); in onTouchEvent() 154 TouchHistory data = TouchHistory.obtain(event.getX(0), event.getY(0), in onTouchEvent() 155 event.getPressure(0)); in onTouchEvent() 181 int index = event.getActionIndex(); in onTouchEvent() 182 int id = event.getPointerId(index); in onTouchEvent() 184 TouchHistory data = TouchHistory.obtain(event.getX(index), event.getY(index), in onTouchEvent() 185 event.getPressure(index)); in onTouchEvent() 210 int id = event.getPointerId(0); in onTouchEvent() [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/view/ |
D | Hover.java | 77 public boolean onHover(View v, MotionEvent event) { in onCreate() 78 switch (event.getAction()) { in onCreate() 82 event.getX(), event.getY())); in onCreate() 87 event.getX(), event.getY())); in onCreate() 92 event.getX(), event.getY())); in onCreate()
|
D | HoverInterceptorView.java | 48 public boolean onInterceptHoverEvent(MotionEvent event) { in onInterceptHoverEvent() argument 52 return super.onInterceptHoverEvent(event); in onInterceptHoverEvent() 56 public boolean onHoverEvent(MotionEvent event) { in onHoverEvent() argument 58 if (mInterceptHover && event.getAction() != MotionEvent.ACTION_HOVER_EXIT) { in onHoverEvent() 65 return super.onHoverEvent(event); in onHoverEvent()
|
D | GameView.java | 118 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 123 if (event.getRepeatCount() == 0) { in onKeyDown() 154 step(event.getEventTime()); in onKeyDown() 157 return super.onKeyDown(keyCode, event); in onKeyDown() 161 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 194 step(event.getEventTime()); in onKeyUp() 197 return super.onKeyUp(keyCode, event); in onKeyUp() 207 public boolean onGenericMotionEvent(MotionEvent event) { in onGenericMotionEvent() argument 212 if (event.isFromSource(InputDevice.SOURCE_CLASS_JOYSTICK) in onGenericMotionEvent() 213 && event.getAction() == MotionEvent.ACTION_MOVE) { in onGenericMotionEvent() [all …]
|
D | GameControllerInput.java | 121 public boolean dispatchKeyEvent(KeyEvent event) { in dispatchKeyEvent() argument 123 InputDeviceState state = getInputDeviceState(event.getDeviceId()); in dispatchKeyEvent() 125 switch (event.getAction()) { in dispatchKeyEvent() 127 if (state.onKeyDown(event)) { in dispatchKeyEvent() 132 if (state.onKeyUp(event)) { in dispatchKeyEvent() 138 return super.dispatchKeyEvent(event); in dispatchKeyEvent() 142 public boolean dispatchGenericMotionEvent(MotionEvent event) { in dispatchGenericMotionEvent() argument 145 if (event.isFromSource(InputDevice.SOURCE_CLASS_JOYSTICK) in dispatchGenericMotionEvent() 146 && event.getAction() == MotionEvent.ACTION_MOVE) { in dispatchGenericMotionEvent() 148 InputDeviceState state = getInputDeviceState(event.getDeviceId()); in dispatchGenericMotionEvent() [all …]
|
D | DraggableDot.java | 186 public boolean onDragEvent(DragEvent event) { in onDragEvent() argument 188 switch (event.getAction()) { in onDragEvent() 191 Log.i(TAG, "Drag started, event=" + event); in onDragEvent() 217 Log.i(TAG, "Got a drop! dot=" + this + " event=" + event); in onDragEvent() 221 processDrop(event); in onDragEvent() 238 Log.i(TAG, "other drag event: " + event); in onDragEvent() 246 private void processDrop(DragEvent event) { in processDrop() argument 247 final ClipData data = event.getClipData(); in processDrop() 254 if (event.getLocalState() == (Object) this) { in processDrop()
|
/development/cmds/monkey/src/com/android/commands/monkey/ |
D | MonkeyPowerEvent.java | 87 ContentValues event = new ContentValues(); in bufferLogEvent() local 88 event.put("date", tagTime); in bufferLogEvent() 89 event.put("tag", tag); in bufferLogEvent() 92 event.put("value", value); in bufferLogEvent() 94 mLogEvents.add(event); in bufferLogEvent() 109 ContentValues event = events[i]; in writeLogEvents() local 110 buffer.append(MonkeyUtils.toCalendarTime(event.getAsLong("date"))); in writeLogEvents() 111 buffer.append(event.getAsString("tag")); in writeLogEvents() 112 if (event.containsKey("value")) { in writeLogEvents() 113 String value = event.getAsString("value"); in writeLogEvents()
|
/development/samples/ApiDemos/src/com/example/android/apis/accessibility/ |
D | CustomViewAccessibilityActivity.java | 81 public void onInitializeAccessibilityEvent(AccessibilityEvent event) { in onInitializeAccessibilityEvent() argument 82 super.onInitializeAccessibilityEvent(event); in onInitializeAccessibilityEvent() 86 event.setChecked(isChecked()); in onInitializeAccessibilityEvent() 105 public void onPopulateAccessibilityEvent(AccessibilityEvent event) { in onPopulateAccessibilityEvent() argument 106 super.onPopulateAccessibilityEvent(event); in onPopulateAccessibilityEvent() 112 event.getText().add(text); in onPopulateAccessibilityEvent() 148 public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) { in tryInstallAccessibilityDelegate() 149 super.onInitializeAccessibilityEvent(host, event); in tryInstallAccessibilityDelegate() 153 event.setChecked(isChecked()); in tryInstallAccessibilityDelegate() 173 public void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) { in tryInstallAccessibilityDelegate() [all …]
|
D | MagnificationService.java | 47 public void onAccessibilityEvent(AccessibilityEvent event) { in onAccessibilityEvent() argument 82 protected boolean onKeyEvent(KeyEvent event) { in onKeyEvent() argument 84 final int keyCode = event.getKeyCode(); in onKeyEvent() 94 final int action = event.getAction(); in onKeyEvent()
|
/development/samples/ControllerSample/src/com/example/controllersample/ |
D | GameView.java | 128 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 129 int deviceId = event.getDeviceId(); in onKeyDown() 132 if (currentShip.onKeyDown(keyCode, event)) { in onKeyDown() 133 step(event.getEventTime()); in onKeyDown() 138 return super.onKeyDown(keyCode, event); in onKeyDown() 142 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 143 int deviceId = event.getDeviceId(); in onKeyUp() 146 if (currentShip.onKeyUp(keyCode, event)) { in onKeyUp() 147 step(event.getEventTime()); in onKeyUp() 152 return super.onKeyUp(keyCode, event); in onKeyUp() [all …]
|
/development/samples/MultiClientInputMethod/src/com/example/android/multiclientinputmethod/ |
D | ClientCallbackImpl.java | 217 public boolean onGenericMotionEvent(MotionEvent event) { in onGenericMotionEvent() argument 222 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 225 + " event=" + event); in onKeyDown() 231 event.startTracking(); in onKeyDown() 239 public boolean onKeyLongPress(int keyCode, KeyEvent event) { in onKeyLongPress() argument 244 public boolean onKeyMultiple(int keyCode, KeyEvent event) { in onKeyMultiple() argument 249 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 252 + " event=" + event); in onKeyUp() 254 if (keyCode == KeyEvent.KEYCODE_BACK && event.isTracking() && !event.isCanceled()) { in onKeyUp() 266 public boolean onTrackballEvent(MotionEvent event) { in onTrackballEvent() argument
|
/development/samples/browseable/BasicAccessibility/src/com.example.android.basicaccessibility/ |
D | DialView.java | 137 public void onPopulateAccessibilityEvent(AccessibilityEvent event) { in onPopulateAccessibilityEvent() argument 138 super.onPopulateAccessibilityEvent(event); in onPopulateAccessibilityEvent() 141 int eventType = event.getEventType(); in onPopulateAccessibilityEvent() 150 event.getText().add("Mode selected: " + Integer.toString(mActiveSelection + 1) + "."); in onPopulateAccessibilityEvent() 151 event.setItemCount(SELECTION_COUNT); in onPopulateAccessibilityEvent() 152 event.setCurrentItemIndex(mActiveSelection); in onPopulateAccessibilityEvent() 158 event.getText().add("Tap to change."); in onPopulateAccessibilityEvent()
|
/development/samples/browseable/FindMyPhone/Application/src/com.example.android.wearable.findphone/ |
D | SoundAlarmListenerService.java | 70 for (DataEvent event : dataEvents) { in onDataChanged() 71 if (event.getType() == DataEvent.TYPE_DELETED) { in onDataChanged() 72 Log.i(TAG, event + " deleted"); in onDataChanged() 73 } else if (event.getType() == DataEvent.TYPE_CHANGED) { in onDataChanged() 75 DataMap.fromByteArray(event.getDataItem().getData()).get(FIELD_ALARM_ON); in onDataChanged()
|