Home
last modified time | relevance | path

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

12345

/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DNetworkRankerTest.kt41 private fun score(vararg policies: Int) = FullScore( in <lambda>() method
78 val cell = TestScore(score(EVER_EVALUATED, YIELD_TO_BAD_WIFI, IS_VALIDATED), CAPS_CELL) in rank()
84 val wifi = TestScore(score(), caps(TRANSPORT_WIFI)) in testPreferBadWifi_oneCellOneEvaluatingWifi()
85 val cell = TestScore(score(YIELD_TO_BAD_WIFI, IS_VALIDATED, EVER_EVALUATED), CAPS_CELL) in testPreferBadWifi_oneCellOneEvaluatingWifi()
92 val badWifi = TestScore(score(EVER_EVALUATED, EVER_VALIDATED), CAPS_WIFI) in testYieldToBadWiFi_oneCellOneBadWiFi()
93 val cell = TestScore(score(EVER_EVALUATED, YIELD_TO_BAD_WIFI, IS_VALIDATED), CAPS_CELL) in testYieldToBadWiFi_oneCellOneBadWiFi()
99 val badWifi = TestScore(score(EVER_EVALUATED), CAPS_WIFI) in testPreferBadWifi_oneCellOneBadWifi()
100 val cell = TestScore(score(EVER_EVALUATED, YIELD_TO_BAD_WIFI, IS_VALIDATED), CAPS_CELL) in testPreferBadWifi_oneCellOneBadWifi()
107 val portalWifi = TestScore(score(EVER_EVALUATED), CAPS_WIFI_PORTAL) in testPreferBadWifi_oneCellOneCaptivePortalWifi()
108 val cell = TestScore(score(EVER_EVALUATED, YIELD_TO_BAD_WIFI, IS_VALIDATED), CAPS_CELL) in testPreferBadWifi_oneCellOneCaptivePortalWifi()
[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/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/java/com/android/server/wifi/
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()
DWifiScoreReport.java133 public void notifyScoreUpdate(int sessionId, int score) { in notifyScoreUpdate() argument
140 + " score=" + score); in notifyScoreUpdate()
145 mLegacyIntScore = score; in notifyScoreUpdate()
153 if (score == WIFI_SCORE_TO_TERMINATE_CONNECTION_BLOCKLIST_BSSID) { in notifyScoreUpdate()
160 if (score > ConnectedScore.WIFI_MAX_SCORE in notifyScoreUpdate()
161 || score < ConnectedScore.WIFI_MIN_SCORE) { in notifyScoreUpdate()
162 Log.e(TAG, "Invalid score value from external scorer: " + score); in notifyScoreUpdate()
165 if (score < ConnectedScore.WIFI_TRANSITION_SCORE) { in notifyScoreUpdate()
172 if (score > ConnectedScore.WIFI_TRANSITION_SCORE) { in notifyScoreUpdate()
179 mLegacyIntScore = score; in notifyScoreUpdate()
[all …]
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()
/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/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DVelocityBasedConnectedScoreTest.java104 int score = mVelocityBasedConnectedScore.generateScore(); in noCrashWhenNoData() local
105 assertTrue(score > ConnectedScore.WIFI_TRANSITION_SCORE); in noCrashWhenNoData()
125 int score = mVelocityBasedConnectedScore.generateScore(); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() local
126 assertTrue(score > ConnectedScore.WIFI_TRANSITION_SCORE); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving()
130 score = mVelocityBasedConnectedScore.generateScore(); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving()
131 assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving()
151 int score = mVelocityBasedConnectedScore.generateScore();
152 assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE);
DWifiScoreReportTest.java289 private void verifySentNetworkScore(int score, VerificationMode mode) { in verifySentNetworkScore() argument
299 return networkScore.getLegacyInt() == score; in verifySentNetworkScore()
303 verify(mNetworkAgent, mode).sendNetworkScore(score); in verifySentNetworkScore()
307 private void verifySentNetworkScore(int score) { in verifySentNetworkScore() argument
308 verifySentNetworkScore(score, times(1)); in verifySentNetworkScore()
539 int score = mWifiInfo.getScore(); in allowLowRssiIfDataIsMoving() local
540 assertTrue(score > getTransitionScore()); in allowLowRssiIfDataIsMoving()
566 int score = mWifiInfo.getScore(); in giveUpOnBadRssiWhenDataIsNotMoving() local
567 assertTrue(score < getTransitionScore()); in giveUpOnBadRssiWhenDataIsNotMoving()
572 assertEquals(score, ns.getLegacyInt()); in giveUpOnBadRssiWhenDataIsNotMoving()
[all …]
/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/service/src/com/android/server/connectivity/
DNetworkOffer.java45 @NonNull public final FullScore score; field in NetworkOffer
60 public NetworkOffer(@NonNull final FullScore score, in NetworkOffer() argument
64 this.score = Objects.requireNonNull(score); in NetworkOffer()
74 return score; in getScore()
151 return "NetworkOffer [ Provider Id (" + providerId + ") " + score + " Caps " in toString()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DNetworkScoreTest.kt58 private fun score(exiting: Boolean = false, primary: Boolean = false) = in <lambda>() method
142 val score = score(exiting = isExiting, primary = isPrimary) in <lambda>() constant
146 LinkProperties(), score, config, NetworkProvider(context, looper, in <lambda>()
163 agent1.sendNetworkScore(score(exiting = true)) in <lambda>()
166 agent1.sendNetworkScore(score(exiting = false)) in <lambda>()
216 agent2.sendNetworkScore(score(primary = true)) in <lambda>()
219 agent1.sendNetworkScore(score(primary = true)) in <lambda>()
222 agent2.sendNetworkScore(score(primary = false)) in <lambda>()
/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()
/packages/modules/Connectivity/bpf_progs/
DdscpPolicy.c168 int score = 0; in DEFINE_BPF_MAP_GRW() local
172 score += 0xFFFF; in DEFINE_BPF_MAP_GRW()
176 score += 0xFFFF; in DEFINE_BPF_MAP_GRW()
180 score += 0xFFFF; in DEFINE_BPF_MAP_GRW()
184 score += 0xFFFF; in DEFINE_BPF_MAP_GRW()
188 score += 0xFFFF + policy->dst_port_start - policy->dst_port_end; in DEFINE_BPF_MAP_GRW()
190 if (score > best_score) { in DEFINE_BPF_MAP_GRW()
191 best_score = score; in DEFINE_BPF_MAP_GRW()
/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()
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()
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()
/packages/modules/Connectivity/framework/src/android/net/
DNetworkAgent.java498 @NonNull NetworkCapabilities nc, @NonNull LinkProperties lp, int score, in NetworkAgent() argument
501 new NetworkScore.Builder().setLegacyInt(score).build(), config, provider); in NetworkAgent()
518 @NonNull NetworkScore score, @NonNull NetworkAgentConfig config, in NetworkAgent() argument
520 this(looper, context, logTag, nc, lp, score, config, in NetworkAgent()
529 public final NetworkScore score; field in NetworkAgent.InitialConfiguration
533 @NonNull LinkProperties properties, @NonNull NetworkScore score, in InitialConfiguration() argument
538 this.score = score; in InitialConfiguration()
547 @NonNull NetworkScore score, @NonNull NetworkAgentConfig config, int providerId, in NetworkAgent() argument
559 new LinkProperties(lp), score, config, ni); in NetworkAgent()
726 mInitialConfiguration.score, mInitialConfiguration.config, providerId); in register()
[all …]
/packages/modules/Permission/PermissionController/iconloaderlib/src/com/android/launcher3/icons/
DColorExtractor.java89 float score = hsv[1] * hsv[2]; in findDominantColorByHue() local
90 hueScoreHistogram[hue] += score; in findDominantColorByHue()
114 float score = s * v; in findDominantColorByHue() local
116 float newTotal = oldTotal == null ? score : oldTotal + score; in findDominantColorByHue()
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/network/
DTimestampedScoredNetwork.java30 TimestampedScoredNetwork(ScoredNetwork score, long updatedTimestampMillis) { in TimestampedScoredNetwork() argument
31 mScore = score; in TimestampedScoredNetwork()
40 public void update(ScoredNetwork score, long updatedTimestampMillis) { in update() argument
41 mScore = score; in update()

12345