Home
last modified time | relevance | path

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

12345678910>>...20

/frameworks/base/services/tests/servicestests/src/com/android/server/job/
DWorkTypeConfigTest.java32 import android.util.Pair;
88 @NonNull List<Pair<Integer, Integer>> defaultMin, in check()
89 @NonNull List<Pair<Integer, Integer>> defaultMax, in check()
91 @NonNull List<Pair<Integer, Integer>> expectedMinLimits, in check()
92 @NonNull List<Pair<Integer, Integer>> expectedMaxLimits) throws Exception { in check()
118 for (Pair<Integer, Integer> min : expectedMinLimits) { in check()
122 for (Pair<Integer, Integer> max : expectedMaxLimits) { in check()
135 /* min */ List.of(Pair.create(WORK_TYPE_TOP, 1), Pair.create(WORK_TYPE_EJ, 0), in test()
136 Pair.create(WORK_TYPE_BG, 0), Pair.create(WORK_TYPE_BGUSER, 0)), in test()
137 /* max */ List.of(Pair.create(WORK_TYPE_TOP, 13), Pair.create(WORK_TYPE_EJ, 13), in test()
[all …]
DWorkCountTrackerTest.java34 import android.util.Pair;
194 @NonNull List<Pair<Integer, Integer>> minLimits, in recount()
195 @NonNull List<Pair<Integer, Integer>> maxLimits) { in recount()
262 @NonNull List<Pair<Integer, Integer>> minLimits, in checkRandom()
263 @NonNull List<Pair<Integer, Integer>> maxLimits, in checkRandom()
266 for (Pair<Integer, Integer> minLimit : minLimits) { in checkRandom()
287 for (Pair<Integer, Integer> maxLimit : maxLimits) { in checkRandom()
305 final List<Pair<Integer, Integer>> maxLimits = List.of(Pair.create(WORK_TYPE_BG, 4)); in testRandom1()
306 final List<Pair<Integer, Integer>> minLimits = List.of(Pair.create(WORK_TYPE_BG, 2)); in testRandom1()
320 final List<Pair<Integer, Integer>> maxLimits = in testRandom2()
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/
DFontTestUtil.java19 import android.util.Pair;
84 private static final List<Pair<Integer, Boolean>> sStyleList;
85 private static final Map<Pair<Integer, Boolean>, String> sFontMap;
86 private static final Map<Pair<Integer, Boolean>, Integer> sTtcMap;
87 private static final Map<Pair<Integer, Boolean>, String> sVariationSettingsMap;
132 ArrayList<Pair<Integer, Boolean>> styles = new ArrayList<>();
133 styles.add(new Pair<>(100, false)); in styles.add()
134 styles.add(new Pair<>(100, true)); in styles.add()
135 styles.add(new Pair<>(200, false)); in styles.add()
136 styles.add(new Pair<>(200, true)); in styles.add()
[all …]
/frameworks/base/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/
DColorUtils.java24 import android.util.Pair;
43 private static HashMap<String, Pair<Integer, Integer>> sFixedColors;
46 sFixedColors.put(".blue600", new Pair<Integer, Integer>(
48 sFixedColors.put(".green600", new Pair<Integer, Integer>(
50 sFixedColors.put(".red600", new Pair<Integer, Integer>(
52 sFixedColors.put(".yellow600", new Pair<Integer, Integer>(
54 sFixedColors.put(".blue400", new Pair<Integer, Integer>(
56 sFixedColors.put(".green400", new Pair<Integer, Integer>(
58 sFixedColors.put(".red400", new Pair<Integer, Integer>(
60 sFixedColors.put(".yellow400", new Pair<Integer, Integer>(
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DFakeStorageManager.java22 import android.util.Pair;
32 private ArrayMap<Integer, ArrayList<Pair<byte[], byte[]>>> mAuth = new ArrayMap<>();
36 getUserAuth(userId).add(new Pair<>(token, secret)); in addUserKeyAuth()
40 ArrayList<Pair<byte[], byte[]>> auths = getUserAuth(userId); in clearUserKeyAuth()
44 auths.remove(new Pair<>(token, secret)); in clearUserKeyAuth()
45 auths.add(new Pair<>(null, null)); in clearUserKeyAuth()
49 ArrayList<Pair<byte[], byte[]>> auths = mAuth.get(userId); in fixateNewestUserKeyAuth()
50 Pair<byte[], byte[]> latest = auths.get(auths.size() - 1); in fixateNewestUserKeyAuth()
55 private ArrayList<Pair<byte[], byte[]>> getUserAuth(int userId) { in getUserAuth()
57 ArrayList<Pair<byte[], byte[]>> auths = new ArrayList<Pair<byte[], byte[]>>(); in getUserAuth()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationListenersTest.java43 import android.util.Pair;
116 mListeners.setNotificationListenerFilter(Pair.create(mCn1, 0), nlf); in testWriteExtraTag()
117 mListeners.setNotificationListenerFilter(Pair.create(mCn2, 10), nlf2); in testWriteExtraTag()
137 assertThat(mListeners.getNotificationListenerFilter(Pair.create(mCn1, 0)).getTypes()) in validateListenersFromXml()
139 assertThat(mListeners.getNotificationListenerFilter(Pair.create(mCn1, 0)) in validateListenersFromXml()
143 assertThat(mListeners.getNotificationListenerFilter(Pair.create(mCn2, 10)).getTypes()) in validateListenersFromXml()
146 assertThat(mListeners.getNotificationListenerFilter(Pair.create(mCn2, 10)) in validateListenersFromXml()
157 mListeners.setNotificationListenerFilter(Pair.create(mCn1, 0), nlf); in testOnUserRemoved()
158 mListeners.setNotificationListenerFilter(Pair.create(mCn2, 10), nlf2); in testOnUserRemoved()
162 assertThat(mListeners.getNotificationListenerFilter(Pair.create(mCn1, 0))).isNull(); in testOnUserRemoved()
[all …]
/frameworks/base/tests/NetworkSecurityConfigTest/src/android/security/net/config/
DNetworkSecurityConfigTests.java24 import android.util.Pair;
125 ArraySet<Pair<Domain, NetworkSecurityConfig>> domainMap in testEmptyConfig()
126 = new ArraySet<Pair<Domain, NetworkSecurityConfig>>(); in testEmptyConfig()
134 ArraySet<Pair<Domain, NetworkSecurityConfig>> domainMap in testEmptyPerNetworkSecurityConfig()
135 = new ArraySet<Pair<Domain, NetworkSecurityConfig>>(); in testEmptyPerNetworkSecurityConfig()
136 domainMap.add(new Pair<Domain, NetworkSecurityConfig>( in testEmptyPerNetworkSecurityConfig()
152 ArraySet<Pair<Domain, NetworkSecurityConfig>> domainMap in testBadPin()
153 = new ArraySet<Pair<Domain, NetworkSecurityConfig>>(); in testBadPin()
154 domainMap.add(new Pair<Domain, NetworkSecurityConfig>( in testBadPin()
170 ArraySet<Pair<Domain, NetworkSecurityConfig>> domainMap in testGoodPin()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/
DCallQualityMetrics.java25 import android.util.Pair;
62 private ArrayList<Pair<CallQuality, Integer>> mUlSnapshots = new ArrayList<>();
65 private ArrayList<Pair<CallQuality, Integer>> mDlSnapshots = new ArrayList<>();
83 private Pair<CallQuality, Integer> mWorstSsWithGoodDlQuality;
84 private Pair<CallQuality, Integer> mBestSsWithGoodDlQuality;
85 private Pair<CallQuality, Integer> mWorstSsWithBadDlQuality;
86 private Pair<CallQuality, Integer> mBestSsWithBadDlQuality;
87 private Pair<CallQuality, Integer> mWorstSsWithGoodUlQuality;
88 private Pair<CallQuality, Integer> mBestSsWithGoodUlQuality;
89 private Pair<CallQuality, Integer> mWorstSsWithBadUlQuality;
[all …]
/frameworks/base/libs/hwui/utils/
DPair.h26 struct Pair { struct
30 Pair() {} in Pair() function
31 Pair(const Pair& o) : first(o.first), second(o.second) {} in Pair() argument
32 Pair(const F& f, const S& s) : first(f), second(s) {} in Pair() argument
42 struct trait_trivial_ctor<uirenderer::Pair<F, S> > { argument
46 struct trait_trivial_dtor<uirenderer::Pair<F, S> > {
50 struct trait_trivial_copy<uirenderer::Pair<F, S> > {
54 struct trait_trivial_move<uirenderer::Pair<F, S> > {
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DTestOnlyInsecureCertificateHelperTest.java6 import android.util.Pair;
68 Map<String, Pair<SecretKey, byte[]>> rawKeys = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_emptyKeysList()
69 Map<String, Pair<SecretKey, byte[]>> expectedResult = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_emptyKeysList()
71 Map<String, Pair<SecretKey, byte[]>> filteredKeys = in testKeepOnlyWhitelistedInsecureKeys_emptyKeysList()
79 Map<String, Pair<SecretKey, byte[]>> rawKeys = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey()
80 Map<String, Pair<SecretKey, byte[]>> expectedResult = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey()
83 rawKeys.put(alias, Pair.create(TestData.generateKey(), /*metadata=*/ null)); in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey()
85 Map<String, Pair<SecretKey, byte[]>> filteredKeys = in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey()
93 Map<String, Pair<SecretKey, byte[]>> rawKeys = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_singleWhitelistedKey()
94 Map<String, Pair<SecretKey, byte[]>> expectedResult = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_singleWhitelistedKey()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DRoundedCornersTest.java34 import android.util.Pair;
55 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testGetRoundedCorner()
81 equalTo(RoundedCorners.fromRadii(new Pair<>(10, 20), 200, 400).hashCode())); in testHashCode()
83 not(equalTo(RoundedCorners.fromRadii(new Pair<>(5, 10), 200, 400).hashCode()))); in testHashCode()
89 equalTo(RoundedCorners.fromRadii(new Pair<>(10, 20), 200, 400))); in testEquals()
92 not(equalTo(RoundedCorners.fromRadii(new Pair<>(5, 10), 200, 400)))); in testEquals()
138 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testRotateRoundedCorners_90()
154 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testRotateRoundedCorners_270()
170 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testFromRadius_cache()
178 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testFromRadius_wontCacheIfRadiusChanged()
[all …]
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
DMarshalQueryablePair.java22 import android.util.Pair;
34 implements MarshalQueryable<Pair<T1, T2>> {
36 private class MarshalerPair extends Marshaler<Pair<T1, T2>> {
37 private final Class<? super Pair<T1, T2>> mClass;
38 private final Constructor<Pair<T1, T2>> mConstructor;
45 protected MarshalerPair(TypeReference<Pair<T1, T2>> typeReference, in MarshalerPair()
83 mConstructor = (Constructor<Pair<T1, T2>>)mClass.getConstructor( in MarshalerPair()
91 public void marshal(Pair<T1, T2> value, ByteBuffer buffer) { in marshal()
103 public Pair<T1, T2> unmarshal(ByteBuffer buffer) { in unmarshal()
133 public int calculateMarshalSize(Pair<T1, T2> value) { in calculateMarshalSize()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/d2d/
DDtmfTransportConversionTest.java25 import android.util.Pair;
50 public Pair<String,String> messageAndValueDigits;
53 TestParams(Communicator.Message theMessage, Pair<String,String> theDigits, in TestParams()
99 new Pair<>("A", "A"), in generateTestCases()
105 new Pair<>("A", "B"), in generateTestCases()
111 new Pair<>("A", "C"), in generateTestCases()
118 new Pair<>("B", "A"), in generateTestCases()
124 new Pair<>("B", "B"), in generateTestCases()
130 new Pair<>("B", "C"), in generateTestCases()
137 new Pair<>("C", "A"), in generateTestCases()
[all …]
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/testing/fakes/
DFakeCryptoBackupServerTest.java24 import android.util.Pair;
68 new Pair<>(PACKAGE_NAME_1, PACKAGE_KEY_1), in getAllTertiaryKeys_returnsWrappedKeys()
69 new Pair<>(PACKAGE_NAME_2, PACKAGE_KEY_2)); in getAllTertiaryKeys_returnsWrappedKeys()
84 new Pair<>(PACKAGE_NAME_1, PACKAGE_KEY_1), in addTertiaryKeys_updatesExistingSet()
85 new Pair<>(PACKAGE_NAME_2, PACKAGE_KEY_2))); in addTertiaryKeys_updatesExistingSet()
90 new Pair<>(PACKAGE_NAME_1, replacementKey), in addTertiaryKeys_updatesExistingSet()
91 new Pair<>(PACKAGE_NAME_3, PACKAGE_KEY_3))); in addTertiaryKeys_updatesExistingSet()
96 new Pair<>(PACKAGE_NAME_1, replacementKey), in addTertiaryKeys_updatesExistingSet()
97 new Pair<>(PACKAGE_NAME_2, PACKAGE_KEY_2), in addTertiaryKeys_updatesExistingSet()
98 new Pair<>(PACKAGE_NAME_3, PACKAGE_KEY_3))); in addTertiaryKeys_updatesExistingSet()
[all …]
/frameworks/base/core/java/android/util/
DPair.java28 public class Pair<F, S> { class
38 public Pair(F first, S second) { in Pair() method in Pair
53 if (!(o instanceof Pair)) { in equals()
56 Pair<?, ?> p = (Pair<?, ?>) o; in equals()
81 public static <A, B> Pair <A, B> create(A a, B b) { in create()
82 return new Pair<A, B>(a, b); in create()
/frameworks/base/services/core/java/com/android/server/hdmi/
DHdmiLogger.java21 import android.util.Pair;
52 private final HashMap<String, Pair<Long, Integer>> mWarningTimingCache = new HashMap<>();
54 private final HashMap<String, Pair<Long, Integer>> mErrorTimingCache = new HashMap<>();
112 private static String updateLog(HashMap<String, Pair<Long, Integer>> cache, String logMessage) { in updateLog()
114 Pair<Long, Integer> timing = cache.get(logMessage); in updateLog()
117 cache.put(logMessage, new Pair<>(curTime, 1)); in updateLog()
125 private static String buildMessage(String message, @Nullable Pair<Long, Integer> timing) { in buildMessage()
131 private static void increaseLogCount(HashMap<String, Pair<Long, Integer>> cache, in increaseLogCount()
133 Pair<Long, Integer> timing = cache.get(message); in increaseLogCount()
135 cache.put(message, new Pair<>(timing.first, timing.second + 1)); in increaseLogCount()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/android/telephony/ims/
DImsConfigImplTest.java26 import android.util.Pair;
46 public Pair<Integer, Integer> latestIntConfig;
47 public Pair<Integer, String> latestStringConfig;
53 latestIntConfig = new Pair<>(item, value); in setConfig()
59 latestStringConfig = new Pair<>(item, value); in setConfig()
111 final LinkedBlockingQueue<Pair<Integer, Integer>> mConfigChanges = in testIntCaching()
117 mConfigChanges.offer(new Pair<>(item, value)); in testIntCaching()
125 Pair<Integer, Integer> callbackResult = mConfigChanges.poll(); in testIntCaching()
140 final LinkedBlockingQueue<Pair<Integer, String>> mConfigChanges = in testStringCaching()
148 mConfigChanges.offer(new Pair<>(item, value)); in testStringCaching()
[all …]
/frameworks/av/media/img_utils/include/img_utils/
DPair.h29 class ANDROID_API Pair {
34 Pair() {} in Pair() function
36 Pair(const Pair& o) : first(o.first), second(o.second) {} in Pair() function
38 Pair(const F& f, const S& s) : first(f), second(s) {} in Pair() function
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DServiceStateTest.java27 import android.util.Pair;
147 ArrayList<Pair<Integer, Boolean>> rats = new ArrayList<Pair<Integer, Boolean>>(); in testRAT()
149 rats.add(new Pair<Integer, Boolean>(ServiceState.RIL_RADIO_TECHNOLOGY_IS95A, true)); in testRAT()
150 rats.add(new Pair<Integer, Boolean>(ServiceState.RIL_RADIO_TECHNOLOGY_IS95B, true)); in testRAT()
151 rats.add(new Pair<Integer, Boolean>(ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT, true)); in testRAT()
152 rats.add(new Pair<Integer, Boolean>(ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_0, true)); in testRAT()
153 rats.add(new Pair<Integer, Boolean>(ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_A, true)); in testRAT()
154 rats.add(new Pair<Integer, Boolean>(ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_B, true)); in testRAT()
155 rats.add(new Pair<Integer, Boolean>(ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD, true)); in testRAT()
157 rats.add(new Pair<Integer, Boolean>(ServiceState.RIL_RADIO_TECHNOLOGY_GPRS, false)); in testRAT()
[all …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/util/
DDynamicIdMap.java20 import com.android.utils.Pair;
30 private final Map<Pair<ResourceType, String>, Integer> mDynamicIds = new HashMap<>();
31 private final SparseArray<Pair<ResourceType, String>> mRevDynamicIds = new SparseArray<>();
54 return getId(Pair.of(type, name)); in getId()
65 public Integer getId(Pair<ResourceType, String> resource) { in getId()
76 public Pair<ResourceType, String> resolveId(int id) { in resolveId()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DBluetoothUtils.java20 import android.util.Pair;
73 public static Pair<Drawable, String> getBtClassDrawableWithDescription(Context context, in getBtClassDrawableWithDescription()
79 return new Pair<>(getBluetoothDrawable(context, in getBtClassDrawableWithDescription()
84 return new Pair<>( in getBtClassDrawableWithDescription()
90 return new Pair<>( in getBtClassDrawableWithDescription()
95 return new Pair<>( in getBtClassDrawableWithDescription()
109 return new Pair<>(getBluetoothDrawable(context, resId), null); in getBtClassDrawableWithDescription()
114 return new Pair<>( in getBtClassDrawableWithDescription()
120 return new Pair<>( in getBtClassDrawableWithDescription()
126 return new Pair<>( in getBtClassDrawableWithDescription()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DFgsTempAllowList.java24 import android.util.Pair;
48 private final SparseArray<Pair<Long, E>> mTempAllowList = new SparseArray<>();
96 final Pair<Long, E> existing = mTempAllowList.get(uid); in add()
99 mTempAllowList.put(uid, new Pair(expirationTime, entry)); in add()
110 public Pair<Long, E> get(int uid) { in get()
129 Pair<Long, E> entry = get(uid); in isAllowed()
160 public void forEach(BiConsumer<Integer, Pair<Long, E>> callback) { in forEach()
164 final Pair<Long, E> entry = mTempAllowList.valueAt(i); in forEach()
/frameworks/base/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/hp/
DServiceResolveQueue.java21 import android.util.Pair;
29 private final LinkedList<Pair<NsdServiceInfo, ResolveCallback>> mQueue = new LinkedList<>();
35 private Pair<NsdServiceInfo, ResolveCallback> mCurrentRequest = null;
63 Pair<NsdServiceInfo, ResolveCallback> newRequest = Pair.create(serviceInfo, callback); in queueRequest()
72 Pair<NsdServiceInfo, ResolveCallback> newRequest = Pair.create(serviceInfo, callback); in removeRequest()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/
DEncryptedKvBackupTaskTest.java30 import android.util.Pair;
111 new Pair<>(TEST_KEY_1, TEST_HASH_1), in setUp()
112 new Pair<>(TEST_KEY_2, TEST_HASH_2))); in setUp()
116 new Pair<>(TEST_HASH_1, TEST_LENGTH_1), in setUp()
117 new Pair<>(TEST_HASH_2, TEST_LENGTH_2))); in setUp()
141 createKeyValueListing(CryptoTestUtils.mapOf(new Pair<>(TEST_KEY_1, TEST_HASH_1)))); in testPerformBackup_rotationRequired_deletesListings()
144 createChunkListing(CryptoTestUtils.mapOf(new Pair<>(TEST_HASH_1, TEST_LENGTH_1)))); in testPerformBackup_rotationRequired_deletesListings()
161 createKeyValueListing(CryptoTestUtils.mapOf(new Pair<>(TEST_KEY_1, TEST_HASH_1)))); in testPerformBackup_rotationRequiredButIncremental_throws()
164 createChunkListing(CryptoTestUtils.mapOf(new Pair<>(TEST_HASH_1, TEST_LENGTH_1)))); in testPerformBackup_rotationRequiredButIncremental_throws()
177 createKeyValueListing(CryptoTestUtils.mapOf(new Pair<>(TEST_KEY_1, TEST_HASH_1)))); in testPerformBackup_rotationRequiredAndNonIncremental_performsNonIncrementalBackup()
[all …]
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DHeavyHitterSketchTest.java20 import android.util.Pair;
53 public List<Pair<T, Float>> getTopHeavyHitters(final int k) { in getTopHeavyHitters()
59 .map((v) -> new Pair<T, Float>(v.getKey(), (float) v.getValue() / mTotalInput)) in getTopHeavyHitters()
64 private List<Pair<Integer, Float>> getTopHeavyHitters(final int[] input, final int capacity) { in getTopHeavyHitters()
81 final List<Pair<Integer, Float>> result = new ArrayList<>(); in getTopHeavyHitters()
84 final List<Pair<Integer, Float>> cl = counter.getTopHeavyHitters(capacity - 1); in getTopHeavyHitters()
86 final Pair<Integer, Float> pair = cl.get(i); in getTopHeavyHitters()
89 result.add(new Pair<>(tops.get(i), freqs.get(i))); in getTopHeavyHitters()
111 final List<Pair<Integer, Float>> result = getTopHeavyHitters(input, capacity);
120 final Pair<Integer, Float> pair = result.get(i);
[all …]

12345678910>>...20