Home
last modified time | relevance | path

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

1234567

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DUtilsTest.java31 assertEquals("null", Utils.roamingConsortiumsToString((long[]) null)); in testRoamingConsortiumsToStringLong()
35 String result = Utils.roamingConsortiumsToString(ois); in testRoamingConsortiumsToStringLong()
42 assertEquals("", Utils.roamingConsortiumsToString(ois)); in testRoamingConsortiumsToStringCollection()
48 String result = Utils.roamingConsortiumsToString(ois); in testRoamingConsortiumsToStringCollection()
54 assertEquals("", Utils.toUnicodeEscapedString("")); in testToUnicodeEscapedString()
67 Utils.toUnicodeEscapedString(unescapedStringBuilder.toString())); in testToUnicodeEscapedString()
72 assertEquals("null", Utils.toHexString(null)); in testToHexString()
76 String result = Utils.toHexString(bytes); in testToHexString()
82 assertEquals("", Utils.toHex(new byte[0])); in testToHex()
86 String result = Utils.toHex(bytes); in testToHex()
[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()
DCornerHandleView.java30 import com.android.settingslib.Utils;
60 final int dualToneDarkTheme = Utils.getThemeAttr(mContext, R.attr.darkIconTheme); in CornerHandleView()
61 final int dualToneLightTheme = Utils.getThemeAttr(mContext, R.attr.lightIconTheme); in CornerHandleView()
64 mLightColor = Utils.getColorAttrDefaultColor(lightContext, R.attr.singleToneColor); in CornerHandleView()
65 mDarkColor = Utils.getColorAttrDefaultColor(darkContext, R.attr.singleToneColor); in CornerHandleView()
/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.java20 import static com.android.settingslib.Utils.STORAGE_MANAGER_ENABLED_PROPERTY;
94 Utils.updateLocationEnabled(mContext, true, currentUserId, in testUpdateLocationEnabled_sendBroadcast()
113 final String percentage = Utils.formatPercentage(TEST_PERCENTAGES[i], true); in testFormatPercentage_RoundTrue_RoundUpIfPossible()
125 final String percentage = Utils.formatPercentage(TEST_PERCENTAGES[i], false); in testFormatPercentage_RoundFalse_NoRound()
141 assertThat(Utils.getDefaultStorageManagerDaysToRetain(resources)).isEqualTo(60); in testGetDefaultStorageManagerDaysToRetain_storageManagerDaysToRetainUsesResources()
147 assertThat(Utils.isStorageManagerEnabled(mContext)).isTrue(); in testIsStorageManagerEnabled_UsesSystemProperties()
191 assertThat(Utils.isAudioModeOngoingCall(mContext)).isTrue(); in isAudioModeOngoingCall_modeInCommunication_returnTrue()
198 assertThat(Utils.isAudioModeOngoingCall(mContext)).isTrue(); in isAudioModeOngoingCall_modeInCall_returnTrue()
205 assertThat(Utils.isAudioModeOngoingCall(mContext)).isTrue(); in isAudioModeOngoingCall_modeRingtone_returnTrue()
212 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;
96 Utils.setUpLogger(sLogger, DEBUG); in main()
98 if (!Utils.isAcceptableStatsd(sLogger, MIN_SDK, MIN_CODENAME)) { in main()
175 Utils.runCommand(null, sLogger, "adb", "shell", Utils.CMD_REMOVE_CONFIG, in updateConfig()
176 Utils.SHELL_UID, String.valueOf(configId)); in updateConfig()
177 Utils.getReportList(configId, true /* clearData */, true /* SHELL_UID */, sLogger); in updateConfig()
210 Utils.runCommand(null, sLogger, "adb", "push", configLocation, remotePath); in updateConfig()
211 Utils.runCommand(null, sLogger, "adb", "shell", "cat", remotePath, "|", in updateConfig()
212 Utils.CMD_UPDATE_CONFIG, Utils.SHELL_UID, String.valueOf(configId)); in updateConfig()
246 reportList = Utils.getReportList(configId, clearData, true /* SHELL_UID */, sLogger); in cmdGetData()
[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()
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()
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()
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()
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()
/frameworks/base/keystore/java/android/security/keystore/
DKeyGenParameterSpec.java340 mCertificateNotBefore = Utils.cloneIfNotNull(certificateNotBefore); in KeyGenParameterSpec()
341 mCertificateNotAfter = Utils.cloneIfNotNull(certificateNotAfter); in KeyGenParameterSpec()
342 mKeyValidityStart = Utils.cloneIfNotNull(keyValidityStart); in KeyGenParameterSpec()
343 mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(keyValidityForOriginationEnd); in KeyGenParameterSpec()
344 mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(keyValidityForConsumptionEnd); in KeyGenParameterSpec()
355 mAttestationChallenge = Utils.cloneIfNotNull(attestationChallenge); in KeyGenParameterSpec()
427 return Utils.cloneIfNotNull(mCertificateNotBefore); in getCertificateNotBefore()
436 return Utils.cloneIfNotNull(mCertificateNotAfter); in getCertificateNotAfter()
445 return Utils.cloneIfNotNull(mKeyValidityStart); in getKeyValidityStart()
454 return Utils.cloneIfNotNull(mKeyValidityForConsumptionEnd); in getKeyValidityForConsumptionEnd()
[all …]
DKeyInfo.java113 mKeyValidityStart = Utils.cloneIfNotNull(keyValidityStart); in KeyInfo()
114 mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(keyValidityForOriginationEnd); in KeyInfo()
115 mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(keyValidityForConsumptionEnd); in KeyInfo()
170 return Utils.cloneIfNotNull(mKeyValidityStart); in getKeyValidityStart()
180 return Utils.cloneIfNotNull(mKeyValidityForConsumptionEnd); in getKeyValidityForConsumptionEnd()
190 return Utils.cloneIfNotNull(mKeyValidityForOriginationEnd); in getKeyValidityForOriginationEnd()
DKeyProtection.java258 mKeyValidityStart = Utils.cloneIfNotNull(keyValidityStart); in KeyProtection()
259 mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(keyValidityForOriginationEnd); in KeyProtection()
260 mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(keyValidityForConsumptionEnd); in KeyProtection()
288 return Utils.cloneIfNotNull(mKeyValidityStart); in getKeyValidityStart()
298 return Utils.cloneIfNotNull(mKeyValidityForConsumptionEnd); in getKeyValidityForConsumptionEnd()
308 return Utils.cloneIfNotNull(mKeyValidityForOriginationEnd); in getKeyValidityForOriginationEnd()
590 mKeyValidityStart = Utils.cloneIfNotNull(startDate); in setKeyValidityStart()
619 mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(endDate); in setKeyValidityForOriginationEnd()
633 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/base/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/testdrive/
DTestDrive.java29 import com.android.statsd.shelltools.Utils;
74 Utils.setUpLogger(LOGGER, false); in main()
118 Utils.logAppBreadcrumb(0, 0, LOGGER); in main()
128 Utils.runCommand(null, LOGGER, "adb", "shell", "rm", remoteConfigPath); in main()
138 ConfigMetricsReportList reportList = Utils.getReportList(CONFIG_ID, true, false, LOGGER); in dumpMetrics()
209 Utils.runCommand(null, LOGGER, "adb", "push", configFile.getAbsolutePath(), remotePath); in pushConfig()
210 Utils.runCommand(null, LOGGER, in pushConfig()
211 "adb", "shell", "cat", remotePath, "|", Utils.CMD_UPDATE_CONFIG, in pushConfig()
218 Utils.runCommand(null, LOGGER, in removeConfig()
219 "adb", "shell", Utils.CMD_REMOVE_CONFIG, String.valueOf(CONFIG_ID)); in removeConfig()
/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()
DFloatingRotationButton.java31 import com.android.settingslib.Utils;
155 final int dualToneDarkTheme = Utils.getThemeAttr(context, R.attr.darkIconTheme); in getImageDrawable()
156 final int dualToneLightTheme = Utils.getThemeAttr(context, R.attr.lightIconTheme); in getImageDrawable()
159 @ColorInt int darkColor = Utils.getColorAttrDefaultColor(darkContext, in getImageDrawable()
165 Utils.getColorAttrDefaultColor(lightContext, R.attr.singleToneColor), darkColor, in getImageDrawable()
/frameworks/base/media/java/android/media/
DMediaCodecInfo.java19 import static android.media.Utils.intersectSortedDistinctRanges;
20 import static android.media.Utils.sortDistinctRanges;
1016 mMaxSupportedInstances = Utils.parseIntSafely( in CodecCapabilities()
1019 int maxInstances = Utils.parseIntSafely( in CodecCapabilities()
1124 int ix = Utils.binarySearchDistinctRanges( in supports()
1272 rateRanges[i] = Utils.parseIntRange(rateStrings[i], null); in parseFromInfo()
1277 maxInputChannels = Utils.parseIntSafely( in parseFromInfo()
1284 Utils.parseIntRange(info.getString("bitrate-range"), bitRates)); in parseFromInfo()
1434 final int heightInBlocks = Utils.divUp(height, mBlockHeight); in getSupportedWidthsFor()
1438 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()
395 mModified = Utils.createSet(in, RadioManager.ProgramInfo.CREATOR); in Chunk()
396 mRemoved = Utils.createSet(in, ProgramSelector.Identifier.CREATOR); in Chunk()
403 Utils.writeSet(dest, mModified); in writeToParcel()
404 Utils.writeSet(dest, mRemoved); in writeToParcel()
/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.java78 Utils.checkMainThread(); in suggestSelection()
102 Utils.checkMainThread(); in classifyText()
126 Utils.checkMainThread(); in generateLinks()
129 return Utils.generateLegacyLinks(request); in generateLinks()
151 Utils.checkMainThread(); in onSelectionEvent()
164 Utils.checkMainThread(); in onTextClassifierEvent()
182 Utils.checkMainThread(); in detectLanguage()
203 Utils.checkMainThread(); in suggestConversationActions()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DZenModeControllerImpl.java46 import com.android.systemui.util.Utils;
207 Utils.safeForeach(mCallbacks, c -> c.onNextAlarmChanged()); in fireNextAlarmChanged()
213 Utils.safeForeach(mCallbacks, c -> c.onEffectsSupressorChanged()); in fireEffectsSuppressorChanged()
219 Utils.safeForeach(mCallbacks, c -> c.onZenChanged(zen)); in fireZenChanged()
225 Utils.safeForeach(mCallbacks, c -> c.onZenAvailableChanged(available)); in fireZenAvailableChanged()
231 Utils.safeForeach(mCallbacks, c -> c.onManualRuleChanged(rule)); in fireManualRuleChanged()
237 Utils.safeForeach(mCallbacks, c -> c.onConsolidatedPolicyChanged(policy)); in fireConsolidatedPolicyChanged()
244 Utils.safeForeach(mCallbacks, c -> c.onConfigChanged(config)); in fireConfigChanged()

1234567