/developers/samples/android/connectivity/nfc/CardEmulation/Application/tests/src/com/example/android/cardemulation/tests/ |
D | SampleTests.java | 78 for (int i = 0; i < testData.length; i++) { in testHexToBinary() 79 assertEquals(testData[i], output[i]); in testHexToBinary() 105 for (int i = 0; i < expectedResponse.length; i++) { in testRequestAccoutNumber() 106 assertEquals(expectedResponse[i], output[i]); in testRequestAccoutNumber() 124 for (int i = 0; i < expectedResponse.length; i++) { in testInvalidCommand() 125 assertEquals(expectedResponse[i], output[i]); in testInvalidCommand() 141 for (int i = 0; i < expected.length; i++) { in testArrayConcat() 142 assertEquals(expected[i], result[i]); in testArrayConcat() 165 for (int i = 0; i < expectedResult.length; i++) { in testBuildSelectApdu() 166 assertEquals(expectedResult[i], result[i]); in testBuildSelectApdu()
|
/developers/build/ |
D | github.sh | 144 for i in ${allSamples[@]}; 147 URL=https://github.com/googlesamples/android-$i 151 toUpload+=("$i") 153 toUpdate+=("$i") 155 problemSamples+=("$i") 178 for i in ${toUpdate[@]}; 180 URL=https://github.com/googlesamples/android-$i 182 if [ -d "android-$i" ]; then 183 diffResult=$(diff -r --exclude '*.git' ../prebuilts/gradle/$i/ ./android-$i/) 188 needsUpdate+=("$i") [all …]
|
/developers/samples/android/deprecated/wearable/wear/ElizaChat/Application/src/main/java/com/example/android/wearable/elizachat/ |
D | ElizaResponder.java | 106 for (int i = 0; i < CONVERSATION_TO_RESPONSES_MAP.length / 2; i++) { in ElizaResponder() 107 responseStarts[i] = CONVERSATION_TO_RESPONSES_MAP[2 * i]; in ElizaResponder() 108 responseCurrentIndices[i] = CONVERSATION_TO_RESPONSES_MAP[2 * i]; in ElizaResponder() 109 responseEnds[i] = responseStarts[i] + CONVERSATION_TO_RESPONSES_MAP[2 * i + 1]; in ElizaResponder() 141 for (int i = 0; i < WORDS_TO_REPLACE.length / 2; i++) { in elzTalk() 142 String first = WORDS_TO_REPLACE[i * 2]; in elzTalk() 143 String second = WORDS_TO_REPLACE[i * 2 + 1]; in elzTalk()
|
/developers/samples/android/connectivity/nfc/CardReader/Application/tests/src/com/example/android/cardreader/tests/ |
D | SampleTests.java | 85 for (int i = 0; i < expectedResult.length; i++) { in testBuildSelectApdu() 86 assertEquals(expectedResult[i], result[i]); in testBuildSelectApdu() 96 for (int i = 0; i < testData.length; i++) { in testHexToBinary() 97 assertEquals(testData[i], output[i]); in testHexToBinary()
|
/developers/samples/android/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/watchface/ |
D | OpenGLWatchFaceService.java | 199 for (int i = 0; i < mModelMatrices.length; ++i) { in onGlContextCreated() 200 Matrix.setRotateM(mModelMatrices[i], 0, i, 0, 0, 1); in onGlContextCreated() 204 for (int i = 0; i < mNumCameraAngles; ++i) { in onGlContextCreated() 207 final float cameraAngle = (float) (((float) i) / mNumCameraAngles * 2 * Math.PI); in onGlContextCreated() 210 Matrix.setLookAtM(mViewMatrices[i], in onGlContextCreated() 243 for (int i = 0; i < mNumCameraAngles; ++i) { in onGlSurfaceCreated() 244 Matrix.multiplyMM(mVpMatrices[i], 0, mProjectionMatrix, 0, mViewMatrices[i], 0); in onGlSurfaceCreated() 279 for (int i = 0; i < 4; i++) { in createMajorTicks() 280 float[] triangleCoords = getMajorTickTriangleCoords(i); in createMajorTicks() 281 System.arraycopy(triangleCoords, 0, trianglesCoords, i * 9, triangleCoords.length); in createMajorTicks() [all …]
|
/developers/samples/android/common/src/java/com/example/android/common/midi/ |
D | MidiPortSelector.java | 107 for (int i = 0; i < portCount; ++i) { in onDeviceAdded() 108 MidiPortWrapper wrapper = new MidiPortWrapper(info, mType, i); in onDeviceAdded() 110 Log.i(MidiConstants.TAG, wrapper + " was added"); in onDeviceAdded() 118 for (int i = 0; i < portCount; ++i) { in onDeviceRemoved() 119 MidiPortWrapper wrapper = new MidiPortWrapper(info, mType, i); in onDeviceRemoved() 127 Log.i(MidiConstants.TAG, wrapper + " was removed"); in onDeviceRemoved() 137 Log.i(MidiConstants.TAG, "MidiPortSelector.onDeviceStatusChanged status = " + status in onDeviceStatusChanged() 143 for (int i = 0; i < portCount; ++i) { in onDeviceStatusChanged() 144 MidiPortWrapper wrapper = new MidiPortWrapper(info, mType, i); in onDeviceStatusChanged() 146 if (status.isInputPortOpen(i)) { // busy? in onDeviceStatusChanged()
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/ |
D | ClientParser.java | 52 for (int i = 0; i < nodes; i++) { in parse() 53 AssistStructure.ViewNode viewNode = structure.getWindowNodeAt(i).getRootViewNode(); in parse() 63 for (int i = 0; i < childrenSize; i++) { in traverseRoot() 64 traverseRoot(viewNode.getChildAt(i), processor); in traverseRoot()
|
D | AutofillHints.java | 105 for (int i = 0; i < hints.size(); i++) { in removePrefixes() 106 String hint = hints.get(i); in removePrefixes() 107 if (i < hints.size() - 1) { in removePrefixes() 108 nextHint = hints.get(i + 1); in removePrefixes() 111 if (isW3cSectionPrefix(hint) && i < hints.size() - 1) { in removePrefixes() 112 i++; in removePrefixes() 113 hint = hints.get(i); in removePrefixes() 115 if (i < hints.size() - 1) { in removePrefixes() 116 nextHint = hints.get(i + 1); in removePrefixes() 121 i++; in removePrefixes() [all …]
|
/developers/samples/android/deprecated/wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/ |
D | BackgroundPickers.java | 61 for (int i = 0; i < count; i++) { in generatePickers() 64 label.setText(String.format(res.getString(R.string.bg_picker_label), i+1)); in generatePickers() local 100 for (int i = 0; i < mPickers.size(); i++) { in getRes() 101 res[i] = getRes(i); in getRes() 126 for (int i = 0; i < pickerBox.getChildCount(); i++) { in onClick() 127 ImageView childView = (ImageView) pickerBox.getChildAt(i); in onClick()
|
/developers/samples/android/sensors/AccelerometerPlay/app/src/main/java/com/example/android/accelerometerplay/ |
D | AccelerometerPlayActivity.java | 219 for (int i = 0; i < mBalls.length; i++) { in ParticleSystem() 220 mBalls[i] = new Particle(getContext()); in ParticleSystem() 221 mBalls[i].setBackgroundResource(R.drawable.ball); in ParticleSystem() 222 mBalls[i].setLayerType(LAYER_TYPE_HARDWARE, null); in ParticleSystem() 223 addView(mBalls[i], new ViewGroup.LayoutParams(mDstWidth, mDstHeight)); in ParticleSystem() 236 for (int i = 0; i < count; i++) { in updatePositions() 237 Particle ball = mBalls[i]; in updatePositions() 266 for (int i = 0; i < count; i++) { in update() 267 Particle curr = mBalls[i]; in update() 268 for (int j = i + 1; j < count; j++) { in update() [all …]
|
/developers/samples/android/connectivity/nfc/CardReader/Application/src/main/java/com/example/android/cardreader/ |
D | LoyaltyCardReader.java | 64 Log.i(TAG, "New tag discovered"); in onTagDiscovered() 77 Log.i(TAG, "Requesting remote AID: " + SAMPLE_LOYALTY_CARD_AID); in onTagDiscovered() 80 Log.i(TAG, "Sending: " + ByteArrayToHexString(command)); in onTagDiscovered() 91 Log.i(TAG, "Received: " + accountNumber); in onTagDiscovered() 142 for (int i = 0; i < len; i += 2) { in HexStringToByteArray() 143 data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) in HexStringToByteArray() 144 + Character.digit(s.charAt(i+1), 16)); in HexStringToByteArray()
|
/developers/samples/android/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/ |
D | AbstractMultipleStepsActivity.java | 101 private void showStep(int i) { in showStep() argument 102 if (mFinished || i < 0 || i >= mSteps.length) { in showStep() 104 mFinished, i, 0, mSteps.length - 1); in showStep() 107 View step = mSteps[i]; in showStep() 108 mStatus.setText(getString(R.string.message_showing_step, i)); in showStep() 109 if (DEBUG) debug("Showing step %d", i); in showStep() 114 mCurrentStep = i; in showStep() 129 for (int i = 0; i < mSteps.length; i++) { in finishIt() 130 TextView label = (TextView) mSteps[i].getChildAt(0); in finishIt() 131 EditText input = (EditText) mSteps[i].getChildAt(1); in finishIt() [all …]
|
/developers/samples/android/content/DirectShare/Application/src/main/java/com/example/android/directshare/ |
D | SelectContactActivity.java | 65 public Object getItem(int i) { 66 return Contact.byId(i); 70 public long getItemId(int i) { 71 return i; 75 public View getView(int i, View view, ViewGroup parent) { 81 Contact contact = (Contact) getItem(i); 90 public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { 92 data.putExtra(Contact.ID, i);
|
D | SampleChooserTargetService.java | 42 for (int i = 0; i < Contact.CONTACTS.length; ++i) { in onGetChooserTargets() 43 Contact contact = Contact.byId(i); in onGetChooserTargets() 45 extras.putInt(Contact.ID, i); in onGetChooserTargets()
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/util/ |
D | Util.java | 109 for (int i = 0; i < nodeCount; i++) { in dumpStructure() 110 logv("node #%d", i); in dumpStructure() 111 WindowNode node = structure.getWindowNodeAt(i); in dumpStructure() 161 for (int i = 0; i < numberChildren; i++) { in dumpNode() 162 dumpNode(builder, prefix2, node.getChildAt(i), i); in dumpNode() 211 for (int i = 0; i < nodes; i++) { in findNodeByFilter() 212 final WindowNode windowNode = structure.getWindowNodeAt(i); in findNodeByFilter() 232 for (int i = 0; i < childrenSize; i++) { in findNodeByFilter() 233 final ViewNode found = findNodeByFilter(node.getChildAt(i), id, filter); in findNodeByFilter() 290 for (int i = 0; i < array.length; i++) { in indexOf() [all …]
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/simple/ |
D | DebugService.java | 107 for (int i = 0; i < size; i++) { in onFillRequest() 108 hints[i] = fields.keyAt(i); in onFillRequest() 109 ids[i] = fields.valueAt(i); in onFillRequest() 145 for (int i = 0; i < nodes; i++) { in getAutofillableFields() 146 ViewNode node = structure.getWindowNodeAt(i).getRootViewNode(); in getAutofillableFields() 169 for (int i = 0; i < childrenSize; i++) { in addAutofillableFields() 170 addAutofillableFields(fields, node.getChildAt(i)); in addAutofillableFields() 261 for (int i = 1; i <= numDatasets; i++) { in createResponse() 262 Dataset unlockedDataset = newUnlockedDataset(fields, packageName, i); in createResponse() 268 String value = i + "-" + hint; in createResponse() [all …]
|
/developers/samples/android/notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/ |
D | Conversations.java | 105 for (int i = 0; i < howManyConversations; i++) { in getUnreadConversations() 106 conversations[i] = new Conversation( in getUnreadConversations() 116 for (int i = 0; i < messagesPerConversation; i++) { in makeMessages()
|
/developers/samples/android/media/MidiScope/Application/src/main/java/com/example/android/midiscope/ |
D | MidiPrinter.java | 64 for (int i = 0; i < count; i++) { in formatBytes() 65 sb.append(String.format(" %02X", data[offset + i])); in formatBytes() 81 for (int i = 0; i < numData; i++) { in formatMessage() 82 if (i > 0) { in formatMessage()
|
/developers/samples/android/connectivity/nfc/CardEmulation/Application/src/main/java/com/example/android/cardemulation/ |
D | CardService.java | 86 Log.i(TAG, "Received APDU: " + ByteArrayToHexString(commandApdu)); in processCommandApdu() 92 Log.i(TAG, "Sending account number: " + account); in processCommandApdu() 146 for (int i = 0; i < len; i += 2) { in HexStringToByteArray() 148 data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) in HexStringToByteArray() 149 + Character.digit(s.charAt(i+1), 16)); in HexStringToByteArray()
|
/developers/samples/android/input/gestures/BasicGestureDetect/Application/src/main/java/com/example/android/basicgesturedetect/ |
D | GestureListener.java | 34 Log.i(TAG, "Single Tap Up" + getTouchType(e)); in onSingleTapUp() 42 Log.i(TAG, "Long Press" + getTouchType(e)); in onLongPress() 49 Log.i(TAG, "Scroll" + getTouchType(e1)); in onScroll() 57 Log.i(TAG, "Fling" + getTouchType(e1)); in onFling() 64 Log.i(TAG, "Show Press" + getTouchType(e)); in onShowPress() 70 Log.i(TAG, "Down" + getTouchType(e)); in onDown() 77 Log.i(TAG, "Double tap" + getTouchType(e)); in onDoubleTap() 86 Log.i(TAG, "Event within double tap" + getTouchType(e)); in onDoubleTapEvent() 94 Log.i(TAG, "Single tap confirmed" + getTouchType(e)); in onSingleTapConfirmed()
|
/developers/samples/android/wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/ |
D | MainActivity.java | 110 public void onPageScrolled(int i, float v, int i2) { in setupViews() 114 public void onPageSelected(int i) { in setupViews() 115 setIndicator(i); in setupViews() 119 public void onPageScrollStateChanged(int i) { in setupViews() 199 private void setCounter(int i) { in setCounter() argument 200 mJumpCounter = i; in setCounter() 201 mCounterPage.setCounter(i); in setCounter() 202 Utils.saveCounterToPreference(this, i); in setCounter() 203 if (i > 0 && i % 10 == 0) { in setCounter() 215 private void setIndicator(int i) { in setIndicator() argument [all …]
|
/developers/samples/android/system/RuntimePermissions/kotlinApp/app/src/main/java/com/example/android/system/runtimepermissions/ |
D | MainActivity.kt | 96 Log.i(TAG, "Show camera button pressed. Checking permission.") in showCamera() 103 Log.i(TAG, in showCamera() 115 Log.i(TAG, "CAMERA permission has NOT been granted. Requesting permission.") in requestCameraPermission() 120 Log.i(TAG, "Displaying camera permission rationale to provide additional context.") in requestCameraPermission() 139 Log.i(TAG, "Show contacts button pressed. Checking permissions.") in showContacts() 145 Log.i(TAG, "Contact permissions has NOT been granted. Requesting permissions.") in showContacts() 149 Log.i(TAG, in showContacts() 167 Log.i(TAG, "Displaying contacts permission rationale to provide additional context.") in requestContactsPermissions() 212 Log.i(TAG, "Received response for Camera permission request.") in onRequestPermissionsResult() 217 Log.i(TAG, "CAMERA permission has now been granted. Showing preview.") in onRequestPermissionsResult() [all …]
|
/developers/samples/android/wearable/wear/SpeedTracker/Wearable/src/main/java/com/example/android/wearable/speedtracker/ |
D | SpeedPickerActivity.java | 57 public void onScroll(int i) { in onCreate() 61 public void onAbsoluteScrollChange(int i) { in onCreate() 63 if (i > 0) { in onCreate() 64 header.setY(-i); in onCreate() 69 public void onScrollStateChanged(int i) { in onCreate() 73 public void onCentralPositionChanged(int i) { in onCreate()
|
/developers/samples/android/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/ |
D | MainActivity.java | 107 Log.i(TAG, "Show camera button pressed. Checking permission."); in showCamera() 119 Log.i(TAG, in showCamera() 133 Log.i(TAG, "CAMERA permission has NOT been granted. Requesting permission."); in requestCameraPermission() 141 Log.i(TAG, in requestCameraPermission() 168 Log.i(TAG, "Show contacts button pressed. Checking permissions."); in showContacts() 176 Log.i(TAG, "Contact permissions has NOT been granted. Requesting permissions."); in showContacts() 182 Log.i(TAG, in showContacts() 203 Log.i(TAG, in requestContactsPermissions() 260 Log.i(TAG, "Received response for Camera permission request."); in onRequestPermissionsResult() 265 Log.i(TAG, "CAMERA permission has now been granted. Showing preview."); in onRequestPermissionsResult() [all …]
|
/developers/samples/android/media/BasicMediaDecoder/Application/src/main/java/com/example/android/basicmediadecoder/ |
D | MainActivity.java | 112 for (int i = 0; i < nTracks; ++i) { in startPlayback() 113 mExtractor.unselectTrack(i); in startPlayback() 120 for (int i = 0; i < nTracks; ++i) { in startPlayback() 124 mCodecWrapper = MediaCodecWrapper.fromVideoFormat(mExtractor.getTrackFormat(i), in startPlayback() 127 mExtractor.selectTrack(i); in startPlayback()
|