/packages/modules/CellBroadcastService/tests/src/com/android/cellbroadcastservice/tests/ |
D | CbSendMessageCalculatorTest.java | 79 float threshold = 100; in testSingleSquareOutside() local 82 testSquareOutside(coor, threshold - 10, threshold); in testSingleSquareOutside() 83 testSquareOutside(coor, threshold + 10, threshold); in testSingleSquareOutside() 86 void testSquareOutside(LatLng coor, float accuracy, float threshold) { in testSquareOutside() argument 87 CbSendMessageCalculator calculator = createCalculator(threshold, mSquare); in testSquareOutside() 95 float threshold = 100; in testSingleSquareInside() local 96 testSquareInside(coor, threshold - 10, threshold); in testSingleSquareInside() 97 testSquareInside(coor, threshold + 10, threshold); in testSingleSquareInside() 100 void testSquareInside(LatLng coor, float accuracy, float threshold) { in testSquareInside() argument 101 CbSendMessageCalculator calculator = createCalculator(threshold, mSquare); in testSquareInside() [all …]
|
/packages/services/Car/service/src/com/android/car/watchdog/ |
D | OveruseConfigurationCache.java | 168 PerStateBytes threshold = null; in fetchThreshold() local 171 threshold = mIoThresholdsBySystemPackages.get(genericPackageName); in fetchThreshold() 172 if (threshold != null) { in fetchThreshold() 173 return copyPerStateBytes(threshold); in fetchThreshold() 177 threshold = mIoThresholdsByVendorPackages.get(genericPackageName); in fetchThreshold() 178 if (threshold != null) { in fetchThreshold() 179 return copyPerStateBytes(threshold); in fetchThreshold() 183 threshold = fetchAppCategorySpecificThresholdLocked(genericPackageName); in fetchThreshold() 184 if (threshold != null) { in fetchThreshold() 185 return copyPerStateBytes(threshold); in fetchThreshold() [all …]
|
/packages/apps/Dialer/java/com/android/incallui/ |
D | InCallOrientationEventListener.java | 83 private static boolean isWithinThreshold(int value, int center, int threshold) { in isWithinThreshold() argument 84 return isWithinRange(value, center - threshold, center + threshold); in isWithinThreshold() 87 private static boolean isInLeftRange(int value, int center, int threshold) { in isInLeftRange() argument 88 return isWithinRange(value, center - threshold, center); in isInLeftRange() 91 private static boolean isInRightRange(int value, int center, int threshold) { in isInRightRange() argument 92 return isWithinRange(value, center, center + threshold); in isInRightRange()
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/ |
D | RecentsOrientedState.java | 447 int threshold = 70; in getRotationForUserDegreesRotated() local 450 if (degrees > 180 && degrees < (360 - threshold)) { in getRotationForUserDegreesRotated() 453 if (degrees < 180 && degrees > threshold) { in getRotationForUserDegreesRotated() 458 if (degrees < (90 - threshold) || in getRotationForUserDegreesRotated() 459 (degrees > (270 + threshold) && degrees < 360)) { in getRotationForUserDegreesRotated() 462 if (degrees > (90 + threshold) && degrees < 180) { in getRotationForUserDegreesRotated() 466 if (degrees > (180 + threshold) && degrees < 360) { in getRotationForUserDegreesRotated() 471 if (degrees < (180 - threshold)) { in getRotationForUserDegreesRotated() 474 if (degrees > (180 + threshold)) { in getRotationForUserDegreesRotated() 479 if (degrees < (270 - threshold) && degrees > 90) { in getRotationForUserDegreesRotated() [all …]
|
/packages/services/Car/cpp/watchdog/server/src/ |
D | IoOveruseMonitor.cpp | 127 PerStateBytes threshold) { in calculateOveruseAndForgivenBytes() argument 140 int32_t foregroundOveruses = div(writtenBytes.foregroundBytes, threshold.foregroundBytes); in calculateOveruseAndForgivenBytes() 141 int32_t backgroundOveruses = div(writtenBytes.backgroundBytes, threshold.backgroundBytes); in calculateOveruseAndForgivenBytes() 142 int32_t garageModeOveruses = div(writtenBytes.garageModeBytes, threshold.garageModeBytes); in calculateOveruseAndForgivenBytes() 146 forgivenWriteBytes.foregroundBytes = mul(foregroundOveruses, threshold.foregroundBytes); in calculateOveruseAndForgivenBytes() 147 forgivenWriteBytes.backgroundBytes = mul(backgroundOveruses, threshold.backgroundBytes); in calculateOveruseAndForgivenBytes() 148 forgivenWriteBytes.garageModeBytes = mul(garageModeOveruses, threshold.garageModeBytes); in calculateOveruseAndForgivenBytes() 280 const auto threshold = mIoOveruseConfigs->fetchThreshold(dailyIoUsage->packageInfo); in onPeriodicCollection() local 285 calculateOveruseAndForgivenBytes(deltaWrittenBytes, threshold); in onPeriodicCollection() 298 stats.ioOveruseStats.remainingWriteBytes = diff(threshold, deltaWrittenBytes); in onPeriodicCollection() [all …]
|
D | IoOveruseConfigs.h | 56 android::automotive::watchdog::internal::PerStateIoOveruseThreshold threshold; in defaultThreshold() local 57 threshold.name = kDefaultThresholdName; in defaultThreshold() 58 threshold.perStateWriteBytes.foregroundBytes = std::numeric_limits<int64_t>::max(); in defaultThreshold() 59 threshold.perStateWriteBytes.backgroundBytes = std::numeric_limits<int64_t>::max(); in defaultThreshold() 60 threshold.perStateWriteBytes.garageModeBytes = std::numeric_limits<int64_t>::max(); in defaultThreshold() 61 return threshold; in defaultThreshold() 112 threshold) const;
|
D | IoOveruseConfigs.cpp | 108 Result<void> containsValidThreshold(const IoOveruseAlertThreshold& threshold) { in containsValidThreshold() argument 109 if (threshold.durationInSeconds <= 0) { in containsValidThreshold() 112 if (threshold.writtenBytesPerSecond <= 0) { in containsValidThreshold() 149 for (const auto& threshold : ioOveruseConfig.systemWideThresholds) { in isValidIoOveruseConfiguration() local 150 if (auto result = containsValidThreshold(threshold); !result.ok()) { in isValidIoOveruseConfiguration() 347 const IoOveruseAlertThreshold& threshold) const { in operator ()() 348 return std::hash<std::string>{}(std::to_string(threshold.durationInSeconds)); in operator ()() 627 for (const auto& [packageName, threshold] : componentSpecificConfig.mPerPackageThresholds) { in get() 628 ioOveruseConfiguration.packageSpecificThresholds.push_back(threshold); in get() 636 for (const auto& [category, threshold] : mPerCategoryThresholds) { in get() [all …]
|
D | OveruseConfigurationXmlHelper.cpp | 294 PerStateIoOveruseThreshold threshold; in readPerStateThresholds() local 298 } else if (threshold.name = name; threshold.name.empty()) { in readPerStateThresholds() 302 threshold.perStateWriteBytes = *result; in readPerStateThresholds() 304 return Error() << "Failed to read thresholds for id '" << threshold.name in readPerStateThresholds() 307 thresholds.push_back(threshold); in readPerStateThresholds() 578 for (const auto threshold : thresholds) { in writePackageSpecificThresholds() local 579 if (const auto result = writePerStateThresholds(threshold, childElement); !result.ok()) { in writePackageSpecificThresholds() 580 return Error() << "Failed to write per-state thresholds for '" << threshold.name in writePackageSpecificThresholds() 595 for (const auto threshold : thresholds) { in writeAppCategorySpecificThresholds() local 596 if (const auto result = writePerStateThresholds(threshold, childElement); !result.ok()) { in writeAppCategorySpecificThresholds() [all …]
|
/packages/services/Car/cpp/watchdog/server/tests/ |
D | OveruseConfigurationTestUtils.cpp | 117 PerStateIoOveruseThreshold threshold; in toPerStateIoOveruseThreshold() local 118 threshold.name = name; in toPerStateIoOveruseThreshold() 119 threshold.perStateWriteBytes = perStateBytes; in toPerStateIoOveruseThreshold() 120 return threshold; in toPerStateIoOveruseThreshold() 151 IoOveruseAlertThreshold threshold; in toIoOveruseAlertThreshold() local 152 threshold.durationInSeconds = durationInSeconds; in toIoOveruseAlertThreshold() 153 threshold.writtenBytesPerSecond = writtenBytesPerSecond; in toIoOveruseAlertThreshold() 154 return threshold; in toIoOveruseAlertThreshold()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/ |
D | ContactMatcher.java | 232 float threshold = emailBased in matchName() local 235 if (distance > threshold) { in matchName() 284 public List<Long> prepareSecondaryMatchCandidates(int threshold) { in prepareSecondaryMatchCandidates() argument 294 if (s >= threshold) { in prepareSecondaryMatchCandidates() 311 public long pickBestMatch(int threshold, boolean allowMultipleMatches) { in pickBestMatch() argument 329 if (s >= threshold) { in pickBestMatch() 347 public List<MatchScore> pickBestMatches(int threshold) { in pickBestMatches() argument 348 int scaledThreshold = threshold * MatchScore.SCORE_SCALE; in pickBestMatches()
|
/packages/modules/StatsD/statsd/tests/e2e/ |
D | Anomaly_count_e2e_test.cpp | 32 StatsdConfig CreateStatsdConfig(int num_buckets, int threshold, int refractory_period_sec) { in CreateStatsdConfig() argument 51 alert->set_trigger_if_sum_gt(threshold); in CreateStatsdConfig() 59 const int threshold = 3; in TEST() local 61 auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec); in TEST() 176 const int threshold = 3; in TEST() local 178 auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec); in TEST() 246 const int threshold = 0; in TEST() local 248 auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec); in TEST() 271 const int threshold = 0; in TEST() local 273 auto config = CreateStatsdConfig(num_buckets, threshold, refractory_period_sec); in TEST() [all …]
|
D | ConfigTtl_e2e_test.cpp | 31 StatsdConfig CreateStatsdConfig(int num_buckets, int threshold) { in CreateStatsdConfig() argument 50 alert->set_trigger_if_sum_gt(threshold); in CreateStatsdConfig() 61 const int threshold = 3; in TEST() local 62 auto config = CreateStatsdConfig(num_buckets, threshold); in TEST()
|
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/ |
D | UsageBytesThresholdPickerDialog.java | 148 void setThresholdEditor(long threshold) { in setThresholdEditor() argument 149 updateCurrentView(threshold); in setThresholdEditor() 152 private void updateCurrentView(long threshold) { in updateCurrentView() argument 154 if (threshold > MB_GB_SUFFIX_THRESHOLD * GIB_IN_BYTES) { in updateCurrentView() 155 bytesText = formatText(threshold / (float) GIB_IN_BYTES); in updateCurrentView() 158 bytesText = formatText(threshold / (float) MIB_IN_BYTES); in updateCurrentView()
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/ |
D | ContextualCardFeatureProviderImpl.java | 46 final long threshold = System.currentTimeMillis() - DateUtils.DAY_IN_MILLIS; in getContextualCards() local 49 final String[] selectionArgs = {String.valueOf(threshold)}; in getContextualCards() 53 ThreadUtils.postOnBackgroundThread(() -> resetDismissedTime(threshold)); in getContextualCards() 70 int resetDismissedTime(long threshold) { in resetDismissedTime() argument 77 final String[] selectionArgs = {String.valueOf(threshold)}; in resetDismissedTime()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/watchdog/ |
D | InternalIoOveruseConfigurationSubject.java | 105 public static String toString(PerStateIoOveruseThreshold threshold) { in toString() argument 107 builder.append("{Name: ").append(threshold.name).append(", WriteBytes: "); in toString() 108 InternalPerStateBytesSubject.toStringBuilder(builder, threshold.perStateWriteBytes); in toString() 113 public static String toString(IoOveruseAlertThreshold threshold) { in toString() argument 115 builder.append("{durationInSeconds: ").append(threshold.durationInSeconds) in toString() 116 .append(", writtenBytesPerSecond: ").append(threshold.writtenBytesPerSecond) in toString()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/ |
D | ProximityInfo.java | 248 final int threshold = (int) (defaultWidth * SEARCH_DISTANCE); in computeNearestNeighbors() local 249 final int thresholdSquared = threshold * threshold; in computeNearestNeighbors() 330 final int topPixelWithinThreshold = keyY - threshold; in computeNearestNeighbors() 335 final int yEnd = Math.min(lastPixelYCoordinate, keyY + key.getHeight() + threshold); in computeNearestNeighbors() 337 final int leftPixelWithinThreshold = keyX - threshold; in computeNearestNeighbors() 342 final int xEnd = Math.min(lastPixelXCoordinate, keyX + key.getWidth() + threshold); in computeNearestNeighbors()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | AutoCorrectionUtils.java | 33 final String consideredWord, final float threshold) { in suggestionExceedsThreshold() argument 51 + "(" + threshold + ")"); in suggestionExceedsThreshold() 53 if (normalizedScore >= threshold) { in suggestionExceedsThreshold()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | MessageTextStats.java | 63 final int threshold = mmsConfig.getSmsToMmsTextThreshold(); in updateMessageTextStats() local 64 mMessageLengthRequiresMms = threshold > 0 && mMessageCount > threshold; in updateMessageTextStats()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/ |
D | ContextualCardFeatureProviderImplTest.java | 90 final long threshold = 1000L; in resetDismissedTime_durationExpired_shouldResetToNull() local 92 final int rowsUpdated = mImpl.resetDismissedTime(threshold); in resetDismissedTime_durationExpired_shouldResetToNull() 101 final long threshold = 1000L; in resetDismissedTime_durationNotExpired_shouldNotUpdate() local 103 final int rowsUpdated = mImpl.resetDismissedTime(threshold); in resetDismissedTime_durationNotExpired_shouldNotUpdate()
|
/packages/apps/Camera2/src/com/android/camera/app/ |
D | MemoryQuery.java | 73 long threshold = memoryInfo.threshold / BYTES_IN_MEGABYTE; in queryMemory() local 117 outputData.put(KEY_THRESHOLD, new Long(threshold)); in queryMemory() 124 threshold, lowMemory)); in queryMemory()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterysaver/ |
D | BatterySaverSchedulePreferenceController.java | 67 final int threshold = in getSummary() local 69 if (threshold <= 0) { in getSummary() 73 Utils.formatPercentage(threshold)); in getSummary()
|
D | BatterySaverScheduleSeekBarController.java | 89 final int threshold = in updateSeekBar() local 91 if (threshold <= 0) { in updateSeekBar() 94 final int currentSeekbarValue = Math.max(threshold / 5, MIN_SEEKBAR_VALUE); in updateSeekBar()
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/hint/ |
D | AnswerHintFactory.java | 97 long threshold = in shouldShowAnswerHint() local 105 threshold); in shouldShowAnswerHint() 106 return answeredCount < threshold; in shouldShowAnswerHint()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | DataRepository.kt | 94 trimInactiveData(threshold = when (level) { in <lambda>() 119 private fun trimInactiveData(threshold: Long) { in <lambda>() 122 if (data[key]?.timeInactive?.let { it >= threshold } == true) { in <lambda>()
|
/packages/apps/Launcher3/src/com/android/launcher3/views/ |
D | ScrimView.java | 121 final float threshold = STATUS_BAR_COLOR_FORCE_UPDATE_THRESHOLD; in updateSysUiColors() local 123 && getAlpha() > threshold in updateSysUiColors() 124 && (Color.alpha(mBackgroundColor) / 255f) > threshold; in updateSysUiColors()
|