Home
last modified time | relevance | path

Searched refs:score (Results 1 – 25 of 100) sorted by relevance

1234

/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DNetworkRankerTest.kt36 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/
DRawContactMatcher.java226 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 …]
DContactMatcher.java228 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 …]
DMatchScore.java78 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()
DRawContactMatchingCandidates.java51 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/
DFullScore.java157 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()
DNetworkOffer.java44 @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/
DScoredNetworkNominator.java237 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 …]
DWifiScoreReport.java123 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 …]
DCompatibilityScorer.java81 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()
DBubbleFunScorer.java66 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()
DScoreCardBasedScorer.java90 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()
DWifiNetworkScoreCache.java152 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/
DRoutineWatchEvaluator.java72 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 …]
DRecommender.java126 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/
Dtyping_scoring.h50 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/
DVelocityBasedConnectedScoreTest.java103 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);
DWifiScoreReportTest.java241 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/
DNetworkScoreTest.kt57 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/
DProgram.java97 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/
DNetworkAgent.java418 @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/
DRoutineWatchEvaluatorTest.java63 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()
DRecommenderTest.java332 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()
DEvaluatorTestCase.java99 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/
Dautocorrection_threshold_utils.cpp71 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()

1234