Home
last modified time | relevance | path

Searched refs:Utils (Results 1 – 25 of 192) sorted by relevance

12345678

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DUtilsTest.java33 assertEquals("null", Utils.roamingConsortiumsToString((long[]) null)); in testRoamingConsortiumsToStringLong()
37 String result = Utils.roamingConsortiumsToString(ois); in testRoamingConsortiumsToStringLong()
44 assertEquals("", Utils.roamingConsortiumsToString(ois)); in testRoamingConsortiumsToStringCollection()
50 String result = Utils.roamingConsortiumsToString(ois); in testRoamingConsortiumsToStringCollection()
56 assertEquals("", Utils.toUnicodeEscapedString("")); in testToUnicodeEscapedString()
69 Utils.toUnicodeEscapedString(unescapedStringBuilder.toString())); in testToUnicodeEscapedString()
74 assertEquals("null", Utils.toHexString(null)); in testToHexString()
78 String result = Utils.toHexString(bytes); in testToHexString()
84 assertEquals("", Utils.toHex(new byte[0])); in testToHex()
88 String result = Utils.toHex(bytes); in testToHex()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/
DUtilsTest.java48 Utils.combineAuthenticatorBundles(bundle); in testCombineAuthenticatorBundles_withKeyDeviceCredential_andKeyAuthenticators()
61 Utils.combineAuthenticatorBundles(bundle); in testCombineAuthenticatorBundles_withNoKeyDeviceCredential_andKeyAuthenticators()
73 Utils.combineAuthenticatorBundles(bundle); in testCombineAuthenticatorBundles_withKeyDeviceCredential_andNoKeyAuthenticators()
84 Utils.combineAuthenticatorBundles(bundle); in testCombineAuthenticatorBundles_withNoKeyDeviceCredential_andNoKeyAuthenticators()
94 assertFalse(Utils.isCredentialRequested(authenticators)); in testIsDeviceCredentialAllowed_withIntegerFlags()
97 assertTrue(Utils.isCredentialRequested(authenticators)); in testIsDeviceCredentialAllowed_withIntegerFlags()
100 assertTrue(Utils.isCredentialRequested(authenticators)); in testIsDeviceCredentialAllowed_withIntegerFlags()
106 assertFalse(Utils.isCredentialRequested(bundle)); in testIsDeviceCredentialAllowed_withBundle()
110 assertFalse(Utils.isCredentialRequested(bundle)); in testIsDeviceCredentialAllowed_withBundle()
114 assertTrue(Utils.isCredentialRequested(bundle)); in testIsDeviceCredentialAllowed_withBundle()
[all …]
/frameworks/base/tests/WindowAnimationJank/src/android/windowanimationjank/
DFullscreenRotationTest.java35 Utils.startElementLayout(getInstrumentation(), 100); in beforeTest()
41 Utils.rotateDevice(getInstrumentation(), Utils.ROTATION_MODE_NATURAL); in afterTest()
46 @GfxMonitor(processName=Utils.PACKAGE)
49 Utils.rotateDevice(getInstrumentation(), in testRotation()
50 Utils.getDeviceRotation(getInstrumentation()) == Utils.ROTATION_MODE_LEFT ? in testRotation()
51 Utils.ROTATION_MODE_RIGHT : Utils.ROTATION_MODE_LEFT); in testRotation()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DDualToneHandler.kt22 import com.android.settingslib.Utils
52 Utils.getThemeAttr(context, R.attr.darkIconTheme)) in setColorsFromContext()
54 Utils.getThemeAttr(context, R.attr.lightIconTheme)) in setColorsFromContext()
56 Utils.getColorAttrDefaultColor(dualToneDarkTheme, R.attr.singleToneColor), in setColorsFromContext()
57 Utils.getColorAttrDefaultColor(dualToneDarkTheme, R.attr.backgroundColor), in setColorsFromContext()
58 Utils.getColorAttrDefaultColor(dualToneDarkTheme, R.attr.fillColor)) in setColorsFromContext()
60 Utils.getColorAttrDefaultColor(dualToneLightTheme, R.attr.singleToneColor), in setColorsFromContext()
61 Utils.getColorAttrDefaultColor(dualToneLightTheme, R.attr.backgroundColor), in setColorsFromContext()
62 Utils.getColorAttrDefaultColor(dualToneLightTheme, R.attr.fillColor)) in setColorsFromContext()
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextClassifierUtilsTest.java44 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
51 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
58 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
65 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
70 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
81 assertThrows(() -> TextClassifier.Utils.getSubString(null, 0, 1, minimumLength)); in testGetSubString_invalidParams()
83 assertThrows(() -> TextClassifier.Utils.getSubString(text, 6, 5, minimumLength)); in testGetSubString_invalidParams()
85 assertThrows(() -> TextClassifier.Utils.getSubString(text, -1, 5, minimumLength)); in testGetSubString_invalidParams()
87 assertThrows(() -> TextClassifier.Utils.getSubString(text, 6, length + 1, minimumLength)); in testGetSubString_invalidParams()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DUtilsTest.java18 import static com.android.settingslib.Utils.STORAGE_MANAGER_ENABLED_PROPERTY;
90 Utils.updateLocationEnabled(mContext, true, currentUserId, in testUpdateLocationEnabled()
105 final String percentage = Utils.formatPercentage(TEST_PERCENTAGES[i], true); in testFormatPercentage_RoundTrue_RoundUpIfPossible()
117 final String percentage = Utils.formatPercentage(TEST_PERCENTAGES[i], false); in testFormatPercentage_RoundFalse_NoRound()
133 assertThat(Utils.getDefaultStorageManagerDaysToRetain(resources)).isEqualTo(60); in testGetDefaultStorageManagerDaysToRetain_storageManagerDaysToRetainUsesResources()
139 assertThat(Utils.isStorageManagerEnabled(mContext)).isTrue(); in testIsStorageManagerEnabled_UsesSystemProperties()
184 assertThat(Utils.isAudioModeOngoingCall(mContext)).isTrue(); in isAudioModeOngoingCall_modeInCommunication_returnTrue()
191 assertThat(Utils.isAudioModeOngoingCall(mContext)).isTrue(); in isAudioModeOngoingCall_modeInCall_returnTrue()
198 assertThat(Utils.isAudioModeOngoingCall(mContext)).isTrue(); in isAudioModeOngoingCall_modeRingtone_returnTrue()
205 assertThat(Utils.isAudioModeOngoingCall(mContext)).isFalse(); in isAudioModeOngoingCall_modeNormal_returnFalse()
[all …]
/frameworks/base/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/localdrive/
DLocalDrive.java21 import com.android.statsd.shelltools.Utils;
97 Utils.setUpLogger(sLogger, DEBUG); in main()
113 List<String> connectedDevices = Utils.getDeviceSerials(sLogger); in main()
114 deviceSerial = Utils.chooseDevice(deviceSerial, connectedDevices, in main()
115 Utils.getDefaultDevice(sLogger), sLogger); in main()
120 if (!Utils.isAcceptableStatsd(sLogger, MIN_SDK, MIN_CODENAME, deviceSerial)) { in main()
199 Utils.runCommand(null, sLogger, "adb", "shell", Utils.CMD_REMOVE_CONFIG, in updateConfig()
200 Utils.SHELL_UID, String.valueOf(configId)); in updateConfig()
201 Utils.getReportList(configId, true /* clearData */, true /* SHELL_UID */, sLogger, in updateConfig()
235 Utils.runCommand(null, sLogger, "adb", "push", configLocation, remotePath); in updateConfig()
[all …]
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/
DAndroidAppAsset.java68 writer.writeFieldLower(Utils.NAMESPACE_FIELD, Utils.NAMESPACE_ANDROID_APP); in toJson()
69 writer.writeFieldLower(Utils.ANDROID_APP_ASSET_FIELD_PACKAGE_NAME, mPackageName); in toJson()
70 writer.writeArrayUpper(Utils.ANDROID_APP_ASSET_FIELD_CERT_FPS, mCertFingerprints); in toJson()
117 String packageName = asset.optString(Utils.ANDROID_APP_ASSET_FIELD_PACKAGE_NAME); in create()
120 Utils.ANDROID_APP_ASSET_FIELD_PACKAGE_NAME)); in create()
123 JSONArray certArray = asset.optJSONArray(Utils.ANDROID_APP_ASSET_FIELD_CERT_FPS); in create()
127 Utils.ANDROID_APP_ASSET_FIELD_CERT_FPS)); in create()
136 Utils.ANDROID_APP_ASSET_FIELD_CERT_FPS)); in create()
DAssetFactory.java37 String namespace = asset.optString(Utils.NAMESPACE_FIELD, null); in create()
40 FIELD_NOT_STRING_FORMAT_STRING, Utils.NAMESPACE_FIELD)); in create()
43 if (namespace.equals(Utils.NAMESPACE_WEB)) { in create()
45 } else if (namespace.equals(Utils.NAMESPACE_ANDROID_APP)) { in create()
DWebAsset.java76 writer.writeFieldLower(Utils.NAMESPACE_FIELD, Utils.NAMESPACE_WEB); in toJson()
77 writer.writeFieldLower(Utils.WEB_ASSET_FIELD_SITE, mUrl.toExternalForm()); in toJson()
122 if (asset.optString(Utils.WEB_ASSET_FIELD_SITE).equals("")) { in create()
124 Utils.WEB_ASSET_FIELD_SITE)); in create()
129 url = new URL(asset.optString(Utils.WEB_ASSET_FIELD_SITE)); in create()
DAssetMatcherFactory.java34 String namespace = queryObject.optString(Utils.NAMESPACE_FIELD, null); in create()
37 FIELD_NOT_STRING_FORMAT_STRING, Utils.NAMESPACE_FIELD)); in create()
40 if (namespace.equals(Utils.NAMESPACE_WEB)) { in create()
42 } else if (namespace.equals(Utils.NAMESPACE_ANDROID_APP)) { in create()
DStatementParser.java87 if (statement.optString(Utils.DELEGATE_FIELD_DELEGATE, null) != null) { in parseStatement()
88 delegates.add(statement.optString(Utils.DELEGATE_FIELD_DELEGATE)); in parseStatement()
90 JSONObject targetObject = statement.optJSONObject(Utils.ASSET_DESCRIPTOR_FIELD_TARGET); in parseStatement()
93 FIELD_NOT_STRING_FORMAT_STRING, Utils.ASSET_DESCRIPTOR_FIELD_TARGET)); in parseStatement()
96 JSONArray relations = statement.optJSONArray(Utils.ASSET_DESCRIPTOR_FIELD_RELATION); in parseStatement()
99 FIELD_NOT_ARRAY_FORMAT_STRING, Utils.ASSET_DESCRIPTOR_FIELD_RELATION)); in parseStatement()
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
DAuthCredentialView.java86 protected @Utils.CredentialType int mCredentialType;
169 Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this); in setTextOrHide()
188 void setCredentialType(@Utils.CredentialType int credentialType) { in setCredentialType()
224 final boolean isManagedProfile = Utils.isManagedProfile(mContext, mEffectiveUserId); in onAttachedToWindow()
315 case Utils.CREDENTIAL_PIN: in onCredentialVerified()
318 case Utils.CREDENTIAL_PATTERN: in onCredentialVerified()
321 case Utils.CREDENTIAL_PASSWORD: in onCredentialVerified()
401 @UserType int userType, @Utils.CredentialType int credentialType) { in getLastAttemptBeforeWipeMessageRes()
415 @Utils.CredentialType int credentialType) { in getLastAttemptBeforeWipeDeviceMessageRes()
417 case Utils.CREDENTIAL_PIN: in getLastAttemptBeforeWipeDeviceMessageRes()
[all …]
/frameworks/base/keystore/java/android/security/keystore/
DKeyGenParameterSpec.java342 mCertificateNotBefore = Utils.cloneIfNotNull(certificateNotBefore); in KeyGenParameterSpec()
343 mCertificateNotAfter = Utils.cloneIfNotNull(certificateNotAfter); in KeyGenParameterSpec()
344 mKeyValidityStart = Utils.cloneIfNotNull(keyValidityStart); in KeyGenParameterSpec()
345 mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(keyValidityForOriginationEnd); in KeyGenParameterSpec()
346 mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(keyValidityForConsumptionEnd); in KeyGenParameterSpec()
358 mAttestationChallenge = Utils.cloneIfNotNull(attestationChallenge); in KeyGenParameterSpec()
430 return Utils.cloneIfNotNull(mCertificateNotBefore); in getCertificateNotBefore()
439 return Utils.cloneIfNotNull(mCertificateNotAfter); in getCertificateNotAfter()
448 return Utils.cloneIfNotNull(mKeyValidityStart); in getKeyValidityStart()
457 return Utils.cloneIfNotNull(mKeyValidityForConsumptionEnd); in getKeyValidityForConsumptionEnd()
[all …]
DKeyInfo.java115 mKeyValidityStart = Utils.cloneIfNotNull(keyValidityStart); in KeyInfo()
116 mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(keyValidityForOriginationEnd); in KeyInfo()
117 mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(keyValidityForConsumptionEnd); in KeyInfo()
173 return Utils.cloneIfNotNull(mKeyValidityStart); in getKeyValidityStart()
183 return Utils.cloneIfNotNull(mKeyValidityForConsumptionEnd); in getKeyValidityForConsumptionEnd()
193 return Utils.cloneIfNotNull(mKeyValidityForOriginationEnd); in getKeyValidityForOriginationEnd()
DKeyProtection.java260 mKeyValidityStart = Utils.cloneIfNotNull(keyValidityStart); in KeyProtection()
261 mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(keyValidityForOriginationEnd); in KeyProtection()
262 mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(keyValidityForConsumptionEnd); in KeyProtection()
291 return Utils.cloneIfNotNull(mKeyValidityStart); in getKeyValidityStart()
301 return Utils.cloneIfNotNull(mKeyValidityForConsumptionEnd); in getKeyValidityForConsumptionEnd()
311 return Utils.cloneIfNotNull(mKeyValidityForOriginationEnd); in getKeyValidityForOriginationEnd()
599 mKeyValidityStart = Utils.cloneIfNotNull(startDate); in setKeyValidityStart()
628 mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(endDate); in setKeyValidityForOriginationEnd()
642 mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(endDate); in setKeyValidityForConsumptionEnd()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DPasspointEventHandler.java85 Utils.macToString(bssid), querySets.first, querySets.second)) { in requestANQP()
86 Log.d(Utils.hs2LogTag(getClass()), "ANQP failed on " + Utils.macToString(bssid)); in requestANQP()
89 Log.d(Utils.hs2LogTag(getClass()), "ANQP initiated on " + Utils.macToString(bssid)); in requestANQP()
102 mSupplicantHook.getClientInterfaceName(), Utils.macToString(bssid), fileName); in requestIcon()
DDomainMatcher.java21 import com.android.server.wifi.hotspot2.Utils;
129 List<String> secondaryLabel = Utils.splitDomain(domain); in DomainMatcher()
137 List<String> primaryLabel = Utils.splitDomain(primaryDomain); in DomainMatcher()
162 List<String> domainLabels = Utils.splitDomain(domainName); in isSubDomain()
192 List<String> labels1 = Utils.splitDomain(domain1); in arg2SubdomainOfArg1()
193 List<String> labels2 = Utils.splitDomain(domain2); in arg2SubdomainOfArg1()
/frameworks/opt/net/wifi/libs/WifiTrackerLib/src/com/android/wifitrackerlib/
DPasspointWifiEntry.java23 import static com.android.wifitrackerlib.Utils.getAppLabel;
24 import static com.android.wifitrackerlib.Utils.getAutoConnectDescription;
25 import static com.android.wifitrackerlib.Utils.getAverageSpeedFromScanResults;
26 import static com.android.wifitrackerlib.Utils.getBestScanResultByLevel;
27 import static com.android.wifitrackerlib.Utils.getCarrierNameForSubId;
28 import static com.android.wifitrackerlib.Utils.getCurrentNetworkCapabilitiesInformation;
29 import static com.android.wifitrackerlib.Utils.getDisconnectedStateDescription;
30 import static com.android.wifitrackerlib.Utils.getImsiProtectionDescription;
31 import static com.android.wifitrackerlib.Utils.getMeteredDescription;
32 import static com.android.wifitrackerlib.Utils.getNetworkDetailedState;
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DNavigationHandle.java30 import com.android.settingslib.Utils;
52 final int dualToneDarkTheme = Utils.getThemeAttr(context, R.attr.darkIconTheme); in NavigationHandle()
53 final int dualToneLightTheme = Utils.getThemeAttr(context, R.attr.lightIconTheme); in NavigationHandle()
56 mLightColor = Utils.getColorAttrDefaultColor(lightContext, R.attr.homeHandleColor); in NavigationHandle()
57 mDarkColor = Utils.getColorAttrDefaultColor(darkContext, R.attr.homeHandleColor); in NavigationHandle()
/frameworks/base/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/testdrive/
DTestDrive.java32 import com.android.statsd.shelltools.Utils;
88 Utils.setUpLogger(LOGGER, false); in main()
91 Utils.getDeviceSerials(LOGGER), Utils.getDefaultDevice(LOGGER))) { in main()
133 mDeviceSerial = Utils.chooseDevice(mDeviceSerial, connectedDevices, defaultDevice, LOGGER); in processArgs()
173 Utils.logAppBreadcrumb(0, 0, LOGGER, mDeviceSerial); in testDriveAndGetReports()
176 return Utils.getReportList(CONFIG_ID, true, false, LOGGER, in testDriveAndGetReports()
184 Utils.runCommand(null, LOGGER, in testDriveAndGetReports()
403 Utils.runCommand(null, LOGGER, "adb", "-s", deviceSerial, in pushConfig()
405 Utils.runCommand(null, LOGGER, "adb", "-s", deviceSerial, in pushConfig()
406 "shell", "cat", remotePath, "|", Utils.CMD_UPDATE_CONFIG, in pushConfig()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
DDataUsageGraph.java27 import com.android.settingslib.Utils;
48 mTrackColor = Utils.getColorStateListDefaultColor(context, in DataUsageGraph()
50 mWarningColor = Utils.getColorStateListDefaultColor(context, in DataUsageGraph()
52 mUsageColor = Utils.getColorAccentDefaultColor(context); in DataUsageGraph()
53 mOverlimitColor = Utils.getColorErrorDefaultColor(context); in DataUsageGraph()
/frameworks/base/core/java/android/view/textclassifier/
DSystemTextClassifier.java88 Utils.checkMainThread(); in suggestSelection()
111 Utils.checkMainThread(); in classifyText()
134 Utils.checkMainThread(); in generateLinks()
135 if (!Utils.checkTextLength(request.getText(), getMaxGenerateLinksTextLength())) { in generateLinks()
139 return Utils.generateLegacyLinks(request); in generateLinks()
160 Utils.checkMainThread(); in onSelectionEvent()
173 Utils.checkMainThread(); in onTextClassifierEvent()
191 Utils.checkMainThread(); in detectLanguage()
211 Utils.checkMainThread(); in suggestConversationActions()
/frameworks/base/media/java/android/media/
DMediaCodecInfo.java19 import static android.media.Utils.intersectSortedDistinctRanges;
20 import static android.media.Utils.sortDistinctRanges;
1056 mMaxSupportedInstances = Utils.parseIntSafely( in CodecCapabilities()
1059 int maxInstances = Utils.parseIntSafely( in CodecCapabilities()
1164 int ix = Utils.binarySearchDistinctRanges( in supports()
1312 rateRanges[i] = Utils.parseIntRange(rateStrings[i], null); in parseFromInfo()
1317 maxInputChannels = Utils.parseIntSafely( in parseFromInfo()
1324 Utils.parseIntRange(info.getString("bitrate-range"), bitRates)); in parseFromInfo()
1474 final int heightInBlocks = Utils.divUp(height, mBlockHeight); in getSupportedWidthsFor()
1478 Utils.divUp(mBlockCountRange.getLower(), heightInBlocks), in getSupportedWidthsFor()
[all …]
/frameworks/base/core/java/android/hardware/radio/
DProgramList.java286 mIdentifierTypes = Utils.createIntSet(in); in Filter()
287 mIdentifiers = Utils.createSet(in, ProgramSelector.Identifier.CREATOR); in Filter()
290 mVendorFilter = Utils.readStringMap(in); in Filter()
295 Utils.writeIntSet(dest, mIdentifierTypes); in writeToParcel()
296 Utils.writeSet(dest, mIdentifiers); in writeToParcel()
299 Utils.writeStringMap(dest, mVendorFilter); in writeToParcel()
425 mModified = Utils.createSet(in, RadioManager.ProgramInfo.CREATOR); in Chunk()
426 mRemoved = Utils.createSet(in, ProgramSelector.Identifier.CREATOR); in Chunk()
433 Utils.writeSet(dest, mModified); in writeToParcel()
434 Utils.writeSet(dest, mRemoved); in writeToParcel()

12345678