/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/prebuilts/gradle/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/build/prebuilts/gradle/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/build/prebuilts/gradle/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/build/prebuilts/gradle/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/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/build/prebuilts/androidtv/leanback/app/src/main/java/com/example/android/tvleanback/data/ |
D | PaginatedCursor.java | 80 for (int i = 0; i < mColumnCount; i++) { in PaginatedCursor() 81 int type = mCursor.getType(i); in PaginatedCursor() 82 mColumnTypes[i] = type; in PaginatedCursor() 85 mByteArrayCacheIndexMap[i] = mByteArrayCacheColumnSize++; in PaginatedCursor() 88 mFloatCacheIndexMap[i] = mFloatCacheColumnSize++; in PaginatedCursor() 91 mIntCacheIndexMap[i] = mIntCacheColumnSize++; in PaginatedCursor() 94 mStringCacheIndexMap[i] = mStringCacheColumnSize++; in PaginatedCursor() 104 for (int i = 0; i < mRowCount; i++) { in PaginatedCursor() 105 mCachedRows[i] = false; in PaginatedCursor() 107 mByteArrayDataCache[i] = new byte[mByteArrayCacheColumnSize][]; in PaginatedCursor() [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/build/prebuilts/gradle/MidiSynth/Application/src/main/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/build/prebuilts/gradle/MidiScope/Application/src/main/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/build/prebuilts/gradle/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/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/build/prebuilts/gradle/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()
|
/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()
|
/developers/build/prebuilts/gradle/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/ |
D | AbstractMultipleStepsActivity.java | 100 private void showStep(int i) { in showStep() argument 101 if (mFinished || i < 0 || i >= mSteps.length) { in showStep() 103 mFinished, i, 0, mSteps.length - 1); in showStep() 106 View step = mSteps[i]; in showStep() 107 mStatus.setText(getString(R.string.message_showing_step, i)); in showStep() 108 if (DEBUG) debug("Showing step %d", i); in showStep() 113 mCurrentStep = i; in showStep() 128 for (int i = 0; i < mSteps.length; i++) { in finishIt() 129 TextView label = (TextView) mSteps[i].getChildAt(0); in finishIt() 130 EditText input = (EditText) mSteps[i].getChildAt(1); in finishIt() [all …]
|
/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/build/prebuilts/gradle/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);
|
/developers/build/prebuilts/gradle/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);
|
/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 …]
|