Home
last modified time | relevance | path

Searched refs:delta (Results 1 – 25 of 229) sorted by relevance

12345678910

/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DEnergyConsumerSnapshotTest.java119 EnergyConsumerDeltaData 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/
DConfiguration.java1619 public @Config int updateFrom(@NonNull Configuration delta) { in updateFrom() argument
1621 if (delta.fontScale > 0 && fontScale != delta.fontScale) { in updateFrom()
1623 fontScale = delta.fontScale; in updateFrom()
1625 if (delta.mcc != 0 && mcc != delta.mcc) { in updateFrom()
1627 mcc = delta.mcc; in updateFrom()
1629 if (delta.mnc != 0 && mnc != delta.mnc) { in updateFrom()
1631 mnc = delta.mnc; in updateFrom()
1634 delta.fixUpLocaleList(); in updateFrom()
1635 if (!delta.mLocaleList.isEmpty() && !mLocaleList.equals(delta.mLocaleList)) { in updateFrom()
1637 mLocaleList = delta.mLocaleList; in updateFrom()
[all …]
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/
DCube.java25 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()
Dvr.rscript67 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/
DDisplayWindowSettings.java559 boolean updateFrom(@NonNull SettingsEntry delta) { in updateFrom() argument
561 if (delta.mWindowingMode != WindowConfiguration.WINDOWING_MODE_UNDEFINED in updateFrom()
562 && delta.mWindowingMode != mWindowingMode) { in updateFrom()
563 mWindowingMode = delta.mWindowingMode; in updateFrom()
566 if (delta.mUserRotationMode != null in updateFrom()
567 && !Objects.equals(delta.mUserRotationMode, mUserRotationMode)) { in updateFrom()
568 mUserRotationMode = delta.mUserRotationMode; in updateFrom()
571 if (delta.mUserRotation != null in updateFrom()
572 && !Objects.equals(delta.mUserRotation, mUserRotation)) { in updateFrom()
573 mUserRotation = delta.mUserRotation; in updateFrom()
[all …]
/frameworks/av/media/libaaudio/src/utility/
DMonotonicCounter.h61 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/java/android/app/
DWindowConfiguration.java490 public @WindowConfig int updateFrom(@NonNull WindowConfiguration delta) { in updateFrom() argument
493 if (!delta.mBounds.isEmpty() && !delta.mBounds.equals(mBounds)) { in updateFrom()
495 setBounds(delta.mBounds); in updateFrom()
497 if (delta.mAppBounds != null && !delta.mAppBounds.equals(mAppBounds)) { in updateFrom()
499 setAppBounds(delta.mAppBounds); in updateFrom()
501 if (!delta.mMaxBounds.isEmpty() && !delta.mMaxBounds.equals(mMaxBounds)) { in updateFrom()
503 setMaxBounds(delta.mMaxBounds); in updateFrom()
505 if (delta.mWindowingMode != WINDOWING_MODE_UNDEFINED in updateFrom()
506 && mWindowingMode != delta.mWindowingMode) { in updateFrom()
508 setWindowingMode(delta.mWindowingMode); in updateFrom()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DTokenBucketTest.java91 int delta = 50; in testFill() local
92 TokenBucket tb = new TokenBucket(delta, 10, 0); in testFill()
96 Thread.sleep(3 * delta / 2); in testFill()
123 final int delta = 3; in testAverage() local
127 TokenBucket tb = new TokenBucket(delta, 20, 0); in testAverage()
131 Thread.sleep(5 * delta); in testAverage()
136 assertDuration(want * delta, SystemClock.elapsedRealtime() - start); in testAverage()
141 final int delta = 2; in testBurst() local
146 TokenBucket tb = new TokenBucket(delta, capacity, 0); in testBurst()
151 Thread.sleep(capacity * delta - 2); in testBurst()
[all …]
/frameworks/base/packages/CredentialManager/horologist/src/com/google/android/horologist/compose/rotaryinput/
DRotary.kt476 override fun observeEvent(timestamp: Long, delta: Float) { in observeEvent()
477 rotaryVelocityTracker.move(timestamp, delta) in observeEvent()
530 public fun observeEvent(timestamp: Long, delta: Float) in observeEvent()
590 public data class TimestampedDelta(val timestamp: Long, val delta: Float) constant in TimestampedDelta
614 val delta = value - prevPosition in handleEvent() constant
615 debugLog { "Animated by $delta, value: $value" } in handleEvent()
616 scrollBy(delta) in handleEvent()
834 var delta = 0f in batchRequestsWithinTimeframe() variable
840 delta += it.delta in batchRequestsWithinTimeframe()
841 debugLog { "Batching requests. delta:$delta" } in batchRequestsWithinTimeframe()
[all …]
/frameworks/rs/toolkit/
DTestTaskProcessor.cpp15 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/
Dball_physics.rscript87 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/
DLongArrayMultiStateCounterPerfTest.java91 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/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/
DDragPositioningCallbackUtilityTest.kt102 val delta = DragPositioningCallbackUtility.calculateDelta(newX, newY, startingPoint) in <lambda>() constant
105 repositionTaskBounds, STARTING_BOUNDS, STABLE_BOUNDS, delta, mockDisplayController, in <lambda>()
122 val delta = DragPositioningCallbackUtility.calculateDelta(newX, newY, startingPoint) in <lambda>() constant
125 repositionTaskBounds, STARTING_BOUNDS, STABLE_BOUNDS, delta, mockDisplayController, in <lambda>()
142 val delta = DragPositioningCallbackUtility.calculateDelta(newX, newY, startingPoint) in <lambda>() constant
145 repositionTaskBounds, STARTING_BOUNDS, STABLE_BOUNDS, delta, mockDisplayController, in <lambda>()
162 val delta = DragPositioningCallbackUtility.calculateDelta(newX, newY, startingPoint) in <lambda>() constant
165 repositionTaskBounds, STARTING_BOUNDS, STABLE_BOUNDS, delta, mockDisplayController, in <lambda>()
181 val delta = DragPositioningCallbackUtility.calculateDelta(newX, newY, startingPoint) in <lambda>() constant
184 repositionTaskBounds, STARTING_BOUNDS, STABLE_BOUNDS, delta, mockDisplayController, in <lambda>()
[all …]
/frameworks/base/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/nativesubstitution/
DLongArrayMultiStateCounter_host.java127 if (delta(mValues, values, mDelta)) { in updateValue()
148 public void incrementValues(long[] delta, long timestampMs) { in incrementValues() argument
151 values[i] += delta[i]; in incrementValues()
156 public void addCounts(long[] delta) { in addCounts() argument
162 mStates[mCurrentState].mCounter[i] += delta[i]; in addCounts()
229 private boolean delta(long[] values1, long[] values2, long[] delta) { in delta() method in LongArrayMultiStateCounter_host.LongArrayMultiStateCounterRavenwood
230 if (delta.length != mArrayLength) { in delta()
237 delta[i] = values2[i] - values1[i]; in delta()
239 delta[i] = 0; in delta()
247 private void add(long[] counter, long[] delta, long numerator, long denominator) { in add() argument
[all …]
/frameworks/native/services/vibratorservice/
DVibratorCallbackScheduler.cpp33 std::chrono::milliseconds delta = std::chrono::duration_cast<std::chrono::milliseconds>( in getWaitForExpirationDuration() local
36 return delta > delta.zero() ? delta : delta.zero(); in getWaitForExpirationDuration()
/frameworks/rs/script_api/
DGenerateRSFunctionsList.cpp199 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/src/com/android/systemui/navigationbar/
DNavbarOrientationTrackingLogger.kt76 var delta = newRotation - oldRotation in deltaRotation() variable
77 if (delta < 0) delta += 4 in deltaRotation()
78 return delta in deltaRotation()
/frameworks/native/libs/gui/
DOccupancyTracker.cpp66 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/base/test-junit/src/junit/framework/
DAssert.java98 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/services/core/java/com/android/server/location/eventlog/
DLocalEventLog.java125 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/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/
Dcolorspace.cpp116 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/
DQuaternionUtil.cpp60 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/native/libs/battery/
DMultiStateCounterTest.cpp27 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()
197 double delta = testCounter.updateValue(11.0, 3000); in TEST_F() local
205 EXPECT_DOUBLE_EQ(3.0, delta); in TEST_F()
218 double delta = testCounter.updateValue(7.0, 4000); in TEST_F() local
226 EXPECT_DOUBLE_EQ(3.0, delta); in TEST_F()
/frameworks/base/services/core/java/com/android/server/display/color/
DCctEvaluator.java54 final int delta = max - min + 1; in CctEvaluator() local
55 mStepsAtOffsetCcts = new int[delta]; in CctEvaluator()
56 mSteppedCctsAtOffsetCcts = new int[delta]; in CctEvaluator()
72 while (index < delta) { in CctEvaluator()
/frameworks/rs/tests/java_api/RsBLAS_Benchmark/src/com/example/android/rs/blasbenchmark/
DBNNMTest.java94 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()

12345678910