Home
last modified time | relevance | path

Searched refs:Pair (Results 1 – 25 of 79) sorted by relevance

1234

/packages/apps/Dialer/InCallUI/tests/src/com/android/incallui/
DInCallContactInteractionsTest.java21 import android.util.Pair;
52 Pair.create( in testIsOpenNow_NowMatchesOpenTime()
63 Pair.create( in testIsOpenNow_ClosingAfterMidnight()
74 Pair.create( in testIsOpenNow_Open24Hours()
85 Pair.create( in testIsOpenNow_AfterMiddayBreak()
88 Pair.create( in testIsOpenNow_AfterMiddayBreak()
99 Pair.create( in testIsClosedNow_DuringMiddayBreak()
102 Pair.create( in testIsClosedNow_DuringMiddayBreak()
113 Pair.create( in testIsClosedNow_BeforeOpen()
124 Pair.create( in testIsClosedNow_NowMatchesClosedTime()
[all …]
/packages/apps/Launcher2/src/com/android/launcher2/
DDeferredHandler.java23 import android.util.Pair;
35 private LinkedList<Pair<Runnable, Integer>> mQueue = new LinkedList<Pair<Runnable, Integer>>();
41 Pair<Runnable, Integer> p; in handleMessage()
83 mQueue.add(new Pair<Runnable, Integer>(runnable, type)); in post()
105 ListIterator<Pair<Runnable, Integer>> iter = mQueue.listIterator(); in cancelAllRunnablesOfType()
106 Pair<Runnable, Integer> p; in cancelAllRunnablesOfType()
124 LinkedList<Pair<Runnable, Integer>> queue = new LinkedList<Pair<Runnable, Integer>>(); in flush()
129 for (Pair<Runnable, Integer> p : queue) { in flush()
136 Pair<Runnable, Integer> p = mQueue.getFirst(); in scheduleNextLocked()
/packages/apps/Contacts/src/com/android/contacts/editor/
DKindSectionDataList.java25 import android.util.Pair;
58 public Pair<KindSectionData,ValuesDelta> getEntryToWrite(long id, in getEntryToWrite()
71 return new Pair<>(kindSectionData, valuesDelta); in getEntryToWrite()
83 return new Pair<>(kindSectionData, valuesDelta); in getEntryToWrite()
96 return new Pair<>(kindSectionData, in getEntryToWrite()
113 return new Pair<>(kindSectionData, kindSectionData.getValuesDeltas().get(0)); in getEntryToWrite()
133 public Pair<KindSectionData,ValuesDelta> getEntryToDisplay(long id) { in getEntryToDisplay()
143 return new Pair<>(kindSectionData, valuesDelta); in getEntryToDisplay()
152 return new Pair<>(kindSectionData, valuesDelta); in getEntryToDisplay()
161 return new Pair<>(kindSectionData, valuesDelta); in getEntryToDisplay()
[all …]
DEditorUiUtils.java43 import android.util.Pair;
120 public static Pair<String,String> getLocalAccountInfo(Context context, in getLocalAccountInfo()
123 return new Pair<>( in getLocalAccountInfo()
127 return new Pair<>( in getLocalAccountInfo()
137 public static Pair<String,String> getAccountInfo(Context context, String accountName, in getAccountInfo()
145 return new Pair<>( in getAccountInfo()
155 return new Pair<>( in getAccountInfo()
159 return new Pair<>( in getAccountInfo()
/packages/apps/TV/tests/unit/src/com/android/tv/data/
DTvInputNewComparatorTest.java25 import android.util.Pair;
47 final LinkedHashMap<String, Pair<Boolean, Boolean>> INPUT_ID_TO_NEW_INPUT = in testComparator()
49 INPUT_ID_TO_NEW_INPUT.put("2_new_input", new Pair(true, false)); in testComparator()
50 INPUT_ID_TO_NEW_INPUT.put("4_new_input", new Pair(true, false)); in testComparator()
51 INPUT_ID_TO_NEW_INPUT.put("4_old_input", new Pair(false, false)); in testComparator()
52 INPUT_ID_TO_NEW_INPUT.put("0_old_input", new Pair(false, true)); in testComparator()
53 INPUT_ID_TO_NEW_INPUT.put("1_old_input", new Pair(false, true)); in testComparator()
54 INPUT_ID_TO_NEW_INPUT.put("3_old_input", new Pair(false, true)); in testComparator()
/packages/apps/TV/usbtuner/src/com/google/android/exoplayer/
DMediaSoftwareCodecUtil.java25 import android.util.Pair;
50 private static final HashMap<CodecKey, Pair<String, MediaCodecInfo.CodecCapabilities>>
59 Pair<String, MediaCodecInfo.CodecCapabilities> info = in getSoftwareDecoderInfo()
71 private static synchronized Pair<String, MediaCodecInfo.CodecCapabilities>
78 Pair<String, MediaCodecInfo.CodecCapabilities> codecInfo = in getMediaSoftwareCodecInfo()
92 private static Pair<String, MediaCodecInfo.CodecCapabilities> getMediaSoftwareCodecInfo( in getMediaSoftwareCodecInfo()
103 private static Pair<String, MediaCodecInfo.CodecCapabilities> getMediaSoftwareCodecInfoInternal( in getMediaSoftwareCodecInfoInternal()
126 Pair.create(codecName, capabilities)); in getMediaSoftwareCodecInfoInternal()
129 Pair.create(codecName + ".secure", capabilities)); in getMediaSoftwareCodecInfoInternal()
136 Pair.create(codecName, capabilities)); in getMediaSoftwareCodecInfoInternal()
/packages/apps/Settings/src/com/android/settings/bluetooth/
DBluetoothDevicePreference.java31 import android.util.Pair;
140 Pair<Integer, String> pair = getBtClassDrawableWithDescription(); in onDeviceAttributesChanged()
257 private Pair<Integer, String> getBtClassDrawableWithDescription() { in getBtClassDrawableWithDescription()
262 return new Pair<Integer, String>(R.drawable.ic_bt_laptop, COMPUTER); in getBtClassDrawableWithDescription()
265 return new Pair<Integer, String>(R.drawable.ic_bt_cellphone, PHONE); in getBtClassDrawableWithDescription()
268 return new Pair<Integer, String>(HidProfile.getHidClassDrawable(btClass), in getBtClassDrawableWithDescription()
272 return new Pair<Integer, String>(R.drawable.ic_bt_imaging, IMAGING); in getBtClassDrawableWithDescription()
285 return new Pair<Integer, String>(resId, null); in getBtClassDrawableWithDescription()
290 return new Pair<Integer, String>(R.drawable.ic_bt_headphones_a2dp, HEADPHONE); in getBtClassDrawableWithDescription()
293 return new Pair<Integer, String>(R.drawable.ic_bt_headset_hfp, HEADSET); in getBtClassDrawableWithDescription()
[all …]
/packages/apps/Camera2/src/com/android/camera/util/
DConcurrentSharedRingBuffer.java20 import android.util.Pair;
275 Pair<Long, Pinnable<E>> toSwapEntry = null; in swapLeast()
283 toSwapEntry = Pair.create(swapKey, mUnpinnedElements.remove(swapKey)); in swapLeast()
290 toSwapEntry = Pair.create(swapEntry.getKey(), swapEntry.getValue()); in swapLeast()
332 public Pair<Long, E> tryPin(long key) { in tryPin()
377 return Pair.create(key, entry.getElement()); in tryPin()
422 public Pair<Long, E> tryPinGreatest() { in tryPinGreatest()
442 public Pair<Long, E> tryPinGreatestSelected(Selector<E> selector) { in tryPinGreatestSelected()
463 Pair<Long, E> pinnedCandidate = tryPin(keys.get(i)); in tryPinGreatestSelected()
526 public Pair<Long, E> tryGetPinned(long key) { in tryGetPinned()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DEmojiAltPhysicalKeyDetector.java21 import android.util.Pair;
43 private static class HotKeySet extends HashSet<Pair<Integer, Integer>> { };
63 final Pair<Integer, Integer> key = in onKeyDown()
64 Pair.create(keyEvent.getKeyCode(), keyEvent.getMetaState()); in onKeyDown()
93 final Pair<Integer, Integer> key = Pair.create(keyCode, metaState); in onKeyUp()
198 final Pair<Integer, Integer> key = Pair.create( in parseHotKeys()
/packages/inputmethods/LatinIME/tools/dicttool/compat/android/util/
DPair.java21 public class Pair<T1, T2> { class
25 public Pair(final T1 first, final T2 second) { in Pair() method in Pair
39 if (!(o instanceof Pair)) return false; in equals()
40 Pair<?, ?> p = (Pair<?, ?>)o; in equals()
/packages/apps/Launcher3/src/com/android/launcher3/
DUninstallDropTarget.java10 import android.util.Pair;
50 Pair<ComponentName, Integer> componentInfo = getAppInfoFlags(info); in supportsDrop()
57 private static Pair<ComponentName, Integer> getAppInfoFlags(Object item) { in getAppInfoFlags()
60 return Pair.create(info.componentName, info.flags); in getAppInfoFlags()
66 return Pair.create(component, info.flags); in getAppInfoFlags()
83 final Pair<ComponentName, Integer> componentInfo = getAppInfoFlags(d.dragInfo); in completeDrop()
103 final Pair<ComponentName, Integer> componentInfo = getAppInfoFlags(info); in startUninstallActivity()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DBinaryDictionaryTests.java22 import android.util.Pair;
323 final ArrayList<Pair<String, String>> bigramWords = new ArrayList<>(); in testRandomlyAddBigramWords()
326 final HashMap<Pair<String, String>, Integer> bigramProbabilities = new HashMap<>(); in testRandomlyAddBigramWords()
342 final Pair<String, String> bigram = new Pair<>(word0, word1); in testRandomlyAddBigramWords()
351 for (final Pair<String, String> bigram : bigramWords) { in testRandomlyAddBigramWords()
461 final ArrayList<Pair<String, String>> bigramWords = new ArrayList<>(); in testAddBigramWordsAndFlashWithGC()
464 final HashMap<Pair<String, String>, Integer> bigramProbabilities = new HashMap<>(); in testAddBigramWordsAndFlashWithGC()
480 final Pair<String, String> bigram = new Pair<>(word0, word1); in testAddBigramWordsAndFlashWithGC()
493 for (final Pair<String, String> bigram : bigramWords) { in testAddBigramWordsAndFlashWithGC()
523 final ArrayList<Pair<String, String>> bigramWords = new ArrayList<>(); in testRandomOperationsAndFlashWithGC()
[all …]
/packages/apps/TV/usbtuner/src/com/android/usbtuner/exoplayer/ac3/
DAudioTrackMonitor.java21 import android.util.Pair;
35 private final ArrayList<Pair<Long, Integer>> mPtsList = new ArrayList<>();
85 mPtsList.add(Pair.create(pts, 1)); in addPts()
88 Pair<Long, Integer> pair = mPtsList.get(mPtsList.size() - 1); in addPts()
89 mPtsList.set(mPtsList.size() - 1, Pair.create(pair.first, pair.second + 1)); in addPts()
108 for (Pair<Long, Integer> pair : mPtsList) { in maybeLog()
/packages/services/Car/car-cluster-demo-renderer/src/android/car/cluster/demorenderer/
DDemoNavigationRenderer.java26 import android.util.Pair;
41 private final static Map<Pair<Integer, Integer>, Integer> sTurns;
45 sTurns.put(new Pair<>(TURN_TURN, TURN_SIDE_LEFT), R.string.turn_left); in sTurns.put()
46 sTurns.put(new Pair<>(TURN_TURN, TURN_SIDE_RIGHT), R.string.turn_right); in sTurns.put()
81 Pair<Integer, Integer> key = new Pair<>(event, turnSide); in getLocalizedNavigationAction()
/packages/apps/Contacts/tests/src/com/android/contacts/editor/
DEditorUiUtilsTest.java30 import android.util.Pair;
71 final Pair pair = EditorUiUtils.getLocalAccountInfo(getContext(), in testGetProfileAccountInfo_AccountName()
81 final Pair pair = EditorUiUtils.getLocalAccountInfo(getContext(), in testGetProfileAccountInfo_NoAccountName()
91 final Pair pair = EditorUiUtils.getAccountInfo(getContext(), in testGetAccountInfo_AccountName_DisplayLabel()
104 final Pair pair = EditorUiUtils.getAccountInfo(getContext(), in testGetAccountInfo_AccountName_DisplayLabel_GoogleAccountType()
116 final Pair pair = EditorUiUtils.getAccountInfo(getContext(), in testGetAccountInfo_AccountName_NoDisplayLabel()
129 final Pair pair = EditorUiUtils.getAccountInfo(getContext(), in testGetAccountInfo_NoAccountName_DisplayLabel()
139 final Pair pair = EditorUiUtils.getAccountInfo(getContext(), in testGetAccountInfo_NoAccountName_NoDisplayLabel()
/packages/apps/Camera2/src/com/android/camera/one/v2/
DImageCaptureManager.java30 import android.util.Pair;
309 private final Map<Key<?>, Pair<Long, Object>>
310 mMetadata = new ConcurrentHashMap<CaptureResult.Key<?>, Pair<Long, Object>>();
431 Pair<Long, Object> oldEntry = mMetadata.get(key); in updateMetadataChangeListeners()
441 mMetadata.put(key, new Pair<Long, Object>(frameNumber, newValue)); in updateMetadataChangeListeners()
592 final Pair<Long, CapturedImage> pinnedImage = mCapturedImageBuffer.tryPin(
678 final Pair<Long, CapturedImage> toCapture = mCapturedImageBuffer.tryPinGreatestSelected(
694 private boolean tryExecuteCaptureOrRelease(final Pair<Long, CapturedImage> toCapture,
728 public Pair<Image, TotalCaptureResult>
730 final Pair<Long, CapturedImage> toCapture =
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DConnectionServiceRepository.java22 import android.util.Pair;
34 private final HashMap<Pair<ComponentName, UserHandle>, ConnectionServiceWrapper> mServiceCache =
64 Pair<ComponentName, UserHandle> cacheKey = Pair.create(componentName, userHandle); in getService()
89 for (Pair<ComponentName, UserHandle> cacheKey : mServiceCache.keySet()) { in dump()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DThreadingTest.java23 import android.util.Pair;
50 final List<Pair<Download, String>> downloads = Lists.newArrayList(); in testFilenameRace()
61 downloads.add(Pair.create(d, body)); in testFilenameRace()
67 for (Pair<Download,String> d : downloads) { in testFilenameRace()
75 for (Pair<Download, String> d : downloads) { in testFilenameRace()
/packages/apps/Calendar/src/com/android/calendar/alerts/
DGlobalDismissManager.java33 import android.util.Pair;
224 Map<Long, Pair<String, String>> calendarsToAccounts = in processEventIds()
234 for (Pair<String, String> accountPair : calendarsToAccounts.values()) { in processEventIds()
361 Map<Long, Pair<String, String>> calendarsToAccounts = in dismissGlobally()
371 Pair<String, String> account = calendarsToAccounts.get(calendar); in dismissGlobally()
447 private static Map<Long, Pair<String, String>> lookupCalendarToAccountMap(Context context, in lookupCalendarToAccountMap()
449 Map<Long, Pair<String, String>> calendarsToAccounts = in lookupCalendarToAccountMap()
450 new HashMap<Long, Pair<String, String>>(); in lookupCalendarToAccountMap()
466 calendarsToAccounts.put(id, new Pair<String, String>(type, name)); in lookupCalendarToAccountMap()
527 new AsyncTask<Pair<Context, Intent>, Void, Void>() { in onReceive()
[all …]
/packages/apps/TV/src/com/android/tv/recommendation/
DRecommender.java22 import android.util.Pair;
41 private static final Comparator<Pair<Channel, Double>> mChannelScoreComparator =
42 new Comparator<Pair<Channel, Double>>() {
44 public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {
120 List<Pair<Channel, Double>> records = new ArrayList<>(); in recommendChannels()
131 records.add(new Pair<>(cr.getChannel(), maxScore)); in recommendChannels()
/packages/apps/UnifiedEmail/src/com/android/mail/
DMailLogService.java26 import android.util.Pair;
67 final Queue<Pair<Long, String>> mList = new LinkedList<Pair<Long, String>>();
97 mList.add(new Pair<Long, String>(System.currentTimeMillis(), message)); in put()
103 for (final Pair<Long, String> s : mList) { in toString()
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppManager.java49 import android.util.Pair;
115 private List<Pair<String,Long> > mWhitelist = new ArrayList<Pair<String, Long> >();
159 for (Iterator<Pair<String,Long>> iter = mWhitelist.iterator(); iter.hasNext(); ) { in cleanupWhitelist()
160 Pair<String,Long> entry = iter.next(); in cleanupWhitelist()
171 for (Iterator<Pair<String,Long>> iter = mWhitelist.iterator(); iter.hasNext(); ) { in addToWhitelist()
172 Pair<String,Long> entry = iter.next(); in addToWhitelist()
177 mWhitelist.add(new Pair<String, Long>(address, SystemClock.elapsedRealtime())); in addToWhitelist()
182 for (Pair<String,Long> entry : mWhitelist) { in isWhitelisted()
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
DConversationItemViewModel.java28 import android.util.Pair;
51 static LruCache<Pair<String, Long>, ConversationItemViewModel> sConversationHeaderMap
52 = new LruCache<Pair<String, Long>, ConversationItemViewModel>(MAX_CACHE_SIZE);
146 final Pair<String, Long> key = new Pair<String, Long>(account, conversationId); in forConversationIdOrNull()
183 final Pair<String, Long> key = new Pair<String, Long>(account, conversationId); in forConversationId()
/packages/apps/EmergencyInfo/src/com/android/emergency/edit/
DEditInfoActivity.java30 import android.util.Pair;
106 protected ArrayList<Pair<String, Fragment>> setUpFragments() { in setUpFragments()
108 ArrayList<Pair<String, Fragment>> fragments = new ArrayList<>(2); in setUpFragments()
109 fragments.add(Pair.create(getResources().getString(R.string.tab_title_info), in setUpFragments()
111 fragments.add(Pair.create(getResources().getString(R.string.tab_title_contacts), in setUpFragments()
146 ArrayList<Pair<String, Fragment>> fragments = getFragments(); in onClearAllPreferences()
/packages/apps/Settings/src/com/android/settings/tts/
DTtsEngineSettingsFragment.java34 import android.util.Pair;
246 ArrayList<Pair<String, Locale>> entryPairs = in updateDefaultLocalePref()
247 new ArrayList<Pair<String, Locale>>(availableLangs.size()); in updateDefaultLocalePref()
251 entryPairs.add(new Pair<String, Locale>( in updateDefaultLocalePref()
257 Collections.sort(entryPairs, new Comparator<Pair<String, Locale>>() { in updateDefaultLocalePref()
259 public int compare(Pair<String, Locale> lhs, Pair<String, Locale> rhs) { in updateDefaultLocalePref()
273 for (Pair<String, Locale> entry : entryPairs) { in updateDefaultLocalePref()

1234