Home
last modified time | relevance | path

Searched refs:thresholds (Results 1 – 25 of 36) sorted by relevance

12

/packages/modules/Wifi/framework/java/android/net/wifi/
DWifiNetworkSelectionConfig.java175 private static boolean isValidRssiThresholdArray(int[] thresholds) { in isValidRssiThresholdArray() argument
176 if (thresholds == null || thresholds.length != 4) return false; in isValidRssiThresholdArray()
178 if (!isRssiThresholdResetArray(thresholds)) { in isValidRssiThresholdArray()
181 for (int i = 0; i < thresholds.length; i++) { in isValidRssiThresholdArray()
182 if (thresholds[i] <= low || thresholds[i] > high) { in isValidRssiThresholdArray()
185 low = thresholds[i]; in isValidRssiThresholdArray()
205 public static boolean isRssiThresholdResetArray(@NonNull int[] thresholds) { in isRssiThresholdResetArray() argument
206 for (int value : thresholds) { in isRssiThresholdResetArray()
436 public @NonNull Builder setRssiThresholds(@WifiBand int band, @NonNull int[] thresholds) in setRssiThresholds() argument
438 if (!isValidRssiThresholdArray(thresholds)) { in setRssiThresholds()
[all …]
/packages/modules/Telephony/services/QualifiedNetworksService/src/com/android/telephony/qns/
DQnsCarrierAnspSupportConfig.java1029 private int[] validateAndAdjustThresholdArray(int[] thresholds, String thresholdKey) { in validateAndAdjustThresholdArray() argument
1030 if (thresholds[POLICY_GOOD] != QnsCarrierConfigManager.QnsConfigArray.INVALID in validateAndAdjustThresholdArray()
1031 && thresholds[POLICY_BAD] != QnsCarrierConfigManager.QnsConfigArray.INVALID in validateAndAdjustThresholdArray()
1032 && thresholds[POLICY_GOOD] - thresholds[POLICY_BAD] < MIN_THRESHOLD_GAP) { in validateAndAdjustThresholdArray()
1033 if (thresholds[POLICY_GOOD] - thresholds[POLICY_BAD] < 0) { in validateAndAdjustThresholdArray()
1036 } else if (thresholds[POLICY_GOOD] - thresholds[POLICY_BAD] < MIN_THRESHOLD_GAP) { in validateAndAdjustThresholdArray()
1037 int currentGap = thresholds[POLICY_GOOD] - thresholds[POLICY_BAD]; in validateAndAdjustThresholdArray()
1038 int[] adjust = thresholds.clone(); in validateAndAdjustThresholdArray()
1052 + thresholds[POLICY_GOOD] in validateAndAdjustThresholdArray()
1057 + thresholds[POLICY_BAD] in validateAndAdjustThresholdArray()
[all …]
DThresholdCallback.java34 void onWifiThresholdChanged(Threshold[] thresholds); in onWifiThresholdChanged() argument
38 void onCellularThresholdChanged(Threshold[] thresholds); in onCellularThresholdChanged() argument
51 public void onWifiThresholdChanged(Threshold[] thresholds) { in onWifiThresholdChanged() argument
58 mExecutor.execute(() -> listener.onWifiThresholdChanged(thresholds)); in onWifiThresholdChanged()
62 public void onCellularThresholdChanged(Threshold[] thresholds) { in onCellularThresholdChanged() argument
69 mExecutor.execute(() -> listener.onCellularThresholdChanged(thresholds)); in onCellularThresholdChanged()
DAccessNetworkSelectionPolicyBuilder.java317 List<ThresholdGroup> thresholdGroups, List<Threshold> thresholds) { in addThresholdGroup() argument
319 if (thresholdGroup.identicalThreshold(thresholds)) { in addThresholdGroup()
323 thresholdGroups.add(new ThresholdGroup(thresholds)); in addThresholdGroup()
428 QnsConfigArray thresholds = in getThreshold() local
434 if (thresholds == null) { in getThreshold()
439 return thresholds.mGood; in getThreshold()
441 return thresholds.mBad; in getThreshold()
443 if (thresholds.mWorst != QnsConfigArray.INVALID) { in getThreshold()
444 return thresholds.mWorst; in getThreshold()
446 return thresholds.mBad; in getThreshold()
[all …]
DIThresholdListener.java27 void onWifiThresholdChanged(Threshold[] thresholds); in onWifiThresholdChanged() argument
33 void onCellularThresholdChanged(Threshold[] thresholds); in onCellularThresholdChanged() argument
DQnsCarrierConfigManager.java786 QnsConfigArray thresholds, int accessNetwork, int measurementType, int callType) { in applyProvisioningInfo() argument
789 && thresholds.mBad != QnsConfigArray.INVALID in applyProvisioningInfo()
793 Log.d(mLogTag, "provisioning bad THLTE1 old:" + thresholds.mBad + " new:" + bad); in applyProvisioningInfo()
794 thresholds.mBad = bad; in applyProvisioningInfo()
797 && thresholds.mWorst != QnsConfigArray.INVALID in applyProvisioningInfo()
802 Log.d(mLogTag, "provisioning worst THLTE2 old:" + thresholds.mWorst + " new:" + worst); in applyProvisioningInfo()
803 thresholds.mWorst = worst; in applyProvisioningInfo()
806 && thresholds.mGood != QnsConfigArray.INVALID in applyProvisioningInfo()
810 Log.d(mLogTag, "provisioning good THLTE3 old:" + thresholds.mGood + " new:" + good); in applyProvisioningInfo()
811 thresholds.mGood = good; in applyProvisioningInfo()
[all …]
DAccessNetworkEvaluator.java1675 private void registerThresholdsToQualityMonitor(List<Threshold> thresholds) { in registerThresholdsToQualityMonitor() argument
1676 if (thresholds == null) { in registerThresholdsToQualityMonitor()
1677 thresholds = new ArrayList<>(); in registerThresholdsToQualityMonitor()
1682 for (Threshold th : thresholds) { in registerThresholdsToQualityMonitor()
2082 public void onWifiThresholdChanged(Threshold[] thresholds) { in onWifiThresholdChanged() argument
2083 onWiFiQualityChanged(thresholds); in onWifiThresholdChanged()
2087 public void onCellularThresholdChanged(Threshold[] thresholds) { in onCellularThresholdChanged() argument
2088 onCellularQualityChanged(thresholds); in onCellularThresholdChanged()
/packages/services/Car/cpp/watchdog/server/src/
DOveruseConfigurationXmlHelper.cpp276 PerStateIoOveruseThreshold thresholds; in readComponentLevelThresholds() local
277 thresholds.name = toString(componentType); in readComponentLevelThresholds()
279 thresholds.perStateWriteBytes = *result; in readComponentLevelThresholds()
282 << thresholds.name << "': " << result.error(); in readComponentLevelThresholds()
284 return thresholds; in readComponentLevelThresholds()
289 std::vector<PerStateIoOveruseThreshold> thresholds; in readPerStateThresholds() local
306 thresholds.push_back(threshold); in readPerStateThresholds()
308 return thresholds; in readPerStateThresholds()
313 std::vector<PerStateIoOveruseThreshold> thresholds; in readPackageSpecificThresholds() local
319 thresholds.insert(thresholds.end(), result->begin(), result->end()); in readPackageSpecificThresholds()
[all …]
DIoOveruseConfigs.cpp84 std::string toString(const PerStateIoOveruseThreshold& thresholds) { in toString() argument
87 thresholds.name.c_str(), thresholds.perStateWriteBytes.foregroundBytes, in toString()
88 thresholds.perStateWriteBytes.backgroundBytes, in toString()
89 thresholds.perStateWriteBytes.garageModeBytes); in toString()
92 Result<void> containsValidThresholds(const PerStateIoOveruseThreshold& thresholds) { in containsValidThresholds() argument
93 if (thresholds.name.empty()) { in containsValidThresholds()
97 if (thresholds.perStateWriteBytes.foregroundBytes <= 0 || in containsValidThresholds()
98 thresholds.perStateWriteBytes.backgroundBytes <= 0 || in containsValidThresholds()
99 thresholds.perStateWriteBytes.garageModeBytes <= 0) { in containsValidThresholds()
101 << toString(thresholds); in containsValidThresholds()
[all …]
DIoOveruseConfigs.h154 thresholds,
251 thresholds);
255 thresholds);
/packages/services/Car/cpp/watchdog/stable_server/src/
DOveruseConfigurationXmlHelper.cpp276 PerStateIoOveruseThreshold thresholds; in readComponentLevelThresholds() local
277 thresholds.name = toString(componentType); in readComponentLevelThresholds()
279 thresholds.perStateWriteBytes = *result; in readComponentLevelThresholds()
282 << thresholds.name << "': " << result.error(); in readComponentLevelThresholds()
284 return thresholds; in readComponentLevelThresholds()
289 std::vector<PerStateIoOveruseThreshold> thresholds; in readPerStateThresholds() local
306 thresholds.push_back(threshold); in readPerStateThresholds()
308 return thresholds; in readPerStateThresholds()
313 std::vector<PerStateIoOveruseThreshold> thresholds; in readPackageSpecificThresholds() local
319 thresholds.insert(thresholds.end(), result->begin(), result->end()); in readPackageSpecificThresholds()
[all …]
DIoOveruseConfigs.cpp84 std::string toString(const PerStateIoOveruseThreshold& thresholds) { in toString() argument
87 thresholds.name.c_str(), thresholds.perStateWriteBytes.foregroundBytes, in toString()
88 thresholds.perStateWriteBytes.backgroundBytes, in toString()
89 thresholds.perStateWriteBytes.garageModeBytes); in toString()
92 Result<void> containsValidThresholds(const PerStateIoOveruseThreshold& thresholds) { in containsValidThresholds() argument
93 if (thresholds.name.empty()) { in containsValidThresholds()
97 if (thresholds.perStateWriteBytes.foregroundBytes <= 0 || in containsValidThresholds()
98 thresholds.perStateWriteBytes.backgroundBytes <= 0 || in containsValidThresholds()
99 thresholds.perStateWriteBytes.garageModeBytes <= 0) { in containsValidThresholds()
101 << toString(thresholds); in containsValidThresholds()
[all …]
DIoOveruseConfigs.h154 thresholds,
251 thresholds);
255 thresholds);
/packages/modules/Telephony/services/QualifiedNetworksService/tests/src/com/android/telephony/qns/
DCellularQualityMonitorTest.java89 public void onCellularThresholdChanged(Threshold[] thresholds) { in onCellularThresholdChanged() argument
90 mOutputThs = thresholds; in onCellularThresholdChanged()
308 int[] thresholds = new int[] {-110, -112, -99, -100, -70}; in testDiffApnDiffThresholdSameMeasurementType() local
317 thresholds[0], in testDiffApnDiffThresholdSameMeasurementType()
326 thresholds[1], in testDiffApnDiffThresholdSameMeasurementType()
332 thresholds[2], in testDiffApnDiffThresholdSameMeasurementType()
341 thresholds[3], in testDiffApnDiffThresholdSameMeasurementType()
347 thresholds[4], in testDiffApnDiffThresholdSameMeasurementType()
354 Assert.assertArrayEquals(new int[] {thresholds[0]}, stInfo.get(0).getThresholds()); in testDiffApnDiffThresholdSameMeasurementType()
359 int[] th_array = new int[] {thresholds[0], thresholds[1], thresholds[2]}; in testDiffApnDiffThresholdSameMeasurementType()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DRssiUtil.java50 int[] thresholds = getRssiLevelThresholds(context); in calculateSignalLevel() local
52 for (int level = 0; level < thresholds.length; level++) { in calculateSignalLevel()
53 if (rssi < thresholds[level]) { in calculateSignalLevel()
57 return thresholds.length; in calculateSignalLevel()
/packages/modules/ImsMedia/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/include/audio/
DMediaQualityAnalyzer.h57 bool checkNotifiable(std::vector<int32_t> thresholds, int32_t currentValue) in checkNotifiable() argument
59 if (thresholds.empty()) in checkNotifiable()
67 auto iterCrossed = find_if(thresholds.begin(), thresholds.end(), in checkNotifiable()
74 if (iterCrossed != thresholds.end()) in checkNotifiable()
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DTestableNetworkAgent.kt215 data class OnSignalStrengthThresholdsUpdated(val thresholds: IntArray) : CallbackEntry() constant in CallbackEntry.OnSignalStrengthThresholdsUpdated
262 override fun onSignalStrengthThresholdsUpdated(thresholds: IntArray) { in onSignalStrengthThresholdsUpdated()
263 history.add(OnSignalStrengthThresholdsUpdated(thresholds)) in onSignalStrengthThresholdsUpdated()
266 fun expectSignalStrengths(thresholds: IntArray? = intArrayOf()) { in expectSignalStrengths()
268 assertArrayEquals(thresholds, it.thresholds) in expectSignalStrengths()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/watchdog/
DInternalIoOveruseConfigurationSubject.java142 List<PerStateIoOveruseThreshold> thresholds) { in toPerStateThresholdStrings() argument
143 return thresholds.stream().map(x -> String.format("%s:{%d,%d,%d}", x.name, in toPerStateThresholdStrings()
150 List<IoOveruseAlertThreshold> thresholds) { in toAlertThresholdStrings() argument
151 return thresholds.stream().map(x -> String.format("%d:%d", x.durationInSeconds, in toAlertThresholdStrings()
DIoOveruseConfigurationSubject.java121 private static Set<String> toAlertThresholdStrings(List<IoOveruseAlertThreshold> thresholds) { in toAlertThresholdStrings() argument
122 return thresholds.stream().map(x -> String.format("%d:%d", x.getDurationInSeconds(), in toAlertThresholdStrings()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DWifiNetworkAgent.java47 void onSignalStrengthThresholdsUpdated(@NonNull int[] thresholds); in onSignalStrengthThresholdsUpdated() argument
122 public void onSignalStrengthThresholdsUpdated(@NonNull int[] thresholds) { in onSignalStrengthThresholdsUpdated() argument
123 mCallback.onSignalStrengthThresholdsUpdated(thresholds); in onSignalStrengthThresholdsUpdated()
/packages/services/Car/service/src/com/android/car/watchdog/
DOveruseConfigurationCache.java393 List<PerStateIoOveruseThreshold> thresholds) { in setIoThresholdsByAppCategoryTypeLocked() argument
394 for (int i = 0; i < thresholds.size(); ++i) { in setIoThresholdsByAppCategoryTypeLocked()
395 PerStateIoOveruseThreshold threshold = thresholds.get(i); in setIoThresholdsByAppCategoryTypeLocked()
414 private void populateThresholdsByPackagesLocked(List<PerStateIoOveruseThreshold> thresholds, in populateThresholdsByPackagesLocked() argument
416 for (int i = 0; i < thresholds.size(); ++i) { in populateThresholdsByPackagesLocked()
418 thresholds.get(i).name, thresholds.get(i).perStateWriteBytes); in populateThresholdsByPackagesLocked()
DWatchdogPerfHandler.java2756 Map<String, PerStateBytes> thresholds) { in toPerStateIoOveruseThresholds() argument
2758 for (Map.Entry<String, PerStateBytes> entry : thresholds.entrySet()) { in toPerStateIoOveruseThresholds()
2759 if (!thresholds.isEmpty()) { in toPerStateIoOveruseThresholds()
2779 toInternalIoOveruseAlertThresholds(List<IoOveruseAlertThreshold> thresholds) { in toInternalIoOveruseAlertThresholds() argument
2782 for (int i = 0; i < thresholds.size(); ++i) { in toInternalIoOveruseAlertThresholds()
2783 if (thresholds.get(i).getDurationInSeconds() == 0 in toInternalIoOveruseAlertThresholds()
2784 || thresholds.get(i).getWrittenBytesPerSecond() == 0) { in toInternalIoOveruseAlertThresholds()
2789 internalThreshold.durationInSeconds = thresholds.get(i).getDurationInSeconds(); in toInternalIoOveruseAlertThresholds()
2790 internalThreshold.writtenBytesPerSecond = thresholds.get(i).getWrittenBytesPerSecond(); in toInternalIoOveruseAlertThresholds()
2855 List<PerStateIoOveruseThreshold> thresholds) { in toPerStateBytesMap() argument
[all …]
/packages/modules/Connectivity/framework/src/android/net/
DNetworkAgent.java911 public void onSignalStrengthThresholdsUpdated(@NonNull int[] thresholds) { in onSignalStrengthThresholdsUpdated() argument
913 CMD_SET_SIGNAL_STRENGTH_THRESHOLDS, thresholds)); in onSignalStrengthThresholdsUpdated()
1525 public void onSignalStrengthThresholdsUpdated(@NonNull int[] thresholds) { in onSignalStrengthThresholdsUpdated() argument
1526 setSignalStrengthThresholds(thresholds); in onSignalStrengthThresholdsUpdated()
1529 protected void setSignalStrengthThresholds(int[] thresholds) { in setSignalStrengthThresholds() argument
DINetworkAgent.aidl40 void onSignalStrengthThresholdsUpdated(in int[] thresholds); in onSignalStrengthThresholdsUpdated() argument
/packages/services/Car/tools/ioanalyze/
Danalyzer.py63 thresholds = [ variable
71 for t in thresholds:

12