/cts/libs/commonutil/src/com/android/cts/util/ |
D | Stat.java | 48 public static StatResult getStat(double[] data) { in getStat() argument 49 double average = data[0]; in getStat() 50 double min = data[0]; in getStat() 51 double max = data[0]; in getStat() 52 double eX2 = data[0] * data[0]; // will become E[X^2] in getStat() 53 for (int i = 1; i < data.length; i++) { in getStat() 54 average += data[i]; in getStat() 55 eX2 += data[i] * data[i]; in getStat() 56 if (data[i] > max) { in getStat() 57 max = data[i]; in getStat() [all …]
|
/cts/common/util/src/com/android/compatibility/common/util/ |
D | Stat.java | 47 public static StatResult getStat(double[] data) { in getStat() argument 48 double average = data[0]; in getStat() 49 double min = data[0]; in getStat() 50 double max = data[0]; in getStat() 51 double eX2 = data[0] * data[0]; // will become E[X^2] in getStat() 52 for (int i = 1; i < data.length; i++) { in getStat() 53 average += data[i]; in getStat() 54 eX2 += data[i] * data[i]; in getStat() 55 if (data[i] > max) { in getStat() 56 max = data[i]; in getStat() [all …]
|
/cts/tests/tests/opengl/libopengltest/ |
D | gl2_jni_libone.cpp | 54 Data data = attachShaderOne(); in Java_android_opengl_cts_GL2JniLibOne_init() local 55 LOGI("Attach Shader Error : %d\n", data.mShaderError); in Java_android_opengl_cts_GL2JniLibOne_init() 56 LOGI("Shader Count : %d\n", data.mShaderCount); in Java_android_opengl_cts_GL2JniLibOne_init() 57 errorAttachShader = data.mShaderError; in Java_android_opengl_cts_GL2JniLibOne_init() 58 shaderCount = data.mShaderCount; in Java_android_opengl_cts_GL2JniLibOne_init() 60 Data data = attachShaderTwo(); in Java_android_opengl_cts_GL2JniLibOne_init() local 61 LOGI("Attach Shader Error : %d\n", data.mShaderError); in Java_android_opengl_cts_GL2JniLibOne_init() 62 errorAttachShader = data.mShaderError; in Java_android_opengl_cts_GL2JniLibOne_init() 64 Data data = attachShaderThree(); in Java_android_opengl_cts_GL2JniLibOne_init() local 65 LOGI("Attach Shader Error : %d\n", data.mShaderError); in Java_android_opengl_cts_GL2JniLibOne_init() [all …]
|
/cts/suite/audio_quality/lib/src/audio/ |
D | AudioProtocol.cpp | 36 bool AudioProtocol::handleReply(const uint32_t* data, AudioParam* param) in handleReply() argument 38 if (!checkHeaderId(data, mCommand)) { in handleReply() 41 if (data[1] != 0) { // no endian change for 0 in handleReply() 42 LOGE("error in reply %d", ntohl(data[1])); in handleReply() 45 if (data[2] != 0) { in handleReply() 46 LOGE("payload length %d not zero", ntohl(data[2])); in handleReply() 52 bool AudioProtocol::handleReplyHeader(ClientSocket& socket, uint32_t* data, CommandId& id) in handleReplyHeader() argument 54 if (!socket.readData((char*)data, REPLY_HEADER_SIZE)) { in handleReplyHeader() 58 uint32_t command = ntohl(data[0]); in handleReplyHeader() 60 LOGE("Wrong header %x %x", command, data[0]); in handleReplyHeader() [all …]
|
D | AudioSignalFactory.cpp | 31 int16_t* data = reinterpret_cast<int16_t*>(buffer->getData()); in generateSineWave() local 35 *data = (int16_t)val; in generateSineWave() 36 data++; in generateSineWave() 38 *data = (int16_t)val; in generateSineWave() 39 data++; in generateSineWave() 53 int16_t* data = reinterpret_cast<int16_t*>(buffer->getData()); in generateWhiteNoise() local 59 *data = val; in generateWhiteNoise() 60 data++; in generateWhiteNoise() 62 *data = val; in generateWhiteNoise() 63 data++; in generateWhiteNoise() [all …]
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | AssetManager_AssetInputStreamTest.java | 81 byte[] data = new byte[dataLength]; in testReadMethods() 82 int ret = mAssetInputStream.read(data); in testReadMethods() 85 assertEquals(bytes[i], data[i]); in testReadMethods() 87 data = new byte[len - dataLength]; in testReadMethods() 88 assertEquals(len - dataLength, mAssetInputStream.read(data)); in testReadMethods() 90 assertEquals(bytes[i + dataLength], data[i]); in testReadMethods() 92 assertEquals(end, mAssetInputStream.read(data)); in testReadMethods() 97 ret = mAssetInputStream.read(data, offset, dataLength); in testReadMethods() 100 assertEquals(bytes[i], data[offset + i]); in testReadMethods() 104 ret = mAssetInputStream.read(data, offset, dataLength); in testReadMethods() [all …]
|
/cts/tests/tests/os/src/android/os/cts/ |
D | MemoryFileTest.java | 40 byte[] data = new byte[512]; in testWriteBytes() 43 mMemoryFile.writeBytes(data, 0, 0, 512); in testWriteBytes() 56 byte[] data = new byte[512]; in checkWriteBytesInIllegalParameter() 57 mMemoryFile.writeBytes(data, srcOffset, destOffset, count); in checkWriteBytesInIllegalParameter() 84 byte[] data = new byte[512]; in testAllowPurging() 86 mMemoryFile.writeBytes(data, 0, 0, 512); in testAllowPurging() 93 mMemoryFile.writeBytes(data, 0, 0, 512); in testAllowPurging() 118 byte[] data = new byte[] { 1, 2, 3, 4 }; in testReadBytes() 119 mMemoryFile.writeBytes(data, 0, 0, data.length); in testReadBytes() 142 byte[] data = new byte[512]; in checkReadBytesInIllegalParameter() [all …]
|
D | LocalService.java | 48 protected boolean onTransact(int code, Parcel data, Parcel reply, 51 data.enforceInterface(SERVICE_LOCAL); 52 mReportObject = data.readStrongBinder(); 55 return super.onTransact(code, data, reply, flags); 105 Parcel data = Parcel.obtain(); in bindAction() local 106 data.writeInterfaceToken(SERVICE_LOCAL); in bindAction() 108 data.writeInt(mStartCount); in bindAction() 112 bindCode, data, null, 0); in bindAction() 113 data.recycle(); in bindAction()
|
/cts/suite/audio_quality/test/ |
D | BufferTest.cpp | 43 int16_t* data = (int16_t*)buffer->getData(); in TEST_F() local 44 ASSERT_TRUE(data != NULL); in TEST_F() 46 data[2*i] = i; in TEST_F() 47 data[2*i+1] = i; in TEST_F() 58 ASSERT_TRUE(data[2*i] == dataRead[2*i]); in TEST_F() 59 ASSERT_TRUE(data[2*i+1] == dataRead[2*i+1]); in TEST_F() 68 int16_t* data = (int16_t*)buffer->getData(); in TEST_F() local 69 ASSERT_TRUE(data != NULL); in TEST_F() 71 data[i] = i; in TEST_F() 75 data = (int16_t*)bufferl->getData(); in TEST_F() [all …]
|
D | AudioSignalFactoryTest.cpp | 28 int16_t* data = reinterpret_cast<int16_t*>(buffer->getData()); in testSignalBasic() local 30 ASSERT_TRUE(*data <= maxPositive); in testSignalBasic() 31 ASSERT_TRUE(*data >= -maxPositive); in testSignalBasic() 32 data++; in testSignalBasic() 33 ASSERT_TRUE(*data <= maxPositive); in testSignalBasic() 34 ASSERT_TRUE(*data >= -maxPositive); in testSignalBasic() 35 data++; in testSignalBasic()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | AudioTrackTest.java | 300 byte data[] = new byte[minBuffSize]; in testPlaybackHeadPositionIncrease() 303 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionIncrease() 304 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionIncrease() 327 byte data[] = new byte[minBuffSize]; in testPlaybackHeadPositionAfterFlush() 330 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionAfterFlush() 331 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionAfterFlush() 357 byte data[] = new byte[minBuffSize]; in testPlaybackHeadPositionAfterStop() 360 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionAfterStop() 361 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionAfterStop() 392 byte data[] = new byte[minBuffSize]; in testPlaybackHeadPositionAfterPause() [all …]
|
D | VisualizerTest.java | 140 byte[] data = new byte[mVisualizer.getCaptureSize()]; in test2_0PollingCapture() 141 mVisualizer.getWaveForm(data); in test2_0PollingCapture() 142 int energy = computeEnergy(data, true); in test2_0PollingCapture() 145 mVisualizer.getFft(data); in test2_0PollingCapture() 146 energy = computeEnergy(data, false); in test2_0PollingCapture() 223 private int computeEnergy(byte[] data, boolean pcm) { in computeEnergy() argument 225 if (data.length != 0) { in computeEnergy() 227 for (int i = 0; i < data.length; i++) { in computeEnergy() 228 int tmp = ((int)data[i] & 0xFF) - 128; in computeEnergy() 232 energy = (int)data[0] * (int)data[0]; in computeEnergy() [all …]
|
/cts/tests/tests/renderscript/src/android/renderscript/cts/ |
D | send_to_client.rs | 6 int data[4]; 7 data[0] = in->y; 8 data[1] = in->z; 9 data[2] = in->w; 10 rsSendToClient(id, data, sizeof(data));
|
/cts/suite/cts/deviceTests/browserbench/assets/octane/ |
D | base.js | 206 BenchmarkSuite.prototype.RunSingleBenchmark = function(benchmark, data) { argument 207 function Measure(data) { argument 214 if (data != null) { 215 data.runs += n; 216 data.elapsed += elapsed; 220 if (data == null) { 226 Measure(data); 228 if (data.runs < benchmark.minIterations) return data; 229 var usec = (data.elapsed * 1000) / data.runs; 246 var data; [all …]
|
D | gbemu.js | 72 result.data = new Uint8Array(w * h); 77 for (var i = 0; i < buffer.data.length; i++) { 78 sum += i * buffer.data[i]; 222 function base64(data) { argument 225 …var base64 = GameBoyWindow.btoa(data); //Use this native function when it's available, as it's a … 230 var dataLength = data.length; 235 while (data.length % 3 > 0) { 237 data[data.length] = " "; 241 …bytes = [data.charCodeAt(index++) & 0xFF, data.charCodeAt(index++) & 0xFF, data.charCodeAt(index++… 259 function base64_decode(data) { argument [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/ |
D | TestResult.java | 57 Intent data = new Intent(activity, activity.getClass()); in createResult() local 58 data.putExtra(TEST_NAME, testName); in createResult() 59 data.putExtra(TEST_RESULT, testResult); in createResult() 60 data.putExtra(TEST_DETAILS, testDetails); in createResult() 61 return data; in createResult() 68 static TestResult fromActivityResult(int resultCode, Intent data) { in fromActivityResult() argument 69 String name = data.getStringExtra(TEST_NAME); in fromActivityResult() 70 int result = data.getIntExtra(TEST_RESULT, TEST_RESULT_NOT_EXECUTED); in fromActivityResult() 71 String details = data.getStringExtra(TEST_DETAILS); in fromActivityResult()
|
D | TestResultsBackupHelper.java | 51 public void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data, in performBackup() argument 80 data.writeEntityHeader(DB_BACKUP_KEY, rawBytes.length); in performBackup() 81 data.writeEntityData(rawBytes, rawBytes.length); in performBackup() 93 public void restoreEntity(BackupDataInputStream data) { in restoreEntity() argument 95 if (DB_BACKUP_KEY.equals(data.getKey())) { in restoreEntity() 96 byte[] rawBytes = new byte[data.size()]; in restoreEntity() 97 data.read(rawBytes, 0, data.size()); in restoreEntity() 120 Log.e(TAG, "Skipping key: " + data.getKey()); in restoreEntity()
|
/cts/tests/tests/database/src/android/database/cts/ |
D | CharArrayBufferTest.java | 27 assertEquals(0, charArrayBuffer.data.length); in testCharArrayBuffer() 28 charArrayBuffer.data = new char[100]; in testCharArrayBuffer() 29 assertEquals(100, charArrayBuffer.data.length); in testCharArrayBuffer() 31 assertEquals(100, (new CharArrayBuffer(100)).data.length); in testCharArrayBuffer() 33 assertNull((new CharArrayBuffer(null)).data); in testCharArrayBuffer() 36 assertSame(expectedData, (new CharArrayBuffer(expectedData)).data); in testCharArrayBuffer()
|
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/ |
D | IntentSenderActivity.java | 31 public final Intent data; field in IntentSenderActivity.Result 33 public Result(int resultCode, Intent data) { in Result() argument 35 this.data = data; in Result() 40 protected void onActivityResult(int requestCode, int resultCode, Intent data) { in onActivityResult() argument 43 mResult.offer(new Result(resultCode, data), 5, TimeUnit.SECONDS); in onActivityResult() 53 return (result != null) ? result.data : null; in getResult()
|
/cts/tests/app/src/android/app/cts/ |
D | LocalService.java | 48 protected boolean onTransact(int code, Parcel data, Parcel reply, 51 data.enforceInterface(SERVICE_LOCAL); 52 mReportObject = data.readStrongBinder(); 55 return super.onTransact(code, data, reply, flags); 105 Parcel data = Parcel.obtain(); in bindAction() local 106 data.writeInterfaceToken(SERVICE_LOCAL); in bindAction() 108 data.writeInt(mStartCount); in bindAction() 112 bindCode, data, null, 0); in bindAction() 113 data.recycle(); in bindAction()
|
/cts/suite/cts/deviceTests/browserbench/assets/octane/js/ |
D | bootstrap-collapse.js | 62 hasData = actives.data('collapse') 65 hasData || actives.data('collapse', null) 129 , data = $this.data('collapse') 131 if (!data) $this.data('collapse', (data = new Collapse(this, options))) 132 if (typeof option == 'string') data[option]() 152 , option = $(target).data('collapse') ? 'toggle' : $this.data()
|
/cts/suite/audio_quality/lib/include/audio/ |
D | AudioProtocol.h | 70 virtual bool handleReply(const uint32_t* data, AudioParam* param); 79 static bool handleReplyHeader(ClientSocket& socket, uint32_t* data, CommandId& id); 86 bool sendData(const char* data, int len) { in sendData() argument 87 return mSocket.sendData(data, len); in sendData() 90 bool checkHeaderId(const uint32_t* data, uint32_t command); 91 bool readData(char* data, int len) { in readData() argument 92 return mSocket.readData(data, len); in readData() 135 virtual bool handleReply(const uint32_t* data, AudioParam* param); 151 virtual bool handleReply(const uint32_t* data, AudioParam* param);
|
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/ |
D | MyActivity.java | 32 public final Intent data; field in MyActivity.Result 34 public Result(int resultCode, Intent data) { in Result() argument 36 this.data = data; in Result() 50 protected void onActivityResult(int requestCode, int resultCode, Intent data) { in onActivityResult() argument 52 mResult.offer(new Result(resultCode, data), 5, TimeUnit.SECONDS); in onActivityResult()
|
/cts/suite/cts/deviceTests/opengl/src/com/android/cts/opengl/reference/ |
D | GLReferenceActivity.java | 39 public void onCreate(Bundle data) { in onCreate() argument 40 super.onCreate(data); in onCreate() 66 protected void onActivityResult(int requestCode, int resultCode, Intent data) { in onActivityResult() argument 70 mSetUpTimes = data.getDoubleArrayExtra(GLGameActivity.SET_UP_TIME); in onActivityResult() 71 mUpdateTimes = data.getDoubleArrayExtra(GLGameActivity.UPDATE_TIMES); in onActivityResult() 72 mRenderTimes = data.getDoubleArrayExtra(GLGameActivity.RENDER_TIMES); in onActivityResult()
|
/cts/suite/audio_quality/client/src/com/android/cts/audiotest/ |
D | AudioProtocol.java | 225 ByteBuffer data = ByteBuffer.allocate(dataLength); in handleDownload() local 226 read(mInput, data, dataLength); in handleDownload() 227 mDataMap.put(id, data); in handleDownload() 243 final ByteBuffer data = mDataMap.get(id); in handleStartPlayback() local 244 if (data == null) { in handleStartPlayback() 269 if (bufferSize > data.capacity()) { in handleStartPlayback() 270 bufferSize = data.capacity(); in handleStartPlayback() 283 int dataToWrite = (bufferSize < data.capacity())? bufferSize : data.capacity(); in handleStartPlayback() 284 mPlayback.write(data.array(), 0, dataToWrite); in handleStartPlayback() 288 int endMarker = data.capacity()/(stereo ? 4 : 2); in handleStartPlayback() [all …]
|