/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | NetworkRankerTest.kt | 36 private fun score(vararg policies: Int) = FullScore(0, in <lambda>() method 55 val winner = TestScore(score(POLICY_YIELD_TO_BAD_WIFI, POLICY_IS_VALIDATED), in caps() 64 val winner = TestScore(score(POLICY_EVER_VALIDATED_NOT_AVOIDED_WHEN_BAD), in caps() 68 TestScore(score(POLICY_YIELD_TO_BAD_WIFI, POLICY_IS_VALIDATED), in caps() 77 val winner = TestScore(score(POLICY_EVER_VALIDATED_NOT_AVOIDED_WHEN_BAD, in caps() 81 TestScore(score(POLICY_EVER_VALIDATED_NOT_AVOIDED_WHEN_BAD), in caps() 83 TestScore(score(POLICY_YIELD_TO_BAD_WIFI, POLICY_IS_VALIDATED), in caps() 93 val winner = TestScore(score(POLICY_EVER_VALIDATED_NOT_AVOIDED_WHEN_BAD), in caps() 97 TestScore(score(), caps(TRANSPORT_WIFI)), in caps() 98 TestScore(score(POLICY_YIELD_TO_BAD_WIFI, POLICY_IS_VALIDATED), in caps() [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/ |
D | RawContactMatcher.java | 226 int score; in matchName() local 234 score = (int)(minScore + (maxScore - minScore) * (1.0f - distance)); in matchName() 236 score = 0; in matchName() 239 updatePrimaryScore(rawContactId, contactId, accountId, score); in matchName() 258 private void updatePrimaryScore(long rawContactId, long contactId, long accountId, int score) { in updatePrimaryScore() argument 259 getMatchingScore(rawContactId, contactId, accountId).updatePrimaryScore(score); in updatePrimaryScore() 263 int score) { in updateSecondaryScore() argument 264 getMatchingScore(rawContactId, contactId, accountId).updateSecondaryScore(score); in updateSecondaryScore() 290 MatchScore score = mScoreList.get(i); in prepareSecondaryMatchCandidates() local 291 if (score.isKeepOut() || score.getPrimaryScore() > SCORE_THRESHOLD_PRIMARY){ in prepareSecondaryMatchCandidates() [all …]
|
D | ContactMatcher.java | 228 int score; in matchName() local 236 score = (int)(minScore + (maxScore - minScore) * (1.0f - distance)); in matchName() 238 score = 0; in matchName() 241 updatePrimaryScore(contactId, score); in matchName() 256 private void updatePrimaryScore(long contactId, int score) { in updatePrimaryScore() argument 257 getMatchingScore(contactId).updatePrimaryScore(score); in updatePrimaryScore() 260 private void updateSecondaryScore(long contactId, int score) { in updateSecondaryScore() argument 261 getMatchingScore(contactId).updateSecondaryScore(score); in updateSecondaryScore() 288 MatchScore score = mScoreList.get(i); in prepareSecondaryMatchCandidates() local 289 if (score.isKeepOut()) { in prepareSecondaryMatchCandidates() [all …]
|
D | MatchScore.java | 78 public void updatePrimaryScore(int score) { in updatePrimaryScore() argument 79 if (score > mPrimaryScore) { in updatePrimaryScore() 80 mPrimaryScore = score; in updatePrimaryScore() 85 public void updateSecondaryScore(int score) { in updateSecondaryScore() argument 86 if (score > mSecondaryScore) { in updateSecondaryScore() 87 mSecondaryScore = score; in updateSecondaryScore() 109 int score = (mPrimaryScore > mSecondaryScore ? mPrimaryScore : mSecondaryScore); in getScore() local 113 return score * SCORE_SCALE + mMatchCount; in getScore()
|
D | RawContactMatchingCandidates.java | 51 public void add(MatchScore score) { in add() argument 52 mBestMatches.add(score); in add() 54 mRawContactIds.add(score.getRawContactId()); in add() 57 mRawContactToAccount.put(score.getRawContactId(), score.getAccountId()); in add() 60 mRawContactToContact.put(score.getRawContactId(), score.getContactId()); in add()
|
/packages/modules/Connectivity/service/src/com/android/server/connectivity/ |
D | FullScore.java | 157 public static FullScore fromNetworkScore(@NonNull final NetworkScore score, in fromNetworkScore() argument 160 return withPolicies(score.getLegacyInt(), score.getPolicies(), in fromNetworkScore() 161 score.getKeepConnectedReason(), in fromNetworkScore() 185 public static FullScore makeProspectiveScore(@NonNull final NetworkScore score, in makeProspectiveScore() argument 204 final boolean invincible = score.getLegacyInt() > NetworkRanker.LEGACY_INT_MAX; in makeProspectiveScore() 205 return withPolicies(score.getLegacyInt(), score.getPolicies(), KEEP_CONNECTED_NONE, in makeProspectiveScore() 300 int score = mLegacyInt; in getLegacyInt() local 304 score -= UNVALIDATED_SCORE_PENALTY; in getLegacyInt() 306 if (score < 0) score = 0; in getLegacyInt() 307 return score; in getLegacyInt()
|
D | NetworkOffer.java | 44 @NonNull public final FullScore score; field in NetworkOffer 59 public NetworkOffer(@NonNull final FullScore score, in NetworkOffer() argument 63 this.score = Objects.requireNonNull(score); in NetworkOffer() 73 return score; in getScore() 146 return "NetworkOffer [ Score " + score + " Caps " + caps + "]"; in toString()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | ScoredNetworkNominator.java | 237 int score = mScoreCache.getNetworkScore(scanResult, isCurrentNetwork); in getNetworkScore() local 240 + score + " isCurrentNetwork network: " + isCurrentNetwork); in getNetworkScore() 242 return score; in getNetworkScore() 250 Integer score = getNetworkScore(scanResult, false /* isCurrentNetwork */); in trackUntrustedCandidate() local 251 if (score != null && score > mHighScore) { in trackUntrustedCandidate() 252 mHighScore = score; in trackUntrustedCandidate() 267 Integer score = getNetworkScore(scanResult, isCurrentNetwork); in trackUntrustedCandidate() local 268 if (score != null && score > mHighScore) { in trackUntrustedCandidate() 269 mHighScore = score; in trackUntrustedCandidate() 288 Integer score = getNetworkScore(scanResult, isCurrentNetwork); in trackExternallyScoredCandidate() local [all …]
|
D | WifiScoreReport.java | 123 public void notifyScoreUpdate(int sessionId, int score) { in notifyScoreUpdate() argument 130 + " score=" + score); in notifyScoreUpdate() 135 mLegacyIntScore = score; in notifyScoreUpdate() 139 if (score < ConnectedScore.WIFI_TRANSITION_SCORE) { in notifyScoreUpdate() 146 if (score > ConnectedScore.WIFI_TRANSITION_SCORE) { in notifyScoreUpdate() 153 mLegacyIntScore = score; in notifyScoreUpdate() 549 int score; in calculateAndReportScore() local 555 score = s2; in calculateAndReportScore() 558 && score <= ConnectedScore.WIFI_TRANSITION_SCORE in calculateAndReportScore() 564 score = ConnectedScore.WIFI_TRANSITION_SCORE + 1; in calculateAndReportScore() [all …]
|
D | CompatibilityScorer.java | 81 int score = (rssi + RSSI_SCORE_OFFSET) * RSSI_SCORE_SLOPE_IS_4; in scoreCandidate() local 84 score += BAND_6GHZ_AWARD_IS_40; in scoreCandidate() 86 score += BAND_5GHZ_AWARD_IS_40; in scoreCandidate() 88 score += (int) (candidate.getLastSelectionWeight() * LAST_SELECTION_AWARD_IS_480); in scoreCandidate() 92 score += CURRENT_NETWORK_BOOST_IS_16 + SAME_BSSID_AWARD_IS_24; in scoreCandidate() 96 score += SECURITY_AWARD_IS_80; in scoreCandidate() 101 score -= 1000 * candidate.getNominatorId(); in scoreCandidate() 106 return new ScoredCandidate(score + tieBreaker, 10, in scoreCandidate()
|
D | BubbleFunScorer.java | 66 double score = shapeFunction(rssi) - shapeFunction(rssiEntryThreshold); in scoreCandidate() local 69 if (score < 0.0) score *= 2.0; in scoreCandidate() 79 score *= LOW_BAND_FACTOR; in scoreCandidate() 84 score += candidate.getLastSelectionWeight() * LAST_SELECTION_BOOST; in scoreCandidate() 88 score += CURRENT_NETWORK_BOOST; in scoreCandidate() 92 score += SECURITY_AWARD; in scoreCandidate() 95 return new ScoredCandidate(score, TYPICAL_SCAN_RSSI_STD * gain, in scoreCandidate()
|
D | ScoreCardBasedScorer.java | 90 int score = (rssi - cutoff) * RSSI_SCORE_SLOPE_IS_4; in scoreCandidate() local 93 score += BAND_6GHZ_AWARD_IS_40; in scoreCandidate() 95 score += BAND_5GHZ_AWARD_IS_40; in scoreCandidate() 97 score += (int) (candidate.getLastSelectionWeight() * LAST_SELECTION_AWARD_IS_480); in scoreCandidate() 100 score += CURRENT_NETWORK_BOOST_IS_16 + SAME_BSSID_AWARD_IS_24; in scoreCandidate() 104 score += SECURITY_AWARD_IS_80; in scoreCandidate() 109 score -= 1000 * candidate.getNominatorId(); in scoreCandidate() 111 return new ScoredCandidate(score, 10, in scoreCandidate()
|
D | WifiNetworkScoreCache.java | 152 int score = INVALID_NETWORK_SCORE; in getNetworkScore() local 156 score = network.rssiCurve.lookupScore(result.level); in getNetworkScore() 159 + " score " + Integer.toString(score) in getNetworkScore() 163 return score; in getNetworkScore() 180 int score = INVALID_NETWORK_SCORE; in getNetworkScore() local 184 score = network.rssiCurve.lookupScore(result.level, isActiveNetwork); in getNetworkScore() 187 + " score " + Integer.toString(score) in getNetworkScore() 192 return score; in getNetworkScore() 270 for (ScoredNetwork score : mCache.snapshot().values()) { in dumpWithLatestScanResults() 271 writer.println(" " + score); in dumpWithLatestScanResults()
|
/packages/apps/TV/src/com/android/tv/recommendation/ |
D | RoutineWatchEvaluator.java | 72 double score = in evaluateChannel() local 75 if (score >= REQUIRED_MIN_SCORE && score > maxScore) { in evaluateChannel() 76 maxScore = score; in evaluateChannel() 88 double score = in evaluateChannel() local 90 if (score >= REQUIRED_MIN_SCORE && score > maxScore) { in evaluateChannel() 91 maxScore = score; in evaluateChannel() 177 double score = in calculateOverlappedIntervalScore() local 182 if (score > 0) { in calculateOverlappedIntervalScore() 186 score = in calculateOverlappedIntervalScore() 196 score *= MULTIPLIER_FOR_UNMATCHED_DAY_OF_WEEK; in calculateOverlappedIntervalScore() [all …]
|
D | Recommender.java | 126 double score = evaluator.getScaledEvaluatorScore(cr.getChannel().getId()); in recommendChannels() local 127 if (score > maxScore) { in recommendChannels() 128 maxScore = score; in recommendChannels() 299 double score = mEvaluator.evaluateChannel(channelId); in getScaledEvaluatorScore() local 300 if (score < 0.0) { in getScaledEvaluatorScore() 301 if (score != Evaluator.NOT_RECOMMENDED) { in getScaledEvaluatorScore() 304 "Unexpected score (" + score + ") from the recommender" + mEvaluator); in getScaledEvaluatorScore() 308 } else if (score > 1.0) { in getScaledEvaluatorScore() 309 Log.w(TAG, "Unexpected score (" + score + ") from the recommender" + mEvaluator); in getScaledEvaluatorScore() 310 score = 1.0; in getScaledEvaluatorScore() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/typing/ |
D | typing_scoring.h | 50 float score = ScoringParams::TYPING_BASE_OUTPUT_SCORE - compoundDistance / maxDistance; in calculateFinalScore() local 52 score += ScoringParams::AUTOCORRECT_OUTPUT_THRESHOLD; in calculateFinalScore() 77 score += ScoringParams::PERFECT_MATCH_PROMOTION; in calculateFinalScore() 81 score += ScoringParams::EXACT_MATCH_PROMOTION; in calculateFinalScore() 83 score -= ScoringParams::CASE_ERROR_PENALTY_FOR_EXACT_MATCH; in calculateFinalScore() 86 score -= ScoringParams::ACCENT_ERROR_PENALTY_FOR_EXACT_MATCH; in calculateFinalScore() 89 score -= ScoringParams::DIGRAPH_PENALTY_FOR_EXACT_MATCH; in calculateFinalScore() 93 return static_cast<int>(score * SUGGEST_INTERFACE_OUTPUT_SCALE); in calculateFinalScore()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | VelocityBasedConnectedScoreTest.java | 103 int score = mVelocityBasedConnectedScore.generateScore(); in noCrashWhenNoData() local 104 assertTrue(score > ConnectedScore.WIFI_TRANSITION_SCORE); in noCrashWhenNoData() 124 int score = mVelocityBasedConnectedScore.generateScore(); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() local 125 assertTrue(score > ConnectedScore.WIFI_TRANSITION_SCORE); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 129 score = mVelocityBasedConnectedScore.generateScore(); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 130 assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 150 int score = mVelocityBasedConnectedScore.generateScore(); 151 assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE);
|
D | WifiScoreReportTest.java | 241 private void verifySentNetworkScore(int score, VerificationMode mode) { in verifySentNetworkScore() argument 251 return networkScore.getLegacyInt() == score; in verifySentNetworkScore() 255 verify(mNetworkAgent, mode).sendNetworkScore(score); in verifySentNetworkScore() 259 private void verifySentNetworkScore(int score) { in verifySentNetworkScore() argument 260 verifySentNetworkScore(score, times(1)); in verifySentNetworkScore() 479 int score = mWifiInfo.getScore(); in allowLowRssiIfDataIsMoving() local 480 assertTrue(score > ConnectedScore.WIFI_TRANSITION_SCORE); in allowLowRssiIfDataIsMoving() 505 int score = mWifiInfo.getScore(); in giveUpOnBadRssiWhenDataIsNotMoving() local 506 assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE); in giveUpOnBadRssiWhenDataIsNotMoving() 511 assertEquals(score, ns.getLegacyInt()); in giveUpOnBadRssiWhenDataIsNotMoving() [all …]
|
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | NetworkScoreTest.kt | 57 private fun score(exiting: Boolean = false, primary: Boolean = false) = in <lambda>() method 129 val score = score(exiting = isExiting, primary = isPrimary) in <lambda>() constant 133 LinkProperties(), score, config, NetworkProvider(context, looper, in <lambda>() 150 agent1.sendNetworkScore(score(exiting = true)) in <lambda>() 153 agent1.sendNetworkScore(score(exiting = false)) in <lambda>() 203 agent2.sendNetworkScore(score(primary = true)) in <lambda>() 206 agent1.sendNetworkScore(score(primary = true)) in <lambda>() 209 agent2.sendNetworkScore(score(primary = false)) in <lambda>()
|
/packages/apps/TV/src/com/android/tv/data/api/ |
D | Program.java | 97 public final String score; field in Program.CriticScore 106 String score = in.readString(); 108 return new CriticScore(source, score, logoUri); 123 public CriticScore(String source, String score, String logoUrl) { in CriticScore() argument 125 this.score = score; in CriticScore() 137 out.writeString(score); in writeToParcel()
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | NetworkAgent.java | 418 @NonNull NetworkCapabilities nc, @NonNull LinkProperties lp, int score, in NetworkAgent() argument 421 new NetworkScore.Builder().setLegacyInt(score).build(), config, provider); in NetworkAgent() 438 @NonNull NetworkScore score, @NonNull NetworkAgentConfig config, in NetworkAgent() argument 440 this(looper, context, logTag, nc, lp, score, config, in NetworkAgent() 449 public final NetworkScore score; field in NetworkAgent.InitialConfiguration 453 @NonNull LinkProperties properties, @NonNull NetworkScore score, in InitialConfiguration() argument 458 this.score = score; in InitialConfiguration() 467 @NonNull NetworkScore score, @NonNull NetworkAgentConfig config, int providerId, in NetworkAgent() argument 479 new LinkProperties(lp), score, config, ni); in NetworkAgent() 640 mInitialConfiguration.score, mInitialConfiguration.config, providerId); in register() [all …]
|
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/ |
D | RoutineWatchEvaluatorTest.java | 63 private static ScoredItem score(String t1, String t2) { in score() method in RoutineWatchEvaluatorTest 131 score(base, ""), in testCalculateTitleMatchScore_longerMatchIsBetter() 132 score(base, "bar"), in testCalculateTitleMatchScore_longerMatchIsBetter() 133 score(base, "foo bar"), in testCalculateTitleMatchScore_longerMatchIsBetter() 134 score(base, "foo bar baz") in testCalculateTitleMatchScore_longerMatchIsBetter() 284 double score = expectedSeconds; in assertOverlappedIntervalScore() local 286 score *= RoutineWatchEvaluator.MULTIPLIER_FOR_UNMATCHED_DAY_OF_WEEK; in assertOverlappedIntervalScore() 291 score, in assertOverlappedIntervalScore() 295 score, in assertOverlappedIntervalScore()
|
D | RecommenderTest.java | 332 double score = Math.pow(0.5, channelIdList.size()); in setChannelScores_scoreIncreasesAsChannelIdIncreases() local 335 mEvaluator.setChannelScore(channelId, score); in setChannelScores_scoreIncreasesAsChannelIdIncreases() 336 score *= 2.0; in setChannelScores_scoreIncreasesAsChannelIdIncreases() 348 Double score = mChannelScore.get(channelId); in evaluateChannel() local 349 return score == null ? NOT_RECOMMENDED : score; in evaluateChannel() 352 public void setChannelScore(long channelId, double score) { in setChannelScore() argument 353 mChannelScore.put(channelId, score); in setChannelScore()
|
D | EvaluatorTestCase.java | 99 double score = mEvaluator.evaluateChannel(channelId); in assertChannelScoresValid() local 101 "Channel " + channelId + " score of " + score + "is not valid", in assertChannelScoresValid() 102 score == Evaluator.NOT_RECOMMENDED || (0.0 <= score && score <= 1.0)); in assertChannelScoresValid()
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
D | autocorrection_threshold_utils.cpp | 71 const int beforeLength, const int *after, const int afterLength, const int score) { in calcNormalizedScore() argument 87 if (score <= 0 || distance >= afterLength) { in calcNormalizedScore() 97 return (static_cast<float>(score) / SUGGEST_INTERFACE_OUTPUT_SCALE) * weight; in calcNormalizedScore() 100 const float maxScore = score >= S_INT_MAX ? static_cast<float>(S_INT_MAX) in calcNormalizedScore() 106 return (static_cast<float>(score) / maxScore) * weight; in calcNormalizedScore()
|