/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | CollectionUtilsTest.kt | 37 assertTrue(CollectionUtils.any(listOf("A", "B", "C", "D", "E")) { it == "E" }) in testAny() 38 assertFalse(CollectionUtils.any(listOf("A", "B", "C", "D", "E")) { it == "F" }) in testAny() 39 assertTrue(CollectionUtils.any(listOf("AA", "BBB")) { it.length >= 3 }) in testAny() 40 assertFalse(CollectionUtils.any(listOf("A", "BB", "CCC")) { it.length >= 4 }) in testAny() 41 assertFalse(CollectionUtils.any(listOf("A", "BB", "CCC")) { it.length < 0 }) in testAny() 42 assertFalse(CollectionUtils.any(listOf<String>()) { true }) in testAny() 43 assertFalse(CollectionUtils.any(listOf<String>()) { false }) in testAny() 44 assertTrue(CollectionUtils.any(listOf("A")) { true }) in testAny() 45 assertFalse(CollectionUtils.any(listOf("A")) { false }) in testAny() 50 assertEquals(4, CollectionUtils.indexOf(listOf("A", "B", "C", "D", "E")) { it == "E" }) in testIndexOf() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/ |
D | CollectionUtilsTests.java | 27 import com.android.inputmethod.latin.common.CollectionUtils; 54 CollectionUtils.arrayAsList(array, -1, 1); in testArrayAsListFailure() 61 CollectionUtils.arrayAsList(array, 1, -1); in testArrayAsListFailure() 68 CollectionUtils.arrayAsList(array, 1, 3); in testArrayAsListFailure() 82 assertEquals(empty, CollectionUtils.arrayAsList(new String[] {}, 0, 0)); in testArrayAsList() 84 assertEquals(empty, CollectionUtils.arrayAsList(array, 0, 0)); in testArrayAsList() 85 assertEquals(empty, CollectionUtils.arrayAsList(array, 1, 1)); in testArrayAsList() 86 assertEquals(empty, CollectionUtils.arrayAsList(array, array.length, array.length)); in testArrayAsList() 88 assertEquals(expected123, CollectionUtils.arrayAsList(array, 1, 4)); in testArrayAsList() 97 assertTrue(CollectionUtils.isNullOrEmpty((List<String>) null)); in testIsNullOrEmpty() [all …]
|
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/util/ |
D | CollectionUtilsTest.kt | 19 import com.android.permissioncontroller.permission.utils.CollectionUtils 28 assertThat(CollectionUtils.contains(byteArrays, TEST_BYTE_ARRAY_1)).isTrue() in testContains_true() 35 assertThat(CollectionUtils.contains(byteArrays, TEST_BYTE_ARRAY_4)).isFalse() in testContains_false() 43 assertThat(CollectionUtils.containsSubset(byteArrays, otherByteArrays)).isTrue() in testContainsSubset_true() 51 assertThat(CollectionUtils.containsSubset(byteArrays, otherByteArrays)).isFalse() in testContainsSubset_false()
|
/packages/modules/Connectivity/framework-t/src/android/net/ |
D | NetworkTemplate.java | 56 import com.android.net.module.util.CollectionUtils; 421 if (CollectionUtils.contains(matchSubscriberIds, null)) { in checkValidMatchSubscriberIds() 431 && CollectionUtils.contains(matchSubscriberIds, null)) { in checkValidMatchSubscriberIds() 652 return CollectionUtils.isEmpty(mMatchSubscriberIds) ? null : mMatchSubscriberIds[0]; in getSubscriberId() 794 || CollectionUtils.contains(mMatchSubscriberIds, subscriberId); in matchesSubscriberId() 813 return CollectionUtils.isEmpty(mMatchWifiNetworkKeys); in matchesWifiNetworkKey() 815 return CollectionUtils.isEmpty(mMatchWifiNetworkKeys) in matchesWifiNetworkKey() 816 || CollectionUtils.contains(mMatchWifiNetworkKeys, wifiNetworkKey); in matchesWifiNetworkKey() 827 return (CollectionUtils.isEmpty(mMatchSubscriberIds) in matchesMobile() 828 || CollectionUtils.contains(mMatchSubscriberIds, ident.mSubscriberId)) in matchesMobile() [all …]
|
/packages/modules/Connectivity/service-t/src/com/android/server/net/ |
D | NetworkStatsSubscriptionsMonitor.java | 38 import com.android.net.module.util.CollectionUtils; 117 if (CollectionUtils.any(mRatListeners, it -> it.equalsKey(sub.first, sub.second))) { in onSubscriptionsChanged() 132 if (!CollectionUtils.any(filteredNewSubs, in onSubscriptionsChanged() 154 final int index = CollectionUtils.indexOf(mRatListeners, in getRatTypeForSubscriberId()
|
/packages/modules/Connectivity/service/src/com/android/server/connectivity/ |
D | QosCallbackTracker.java | 33 import com.android.net.module.util.CollectionUtils; 121 if (CollectionUtils.any(mConnections, c -> c.getBinder().equals(binder))) { in handleRegisterCallbackInternal() 161 CollectionUtils.indexOf(mConnections, c -> c.getBinder().equals(binder)); in handleUnregisterCallback() 266 final int acIndex = CollectionUtils.indexOf(mConnections, in runOnAgentConnection()
|
D | NetworkRanker.java | 28 import static com.android.net.module.util.CollectionUtils.filter; 45 import com.android.net.module.util.CollectionUtils; 199 if (!CollectionUtils.any(accepted, n -> n.getScore().hasPolicy(POLICY_YIELD_TO_BAD_WIFI))) { in applyYieldToBadWifiPolicy() 203 if (!CollectionUtils.any(rejected, n -> isPreferredBadWiFi(n))) { in applyYieldToBadWifiPolicy() 207 if (CollectionUtils.all(accepted, n -> n.getScore().hasPolicy(POLICY_YIELD_TO_BAD_WIFI))) { in applyYieldToBadWifiPolicy()
|
D | ConnectivityNativeService.java | 31 import com.android.net.module.util.CollectionUtils; 136 return CollectionUtils.toIntArray(portMap); in getPortsBlockedForBind()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | MoreKeySpec.java | 24 import com.android.inputmethod.latin.common.CollectionUtils; 245 out = CollectionUtils.arrayAsList(array, 0, i); in filterOutEmptyString() 280 out = CollectionUtils.arrayAsList(moreKeys, 0, moreKeyIndex); in insertAdditionalMoreKeys() 292 out = CollectionUtils.arrayAsList(additionalMoreKeys, additionalIndex, additionalCount); in insertAdditionalMoreKeys() 299 out = CollectionUtils.arrayAsList(moreKeys, 0, moreKeysCount); in insertAdditionalMoreKeys()
|
/packages/modules/Permission/service/java/com/android/permission/util/ |
D | CollectionUtils.java | 28 public class CollectionUtils { class 29 private CollectionUtils() {} in CollectionUtils() method in CollectionUtils
|
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
D | CollectionUtils.java | 31 public final class CollectionUtils { class 32 private CollectionUtils() { in CollectionUtils() method in CollectionUtils
|
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/util/ |
D | CollectionUtils.java | 31 public final class CollectionUtils { class 33 private CollectionUtils() {} in CollectionUtils() method in CollectionUtils
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/ |
D | CollectionUtils.java | 31 public final class CollectionUtils { class 33 private CollectionUtils() {} in CollectionUtils() method in CollectionUtils
|
/packages/modules/Connectivity/thread/framework/java/android/net/thread/ |
D | ThreadNetworkManager.java | 28 import com.android.net.module.util.CollectionUtils; 119 return CollectionUtils.map(controllerServices, ThreadNetworkController::new); in makeControllers()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/actions/ |
D | RestrictAppAction.java | 25 import com.android.internal.util.CollectionUtils; 57 if (CollectionUtils.isEmpty(appInfo.anomalyTypes)) { in handlePositiveAction()
|
/packages/modules/Connectivity/tests/unit/java/android/net/ |
D | IpSecAlgorithmTest.java | 34 import com.android.internal.util.CollectionUtils; 197 return CollectionUtils.filter( in getMandatoryAlgos() 204 return CollectionUtils.filter( in getOptionalAlgos()
|
/packages/modules/NetworkStack/src/com/android/networkstack/metrics/ |
D | DataStallDetectionStats.java | 27 import com.android.net.module.util.CollectionUtils; 303 CollectionUtils.toIntArray(mDnsReturnCode), in build() 304 CollectionUtils.toLongArray(mDnsTimeStamp), in build()
|
/packages/apps/Settings/src/com/android/settings/applications/appinfo/ |
D | DefaultAppShortcutPreferenceControllerBase.java | 26 import com.android.internal.util.CollectionUtils; 120 final String packageName = CollectionUtils.firstOrNull(mRoleManager.getRoleHolders( in isDefaultApp()
|
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/ |
D | MdnsProber.java | 25 import com.android.net.module.util.CollectionUtils; 116 return CollectionUtils.any(records, in containsName()
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | BluetoothDetailsRelatedToolsController.java | 33 import com.android.net.module.util.CollectionUtils; 80 if (!CollectionUtils.isEmpty(relatedToolsList)) { in init()
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/defaultapps/ |
D | DefaultAssistantPickerEntryPreferenceController.java | 34 import com.android.internal.util.CollectionUtils; 93 String assistantPkgName = CollectionUtils.firstOrNull( in getComponentName()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/ |
D | RequestRoleActivity.java | 40 import com.android.permissioncontroller.permission.utils.CollectionUtils; 250 String holderPackageName = CollectionUtils.firstOrNull(roleManager.getRoleHolders( in handleChangeDefaultDialerDialogCompatibility() 302 String holderPackageName = CollectionUtils.firstOrNull(roleManager.getRoleHolders( in handleSmsDefaultDialogCompatibility()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/behavior/ |
D | HomeRoleUiBehavior.java | 35 import com.android.permissioncontroller.permission.utils.CollectionUtils; 56 String packageName = CollectionUtils.firstOrNull(roleManager.getRoleHoldersAsUser( in preparePreferenceAsUser()
|
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/behavior/ |
D | SmsRoleBehavior.java | 34 import com.android.role.controller.util.CollectionUtils; 113 return CollectionUtils.firstOrNull(qualifyingPackageNames); in getFallbackHolderAsUser()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/ |
D | BatteryTipUtils.java | 27 import com.android.internal.util.CollectionUtils; 58 for (int i = 0, size = CollectionUtils.size(packageOpsList); i < size; i++) { in getRestrictedAppsList()
|