Home
last modified time | relevance | path

Searched refs:candidates (Results 1 – 25 of 102) sorted by relevance

12345

/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DNetworkRanker.java77 final ArrayList<NetworkAgentInfo> candidates = filter(nais, nai -> nai.satisfies(request)); in getBestNetwork() local
78 if (candidates.size() == 1) return candidates.get(0); // Only one potential satisfier in getBestNetwork()
79 if (candidates.size() <= 0) return null; // No network can satisfy this request in getBestNetwork()
81 return getBestNetworkByPolicy(candidates, currentSatisfier); in getBestNetwork()
83 return getBestNetworkByLegacyInt(candidates); in getBestNetwork()
163 @NonNull List<T> candidates, in getBestNetworkByPolicy()
167 new ArrayList<>(candidates.size() /* initialCapacity */); in getBestNetworkByPolicy()
169 new ArrayList<>(candidates.size() /* initialCapacity */); in getBestNetworkByPolicy()
183 partitionInto(candidates, nai -> nai.getScore().hasPolicy(POLICY_IS_INVINCIBLE), in getBestNetworkByPolicy()
186 if (accepted.size() > 0 && rejected.size() > 0) candidates = new ArrayList<>(accepted); in getBestNetworkByPolicy()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DWifiLastResortWatchdogTest.java117 List<Pair<ScanDetail, WifiConfiguration>> candidates = new ArrayList<>(); in createFilteredQnsCandidates() local
132 candidates.add(Pair.create(scanDetail, config)); in createFilteredQnsCandidates()
134 return candidates; in createFilteredQnsCandidates()
140 List<Pair<ScanDetail, WifiConfiguration>> candidates = in createFilteredQnsCandidates() local
157 candidates.add(Pair.create(scanDetail, config)); in createFilteredQnsCandidates()
159 return candidates; in createFilteredQnsCandidates()
182 List<Pair<ScanDetail, WifiConfiguration>> candidates = createFilteredQnsCandidates(mSsids, in testAvailableNetworkBuffering_ageCullingWorks() local
184 mLastResortWatchdog.updateAvailableNetworks(candidates); in testAvailableNetworkBuffering_ageCullingWorks()
188 candidates = createFilteredQnsCandidates(Arrays.copyOfRange(mSsids, 0, 2), in testAvailableNetworkBuffering_ageCullingWorks()
195 mLastResortWatchdog.updateAvailableNetworks(candidates); in testAvailableNetworkBuffering_ageCullingWorks()
[all …]
DWifiNetworkSelectorTest.java374 List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan( in emptyScanResults() local
378 WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates); in emptyScanResults()
407 List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan( in verifyMinimumRssiThreshold() local
411 WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates); in verifyMinimumRssiThreshold()
441 List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan( in verifyMinimumTimeGapWhenConnected() local
445 WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates); in verifyMinimumTimeGapWhenConnected()
451 candidates = mWifiNetworkSelector.getCandidatesFromScan( in verifyMinimumTimeGapWhenConnected()
455 candidate = mWifiNetworkSelector.selectNetwork(candidates); in verifyMinimumTimeGapWhenConnected()
490 List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan( in verifyNoMinimumTimeGapWhenDisconnected() local
494 WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates); in verifyNoMinimumTimeGapWhenDisconnected()
[all …]
DCandidateScorerTest.java131 ArrayList<Candidate> candidates = new ArrayList<>(1); in evaluate() local
132 candidates.add(candidate); in evaluate()
133 ScoredCandidate choice = mCandidateScorer.scoreCandidates(candidates); in evaluate()
437 List<Candidate> candidates = new ArrayList<>(); in testPreferCurrentNetworkWithInternetOverNetworkWithNoInternet() local
438 candidates.add(mCandidate1); in testPreferCurrentNetworkWithInternetOverNetworkWithNoInternet()
439 candidates.add(mCandidate2); in testPreferCurrentNetworkWithInternetOverNetworkWithNoInternet()
440 ScoredCandidate choice = mCandidateScorer.scoreCandidates(candidates); in testPreferCurrentNetworkWithInternetOverNetworkWithNoInternet()
/packages/modules/adb/
Dadb.bash240 local candidates
254candidates=$(command adb ${args[@]} shell dumpsys -l 2> /dev/null | sed -e '1d;s/^ *//' | tr -d '…
255 candidates="-l $candidates"
256 COMPREPLY=( $(compgen -W "$candidates" -- "$cur") )
266 local candidates
275candidates="broadcast clear-debug-app clear-watch-heap dumpheap force-stop get-config get-inactive…
276 COMPREPLY=( $(compgen -W "$candidates" -- "$cur") )
287 local candidates
296 candidates="-l -lf -p clear create-user default-state disable"
297 candidates+=" disable-until-used disable-user dump enable"
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/
DPasspointNetworkNominateHelperTest.java178 List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper in evaluateScansWithNoMatch() local
180 assertTrue(candidates.isEmpty()); in evaluateScansWithNoMatch()
197 List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper in evaluateScansWithNoInterworkingAP() local
199 assertTrue(candidates.isEmpty()); in evaluateScansWithNoInterworkingAP()
226 List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper in evaluateScansWithNetworkMatchingHomeProvider() local
228 assertEquals(1, candidates.size()); in evaluateScansWithNetworkMatchingHomeProvider()
273 List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper in evaluateScansWithNoInternetBit() local
275 assertEquals(1, candidates.size()); in evaluateScansWithNoInternetBit()
314 List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper in evaluateScansWithNetworkMatchingRoamingProvider() local
316 assertEquals(1, candidates.size()); in evaluateScansWithNetworkMatchingRoamingProvider()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/display/
DColorModePreferenceFragmentTest.java79 final List<? extends CandidateInfo> candidates = mFragment.getCandidates(); in getCandidates_all() local
81 assertThat(candidates.size()).isEqualTo(4); in getCandidates_all()
82 assertThat(candidates.get(0).getKey()) in getCandidates_all()
84 assertThat(candidates.get(1).getKey()) in getCandidates_all()
86 assertThat(candidates.get(2).getKey()) in getCandidates_all()
88 assertThat(candidates.get(3).getKey()) in getCandidates_all()
102 List<? extends CandidateInfo> candidates = mFragment.getCandidates(); in getCandidates_none() local
104 assertThat(candidates.size()).isEqualTo(0); in getCandidates_none()
119 List<? extends CandidateInfo> candidates = mFragment.getCandidates(); in getCandidates_withAutomatic() local
121 assertThat(candidates.size()).isEqualTo(2); in getCandidates_withAutomatic()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/
DContactAggregator.java81 MatchCandidateList candidates) { in aggregateContact() argument
101 candidates.clear(); in aggregateContact()
111 contactId = pickBestMatchBasedOnData(db, rawContactId, candidates, matcher); in aggregateContact()
614 MatchCandidateList candidates, ContactMatcher matcher) { in pickBestMatchBasedOnData() argument
623 bestMatch = pickBestMatchBasedOnSecondaryData(db, rawContactId, candidates, matcher); in pickBestMatchBasedOnData()
639 long rawContactId, MatchCandidateList candidates, ContactMatcher matcher) { in pickBestMatchBasedOnSecondaryData() argument
646 loadNameMatchCandidates(db, rawContactId, candidates, true); in pickBestMatchBasedOnSecondaryData()
661 matchAllCandidates(db, mSb.toString(), candidates, matcher, in pickBestMatchBasedOnSecondaryData()
836 private void lookupApproximateNameMatches(SQLiteDatabase db, MatchCandidateList candidates, in lookupApproximateNameMatches() argument
839 for (int i = 0; i < candidates.mCount; i++) { in lookupApproximateNameMatches()
[all …]
DContactAggregator2.java93 MatchCandidateList candidates) { in aggregateContact() argument
121 matchingCandidates = findRawContactMatchingCandidates(db, rawContactId, candidates, in aggregateContact()
211 rawContactId, MatchCandidateList candidates, RawContactMatcher matcher) { in findRawContactMatchingCandidates() argument
212 updateMatchScores(db, rawContactId, candidates, matcher); in findRawContactMatchingCandidates()
635 MatchCandidateList candidates, RawContactMatcher matcher) { in updateMatchScoresBasedOnNameMatches() argument
636 candidates.clear(); in updateMatchScoresBasedOnNameMatches()
638 mNameSplitter, candidates); in updateMatchScoresBasedOnNameMatches()
706 private void lookupApproximateNameMatches(SQLiteDatabase db, MatchCandidateList candidates, in lookupApproximateNameMatches() argument
709 for (int i = 0; i < candidates.mCount; i++) { in lookupApproximateNameMatches()
710 final NameMatchCandidate candidate = candidates.mList.get(i); in lookupApproximateNameMatches()
[all …]
/packages/apps/Dialer/java/com/android/dialer/preferredsim/impl/
DPreferredAccountWorkerImpl.java99 String phoneNumber, List<PhoneAccountHandle> candidates) { in selectAccount() argument
100 return backgroundExecutor.submit(() -> doInBackground(phoneNumber, candidates)); in selectAccount()
103 private Result doInBackground(String phoneNumber, List<PhoneAccountHandle> candidates) { in doInBackground() argument
109 return usePreferredSim(preferred.get(), candidates, dataId.get()); in doInBackground()
118 return useDefaultSim(defaultPhoneAccount, candidates, dataId.orNull()); in doInBackground()
126 return useSuggestedSim(suggestion.get(), candidates, dataId.orNull()); in doInBackground()
131 createDialogOptionsBuilder(candidates, dataId.orNull(), suggestion.orNull())); in doInBackground()
142 PhoneAccountHandle preferred, List<PhoneAccountHandle> candidates, String dataId) { in usePreferredSim() argument
150 resultBuilder = Result.builder(createDialogOptionsBuilder(candidates, dataId, null)); in usePreferredSim()
158 List<PhoneAccountHandle> candidates, in useDefaultSim() argument
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DSuggestedWords.java391 @Nonnull final ArrayList<SuggestedWordInfo> candidates) { in removeDups() argument
392 if (candidates.isEmpty()) { in removeDups()
398 typedWord, candidates, -1 /* startIndexExclusive */); in removeDups()
400 for (int i = 0; i < candidates.size(); ++i) { in removeDups()
402 candidates.get(i).mWord, candidates, i /* startIndexExclusive */); in removeDups() local
409 @Nonnull final ArrayList<SuggestedWordInfo> candidates, in removeSuggestedWordInfoFromList() argument
412 for (int i = startIndexExclusive + 1; i < candidates.size(); ++i) { in removeSuggestedWordInfoFromList()
413 final SuggestedWordInfo previous = candidates.get(i); in removeSuggestedWordInfoFromList()
418 candidates.remove(i); in removeSuggestedWordInfoFromList()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/
DContextualCardLoader.java128 List<ContextualCard> getDisplayableCards(List<ContextualCard> candidates) { in getDisplayableCards() argument
129 final List<ContextualCard> eligibleCards = filterEligibleCards(candidates); in getDisplayableCards()
186 List<ContextualCard> filterEligibleCards(List<ContextualCard> candidates) { in filterEligibleCards() argument
187 if (candidates.isEmpty()) { in filterEligibleCards()
188 return candidates; in filterEligibleCards()
191 final ExecutorService executor = Executors.newFixedThreadPool(candidates.size()); in filterEligibleCards()
195 final List<EligibleCardChecker> checkers = candidates.stream() in filterEligibleCards()
211 + candidates.get(i).getSliceUri()); in filterEligibleCards()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/inputmethod/
DKeyboardFragment.java212 List<DefaultAppInfo> candidates = getAutofillCandidates(); in updateAutofill() local
213 if (candidates.isEmpty()) { in updateAutofill()
224 updateCurrentAutofillPreference(currentAutofillPref, candidates); in updateAutofill()
225 updateAutofillSettings(candidates); in updateAutofill()
237 List<DefaultAppInfo> candidates) { in updateCurrentAutofillPreference() argument
239 DefaultAppInfo app = AutofillHelper.getCurrentAutofill(getContext(), candidates); in updateCurrentAutofillPreference()
246 private void updateAutofillSettings(List<DefaultAppInfo> candidates) { in updateAutofillSettings() argument
252 final Set<String> autofillServicesKeys = new ArraySet<>(candidates.size()); in updateAutofillSettings()
253 for (final DefaultAppInfo info : candidates) { in updateAutofillSettings()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/autofill/
DAutofillHelper.java54 final List<DefaultAppInfo> candidates = new ArrayList<>(); in getAutofillCandidates() local
61 candidates.add(new DefaultAppInfo(context, pm, myUserId, new ComponentName( in getAutofillCandidates()
65 return candidates; in getAutofillCandidates()
92 @NonNull List<DefaultAppInfo> candidates) { in getCurrentAutofill() argument
94 for (int i = 0; i < candidates.size(); i++) { in getCurrentAutofill()
95 DefaultAppInfo appInfo = candidates.get(i); in getCurrentAutofill()
DAutofillPickerFragment.java103 List<DefaultAppInfo> candidates = AutofillHelper.getAutofillCandidates(context, in bind() local
105 DefaultAppInfo current = AutofillHelper.getCurrentAutofill(context, candidates); in bind()
108 for (final DefaultAppInfo appInfo : candidates) { in bind()
138 List<DefaultAppInfo> candidates = AutofillHelper.getAutofillCandidates(context, in onPreferenceTreeClick() local
141 candidates); in onPreferenceTreeClick()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DNotificationAssistantPickerTest.java107 List<? extends CandidateInfo> candidates = mFragment.getCandidates(); in candidateListHasNoneAtEnd() local
108 assertTrue(candidates.size() > 0); in candidateListHasNoneAtEnd()
109 assertEquals(candidates.get(candidates.size() - 1).getKey(), ""); in candidateListHasNoneAtEnd()
120 List<? extends CandidateInfo> candidates = mFragment.getCandidates(); in candidateListHasCorrectCandidate() local
122 for (CandidateInfo c : candidates) { in candidateListHasCorrectCandidate()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DThroughputScorer.java185 private boolean doesAnyCurrentNetworksHaveInternet(@NonNull Collection<Candidate> candidates) { in doesAnyCurrentNetworksHaveInternet() argument
186 for (Candidate candidate : candidates) { in doesAnyCurrentNetworksHaveInternet()
195 public ScoredCandidate scoreCandidates(@NonNull Collection<Candidate> candidates) { in scoreCandidates() argument
197 boolean currentNetworkHasInternet = doesAnyCurrentNetworksHaveInternet(candidates); in scoreCandidates()
198 for (Candidate candidate : candidates) { in scoreCandidates()
DWifiConnectivityManager.java399 List<WifiCandidates.Candidate> candidates = mNetworkSelector.getCandidatesFromScan( in handleScanResults() local
402 mLatestCandidates = candidates; in handleScanResults()
408 candidates = filterCandidatesHighMovement(candidates, listenerName, isFullScan); in handleScanResults()
416 if (candidates == null || candidates.size() == 0) { in handleScanResults()
427 candidates.stream() in handleScanResults()
443 listenerName, candidates, handleScanResultsListener); in handleScanResults()
544 @NonNull String listenerName, @NonNull List<WifiCandidates.Candidate> candidates, in handleCandidatesFromScanResultsForPrimaryCmmUsingMbbIfAvailable() argument
546 WifiConfiguration candidate = mNetworkSelector.selectNetwork(candidates); in handleCandidatesFromScanResultsForPrimaryCmmUsingMbbIfAvailable()
558 List<WifiCandidates.Candidate> candidates, String listenerName, boolean isFullScan) { in filterCandidatesHighMovement() argument
560 if (candidates == null || candidates.isEmpty()) { in filterCandidatesHighMovement()
[all …]
/packages/apps/Settings/src/com/android/settings/sound/
DVibrateForCallsPreferenceFragment.java98 final List<VibrateForCallsCandidateInfo> candidates = new ArrayList<>(); in getCandidates() local
99 candidates.add(mCandidates.get(KEY_NEVER_VIBRATE)); in getCandidates()
100 candidates.add(mCandidates.get(KEY_ALWAYS_VIBRATE)); in getCandidates()
101 candidates.add(mCandidates.get(KEY_RAMPING_RINGER)); in getCandidates()
102 return candidates; in getCandidates()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/
DAppStoragePreference.java45 final List<VolumeInfo> candidates = in refresh() local
47 if (candidates.size() > 1 || in refresh()
48 (candidates.size() == 1 && !candidates.contains(volumeInfo))) { in refresh()
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/
DVrDisplayPreferencePickerTest.java62 List<VrDisplayPreferencePicker.VrCandidateInfo> candidates = mPicker.getCandidates(); in getCandidates_shouldReturnTwoCandidates() local
64 assertThat(candidates.size()).isEqualTo(2); in getCandidates_shouldReturnTwoCandidates()
65 assertThat(candidates.get(0).getKey()) in getCandidates_shouldReturnTwoCandidates()
67 assertThat(candidates.get(1).getKey()) in getCandidates_shouldReturnTwoCandidates()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
DVibrationPreferenceFragmentTest.java128 final List<? extends CandidateInfo> candidates = mFragment.getCandidates(); in candidates_shouldBeSortedByIntensity() local
129 assertThat(candidates.size()).isEqualTo(INTENSITY_TO_KEY.size()); in candidates_shouldBeSortedByIntensity()
131 (VibrationIntensityCandidateInfo) candidates.get(0); in candidates_shouldBeSortedByIntensity()
132 for (int i = 1; i < candidates.size(); i++) { in candidates_shouldBeSortedByIntensity()
134 (VibrationIntensityCandidateInfo) candidates.get(i); in candidates_shouldBeSortedByIntensity()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterysaver/
DBatterySaverScheduleSettings.java116 List<CandidateInfo> candidates = Lists.newArrayList(); in getCandidates() local
119 candidates.add(new BatterySaverScheduleCandidateInfo( in getCandidates()
126 candidates.add(new BatterySaverScheduleCandidateInfo( in getCandidates()
135 candidates.add(new BatterySaverScheduleCandidateInfo( in getCandidates()
141 return candidates; in getCandidates()
/packages/apps/Settings/src/com/android/settings/display/
DVrDisplayPreferencePicker.java48 List<VrCandidateInfo> candidates = new ArrayList<>(); in getCandidates() local
50 candidates.add(new VrCandidateInfo(context, 0, R.string.display_vr_pref_low_persistence)); in getCandidates()
51 candidates.add(new VrCandidateInfo(context, 1, R.string.display_vr_pref_off)); in getCandidates()
52 return candidates; in getCandidates()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/assist/
DDefaultVoiceInputPickerPreferenceController.java63 List<DefaultAppInfo> candidates = new ArrayList<>(); in getCandidates() local
68 candidates.add( in getCandidates()
75 candidates.add( in getCandidates()
79 return candidates; in getCandidates()

12345