/frameworks/base/services/tests/servicestests/src/com/android/server/am/ |
D | MeasuredEnergySnapshotTest.java | 119 MeasuredEnergyDeltaData delta = snapshot.updateAndGetDelta(RESULTS_0, VOLTAGE_0); in testUpdateAndGetDelta() local 120 if (delta != null) { // null is fine here. If non-null, it better be uninteresting though. in testUpdateAndGetDelta() 121 assertNull(delta.displayChargeUC); in testUpdateAndGetDelta() 122 assertNull(delta.otherTotalChargeUC); in testUpdateAndGetDelta() 123 assertNull(delta.otherUidChargesUC); in testUpdateAndGetDelta() 127 delta = snapshot.updateAndGetDelta(RESULTS_1, VOLTAGE_1); in testUpdateAndGetDelta() 128 assertNotNull(delta); in testUpdateAndGetDelta() 131 assertEquals(expectedChargeUC, delta.displayChargeUC[0]); in testUpdateAndGetDelta() 133 assertNotNull(delta.otherTotalChargeUC); in testUpdateAndGetDelta() 136 assertEquals(expectedChargeUC, delta.otherTotalChargeUC[0]); in testUpdateAndGetDelta() [all …]
|
/frameworks/base/core/java/android/content/res/ |
D | Configuration.java | 1537 public @Config int updateFrom(@NonNull Configuration delta) { in updateFrom() argument 1539 if (delta.fontScale > 0 && fontScale != delta.fontScale) { in updateFrom() 1541 fontScale = delta.fontScale; in updateFrom() 1543 if (delta.mcc != 0 && mcc != delta.mcc) { in updateFrom() 1545 mcc = delta.mcc; in updateFrom() 1547 if (delta.mnc != 0 && mnc != delta.mnc) { in updateFrom() 1549 mnc = delta.mnc; in updateFrom() 1552 delta.fixUpLocaleList(); in updateFrom() 1553 if (!delta.mLocaleList.isEmpty() && !mLocaleList.equals(delta.mLocaleList)) { in updateFrom() 1555 mLocaleList = delta.mLocaleList; in updateFrom() [all …]
|
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/ |
D | Cube.java | 25 public Cube(Volume v, float delta) { in Cube() argument 26 this(v, delta, new float[]{0, 0, 0, 0, 0, 0}); in Cube() 29 public Cube(Volume v, float delta, float[] trim) { in Cube() argument 32 float minx = delta + trim[0] * (v.mDimx - delta); in Cube() 33 float miny = delta + trim[1] * (v.mDimy - delta); in Cube() 34 float minz = delta + trim[2] * (v.mDimz - delta); in Cube() 35 float maxx = v.mDimx - delta - trim[3] * (v.mDimx - delta); in Cube() 36 float maxy = v.mDimy - delta - trim[4] * (v.mDimy - delta); in Cube() 37 float maxz = v.mDimz - delta - trim[5] * (v.mDimz - delta); in Cube()
|
D | vr.rscript | 67 float3 delta) { 68 float v_0_0 = mix(v_0_0_0, v_0_0_1, delta.x); 69 float v_0_1 = mix(v_0_1_0, v_0_1_1, delta.x); 70 float v_1_0 = mix(v_1_0_0, v_1_0_1, delta.x); 71 float v_1_1 = mix(v_1_1_0, v_1_1_1, delta.x); 72 float v_0 = mix(v_0_0, v_0_1, delta.y); 73 float v_1 = mix(v_1_0, v_1_1, delta.y); 74 float v = mix(v_0, v_1, delta.z); 139 float3 delta = p - convert_float3(ip); 154 delta); [all …]
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | DisplayWindowSettings.java | 486 boolean updateFrom(@NonNull SettingsEntry delta) { in updateFrom() argument 488 if (delta.mWindowingMode != WindowConfiguration.WINDOWING_MODE_UNDEFINED in updateFrom() 489 && delta.mWindowingMode != mWindowingMode) { in updateFrom() 490 mWindowingMode = delta.mWindowingMode; in updateFrom() 493 if (delta.mUserRotationMode != null in updateFrom() 494 && !Objects.equals(delta.mUserRotationMode, mUserRotationMode)) { in updateFrom() 495 mUserRotationMode = delta.mUserRotationMode; in updateFrom() 498 if (delta.mUserRotation != null in updateFrom() 499 && !Objects.equals(delta.mUserRotation, mUserRotation)) { in updateFrom() 500 mUserRotation = delta.mUserRotation; in updateFrom() [all …]
|
/frameworks/base/core/java/android/app/ |
D | WindowConfiguration.java | 480 public @WindowConfig int updateFrom(@NonNull WindowConfiguration delta) { in updateFrom() argument 483 if (!delta.mBounds.isEmpty() && !delta.mBounds.equals(mBounds)) { in updateFrom() 485 setBounds(delta.mBounds); in updateFrom() 487 if (delta.mAppBounds != null && !delta.mAppBounds.equals(mAppBounds)) { in updateFrom() 489 setAppBounds(delta.mAppBounds); in updateFrom() 491 if (!delta.mMaxBounds.isEmpty() && !delta.mMaxBounds.equals(mMaxBounds)) { in updateFrom() 493 setMaxBounds(delta.mMaxBounds); in updateFrom() 495 if (delta.mWindowingMode != WINDOWING_MODE_UNDEFINED in updateFrom() 496 && mWindowingMode != delta.mWindowingMode) { in updateFrom() 498 setWindowingMode(delta.mWindowingMode); in updateFrom() [all …]
|
/frameworks/av/media/libaaudio/src/utility/ |
D | MonotonicCounter.h | 61 int64_t increment(int64_t delta) { in increment() argument 62 if (delta > 0) { in increment() 63 mCounter64 += delta; in increment() 82 int32_t delta; in update32() local 83 __builtin_sub_overflow(counter32, mCounter32, &delta); in update32() 85 if (delta > 0) { in update32() 86 mCounter64 += delta; in update32()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/util/ |
D | TokenBucketTest.java | 79 int delta = 50; in testFill() local 80 TokenBucket tb = new TokenBucket(delta, 10, 0); in testFill() 84 Thread.sleep(3 * delta / 2); in testFill() 109 final int delta = 3; in testAverage() local 113 TokenBucket tb = new TokenBucket(delta, 20, 0); in testAverage() 117 Thread.sleep(5 * delta); in testAverage() 122 assertDuration(want * delta, SystemClock.elapsedRealtime() - start); in testAverage() 126 final int delta = 2; in testBurst() local 131 TokenBucket tb = new TokenBucket(delta, capacity, 0); in testBurst() 136 Thread.sleep(capacity * delta - 2); in testBurst() [all …]
|
/frameworks/rs/toolkit/ |
D | TestTaskProcessor.cpp | 15 SimpleTask(uint8_t* buffer, size_t vectorSize, size_t sizeX, size_t sizeY, uint8_t delta) in SimpleTask() argument 16 : Task{sizeX, sizeY, vectorSize, false, nullptr}, mBuffer{buffer}, mDelta{delta} {} in SimpleTask() 22 static uint8_t newValue(size_t x, size_t y, uint8_t delta) { in newValue() argument 23 return (((x & 0xff) << 4) | (y & 0xff)) + delta; in newValue() 45 size_t sizeY, uint8_t delta) { in verifyAllTheSame() argument 50 uint8_t expectedValue = newValue(x, y, delta + i); in verifyAllTheSame() 66 void testOne(android::renderscript::TaskProcessor* processor, uint8_t delta, size_t vectorSize, in testOne() argument 70 SimpleTask task{buffer.data(), vectorSize, sizeX, sizeY, delta}; in testOne() 73 if (verifyAllTheSame(buffer, vectorSize, sizeX, sizeY, delta)) { in testOne() 74 printf("Test %u: All good!\n", delta); in testOne()
|
/frameworks/rs/tests/java_api/Balls/src/com/example/android/rs/balls/ |
D | ball_physics.rscript | 87 ball->delta = (ball->delta * (1.f - 0.008f)) + fv; 88 ball->position = ball->position + (ball->delta * gDT); 94 if (ball->delta.x > 0) { 95 ball->delta.x *= -0.7f; 99 ball->delta.x -= min(wallForce / (d * d), 10.f); 106 if (ball->delta.x < 0) { 107 ball->delta.x *= -0.7f; 111 ball->delta.x += min(wallForce / (d * d), 10.f); 118 if (ball->delta.y > 0) { 119 ball->delta.y *= -0.7f; [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/os/ |
D | LongArrayMultiStateCounterPerfTest.java | 91 if (delta(mLastTimeInFreq, timeInFreq, mDelta)) { in updateValue() 111 private boolean delta(long[] timeInFreq1, long[] timeInFreq2, long[] delta) { in delta() method in LongArrayMultiStateCounterPerfTest.TestLongArrayMultiStateCounter 112 if (delta.length != mArrayLength) { in delta() 119 delta[i] = timeInFreq2[i] - timeInFreq1[i]; in delta() 121 delta[i] = 0; in delta() 129 private void add(long[] counter, long[] delta, long numerator, long denominator) { in add() argument 132 counter[i] += delta[i] * numerator / denominator; in add() 136 counter[i] += delta[i]; in add()
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/tare/ |
D | Ledger.java | 43 public final long delta; field in Ledger.Transaction 47 int eventId, @Nullable String tag, long delta, long ctp) { in Transaction() argument 52 this.delta = delta; in Transaction() 90 mCurrentBalance += transaction.delta; in recordTransaction() 93 mCumulativeDeltaPerReason.put(transaction.eventId, sum + transaction.delta); in recordTransaction() 109 sum += transaction.delta; in get24HourSum() 113 * transaction.delta) in get24HourSum() 149 pw.print(cakeToString(transaction.delta)); in dump()
|
D | Analyst.java | 161 if (-transaction.delta > transaction.ctp) { in noteTransaction() 162 report.cumulativeProfit += (-transaction.delta - transaction.ctp); in noteTransaction() 164 } else if (-transaction.delta < transaction.ctp) { in noteTransaction() 165 report.cumulativeLoss += (transaction.ctp + transaction.delta); in noteTransaction() 170 if (transaction.delta > 0) { in noteTransaction() 171 report.cumulativePositiveRegulations += transaction.delta; in noteTransaction() 173 } else if (transaction.delta < 0) { in noteTransaction() 174 report.cumulativeNegativeRegulations -= transaction.delta; in noteTransaction() 179 if (transaction.delta != 0) { in noteTransaction() 180 report.cumulativeRewards += transaction.delta; in noteTransaction()
|
/frameworks/rs/script_api/ |
D | GenerateRSFunctionsList.cpp | 199 string delta; // The part of the mangling we're generating for this recursion. in mangleType() local 204 delta = "P"; in mangleType() 207 delta = "K"; in mangleType() 209 delta = "V"; in mangleType() 212 delta = "Dv" + vectorSize + "_"; in mangleType() 220 delta = mangleLongName(tokens->front()); in mangleType() 224 delta = "z"; in mangleType() 230 delta = c; in mangleType() 235 delta = mangleLongName(tokens->front()); in mangleType() 251 *mangling = delta; in mangleType() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/ |
D | MediaViewControllerTest.kt | 64 val delta = 0.1F in <lambda>() constant 190 verify(controlWidgetState).alpha = floatThat { kotlin.math.abs(it - 0.5F) < delta } in <lambda>() 191 verify(detailWidgetState).alpha = floatThat { kotlin.math.abs(it - 1.0F) < delta } in <lambda>() 193 verify(controlWidgetState).alpha = floatThat { kotlin.math.abs(it - 1.0F) < delta } in <lambda>() 194 verify(detailWidgetState, times(2)).alpha = floatThat { kotlin.math.abs(it - 1.0F) < delta } in <lambda>() 221 verify(mediaContainerWidgetState).alpha = floatThat { kotlin.math.abs(it - 0.5F) < delta } in <lambda>() 223 verify(mediaContainerWidgetState).alpha = floatThat { kotlin.math.abs(it - 1.0F) < delta } in <lambda>() 227 verify(mediaTitleWidgetState).alpha = floatThat { kotlin.math.abs(it - 0.5F) < delta } in <lambda>() 228 verify(mediaSubTitleWidgetState).alpha = floatThat { kotlin.math.abs(it - 0.5F) < delta } in <lambda>() 230 verify(mediaTitleWidgetState).alpha = floatThat { kotlin.math.abs(it - 1.0F) < delta } in <lambda>() [all …]
|
/frameworks/native/libs/gui/ |
D | OccupancyTracker.cpp | 66 nsecs_t delta = now - mLastOccupancyChangeTime; in registerOccupancyChange() local 67 if (delta > NEW_SEGMENT_DELAY) { in registerOccupancyChange() 70 mPendingSegment.totalTime += delta; in registerOccupancyChange() 72 mPendingSegment.mOccupancyTimes[mLastOccupancy] += delta; in registerOccupancyChange() 74 mPendingSegment.mOccupancyTimes[mLastOccupancy] = delta; in registerOccupancyChange()
|
/frameworks/native/libs/battery/ |
D | MultiStateCounterTest.cpp | 27 bool DoubleMultiStateCounter::delta(const double& previousValue, const double& newValue, in delta() function in android::battery::DoubleMultiStateCounter 55 double delta = testCounter.updateValue(3.14, 3000); in TEST_F() local 60 EXPECT_DOUBLE_EQ(3.14, delta); in TEST_F() 181 double delta = testCounter.updateValue(11.0, 3000); in TEST_F() local 189 EXPECT_DOUBLE_EQ(3.0, delta); in TEST_F() 202 double delta = testCounter.updateValue(7.0, 4000); in TEST_F() local 210 EXPECT_DOUBLE_EQ(3.0, delta); in TEST_F()
|
/frameworks/base/services/core/java/com/android/server/location/eventlog/ |
D | LocalEventLog.java | 125 long delta = 0; in addLog() local 127 delta = time - mLastLogTime; in addLog() 132 if (delta < 0 || (delta / MAX_TIME_DELTA) >= mEntries.length - 1) { in addLog() 134 delta = 0; in addLog() 136 while (delta >= MAX_TIME_DELTA) { in addLog() 138 delta -= MAX_TIME_DELTA; in addLog() 150 addLogEventInternal(false, (int) delta, logEvent); in addLog()
|
/frameworks/base/test-base/src/junit/framework/ |
D | Assert.java | 98 static public void assertEquals(String message, double expected, double actual, double delta) { in assertEquals() argument 101 if (!(Math.abs(expected-actual) <= delta)) in assertEquals() 108 static public void assertEquals(double expected, double actual, double delta) { in assertEquals() argument 109 assertEquals(null, expected, actual, delta); in assertEquals() 116 static public void assertEquals(String message, float expected, float actual, float delta) { in assertEquals() argument 119 if (!(Math.abs(expected - actual) <= delta)) in assertEquals() 126 static public void assertEquals(float expected, float actual, float delta) { in assertEquals() argument 127 assertEquals(null, expected, actual, delta); in assertEquals()
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/ |
D | colorspace.cpp | 116 float delta; in JNI_COLORSPACE_METHOD() local 132 delta = c_max -c_min; in JNI_COLORSPACE_METHOD() 136 h = (g > b) ? static_cast<int>(scaler * (g - b) / delta) : in JNI_COLORSPACE_METHOD() 137 static_cast<int>(scaler * ((g - b) / delta + 6)); in JNI_COLORSPACE_METHOD() 139 h = static_cast<int>(scaler * ((b - r) / delta + 2)); in JNI_COLORSPACE_METHOD() 141 h = static_cast<int>(scaler * ((r - g) / delta + 4)); in JNI_COLORSPACE_METHOD() 143 s = (delta == 0.0f) ? 0 : static_cast<unsigned char>(delta / c_max * 255); in JNI_COLORSPACE_METHOD()
|
/frameworks/av/media/libheadtracking/ |
D | QuaternionUtil.cpp | 60 Quaternionf ExpSU2(const Vector3f& delta) { in ExpSU2() argument 62 const float theta_squared = delta.squaredNorm(); in ExpSU2() 66 q_delta.vec() = (sin(theta) / theta) * delta; in ExpSU2() 70 q_delta.vec() = (1.f - 1.f / 6.f * theta_squared) * delta; in ExpSU2()
|
/frameworks/rs/tests/java_api/RsBLAS_Benchmark/src/com/example/android/rs/blasbenchmark/ |
D | BNNMTest.java | 94 int delta = (int)(Math.ceil(rand.nextFloat() * maxDelta)); in addByteNoise() local 96 delta = -delta; in addByteNoise() 98 int newValue = (originalValue + delta); in addByteNoise() 135 int delta = (expectedValue - actualValue); in testWithTolerance() local 137 if ((delta < -1) || (delta > 1)) { in testWithTolerance() 141 if (delta != 0) { in testWithTolerance()
|
/frameworks/av/media/libcpustats/ |
D | CentralTendencyStatistics.cpp | 33 double delta = x - mMean; in sample() local 34 mMean += delta / mN; in sample() 35 mM2 += delta * (x - mMean); in sample()
|
/frameworks/base/core/tests/coretests/src/android/graphics/drawable/ |
D | AdaptiveIconDrawableTest.java | 143 double delta = 0.01; in testGetIconMask_withoutBounds() local 144 assertEquals("left", boundFromDrawable.left, boundFromDeviceConfig.left, delta); in testGetIconMask_withoutBounds() 145 assertEquals("top", boundFromDrawable.top, boundFromDeviceConfig.top, delta); in testGetIconMask_withoutBounds() 146 assertEquals("right", boundFromDrawable.right, boundFromDeviceConfig.right, delta); in testGetIconMask_withoutBounds() 147 assertEquals("bottom", boundFromDrawable.bottom, boundFromDeviceConfig.bottom, delta); in testGetIconMask_withoutBounds() 164 double delta = 0.01; in testGetIconMaskAfterSetBounds() local 165 assertEquals("left", left, maskBounds.left, delta); in testGetIconMaskAfterSetBounds() 166 assertEquals("top", top, maskBounds.top, delta); in testGetIconMaskAfterSetBounds() 167 assertEquals("right", right, maskBounds.right, delta); in testGetIconMaskAfterSetBounds() 168 assertEquals("bottom", bottom, maskBounds.bottom, delta); in testGetIconMaskAfterSetBounds()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/assist/ui/ |
D | CornerPathRenderer.java | 60 private Path approximateInnerPath(Path input, float delta) { in approximateInnerPath() argument 61 List<PointF> points = shiftBy(getApproximatePoints(input), delta); in approximateInnerPath() 77 private ArrayList<PointF> shiftBy(ArrayList<PointF> input, float delta) { in shiftBy() argument 84 new PointF(point.x + (normal.x * delta), point.y + (normal.y * delta)); in shiftBy()
|