Home
last modified time | relevance | path

Searched refs:str (Results 1 – 25 of 164) sorted by relevance

1234567

/cts/suite/audio_quality/lib/src/
DStringUtil.cpp24 std::vector<android::String8>* StringUtil::split(const android::String8& str, char delimiter) in split() argument
28 for (unsigned int i = 0; i < str.length(); i++) { in split()
29 if (str[i] == delimiter) { in split()
31 tokens->push_back(substr(str, lastTokenEnd, i - lastTokenEnd)); in split()
36 if (lastTokenEnd < str.length()) { in split()
37 tokens->push_back(substr(str, lastTokenEnd, str.length() - lastTokenEnd)); in split()
42 android::String8 StringUtil::substr(const android::String8& str, size_t pos, size_t n) in substr() argument
44 size_t l = str.length(); in substr()
53 android::String8 result(str.string() + pos, n); in substr()
57 int StringUtil::compare(const android::String8& str, const char* other) in compare() argument
[all …]
DRWBuffer.h81 void writeStr(const android::String8& str) { in writeStr() argument
82 size_t len = str.length(); in writeStr()
84 memcpy(mBuffer + mWrPoint, str.string(), len); in writeStr()
/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/statsd/
DBufferDebug.java64 final StringBuilder str = new StringBuilder(); in toHex() local
69 writeRow(str, buf, row * WIDTH, WIDTH, max); in toHex()
74 writeRow(str, buf, rows * WIDTH, max - (rows * WIDTH), max); in toHex()
78 str.append(String.format("%10d 0x%08x ", buf.length, buf.length)); in toHex()
80 str.append(String.format("truncated to %d 0x%08x", max, max)); in toHex()
82 str.append('\n'); in toHex()
84 return str.toString(); in toHex()
87 private static void writeRow(StringBuilder str, byte[] buf, int start, int len, int max) { in writeRow() argument
88 final Formatter f = new Formatter(str); in writeRow()
106 str.append(" "); in writeRow()
[all …]
/cts/suite/audio_quality/test/
DStringUtilTest.cpp26 android::String8 str("hello"); in TEST_F() local
27 ASSERT_TRUE(StringUtil::compare(str, "hello") == 0); in TEST_F()
28 ASSERT_TRUE(StringUtil::compare(str, "hi") != 0); in TEST_F()
32 android::String8 str("hello there"); in TEST_F() local
34 android::String8 sub1 = StringUtil::substr(str, 0, 5); in TEST_F()
37 android::String8 sub2 = StringUtil::substr(str, 10, 5); in TEST_F()
40 android::String8 sub3 = StringUtil::substr(str, 6, 5); in TEST_F()
43 android::String8 sub4 = StringUtil::substr(str, 100, 5); in TEST_F()
48 android::String8 str("hello there"); in TEST_F() local
49 ASSERT_TRUE(StringUtil::endsWith(str, "there")); in TEST_F()
[all …]
/cts/tests/tests/util/src/android/util/cts/
DStringBuilderPrinterTest.java40 String str = strBuilder.toString(); in testStringBuilderPrinter() local
41 assertTrue(str.startsWith("Hello")); in testStringBuilderPrinter()
42 assertEquals(' ', str.charAt(5)); in testStringBuilderPrinter()
43 assertEquals('A', str.charAt(6)); in testStringBuilderPrinter()
44 assertEquals('n', str.charAt(7)); in testStringBuilderPrinter()
45 assertEquals('d', str.charAt(8)); in testStringBuilderPrinter()
46 assertEquals('r', str.charAt(9)); in testStringBuilderPrinter()
47 assertEquals('o', str.charAt(10)); in testStringBuilderPrinter()
48 assertEquals('i', str.charAt(11)); in testStringBuilderPrinter()
49 assertEquals('d', str.charAt(12)); in testStringBuilderPrinter()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DAudioTestRunner.java53 public void sendMessage(int msgType, String str) { in sendMessage() argument
54 sendMessage(mTestId, msgType, str); in sendMessage()
57 public void sendMessage(int testId, int msgType, String str) { in sendMessage() argument
60 msg.obj = str; in sendMessage()
69 String str = (String) msg.obj; in handleMessage() local
72 testStarted(testId, str); in handleMessage()
75 testMessage(testId, str); in handleMessage()
78 testEndedOk(testId, str); in handleMessage()
81 testEndedError(testId, str); in handleMessage()
88 public void testStarted(int testId, String str) { in testStarted() argument
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DMetaKeyKeyListenerTest.java53 final CharSequence str = "123456"; in testPressKey() local
56 final Editable content = Editable.Factory.getInstance().newEditable(str); in testPressKey()
79 final CharSequence str = "123456"; in testReleaseKey() local
82 final Editable content = Editable.Factory.getInstance().newEditable(str); in testReleaseKey()
88 assertEquals(str.charAt(0), content.charAt(0)); in testReleaseKey()
94 assertEquals(str.charAt(1), content.charAt(1)); in testReleaseKey()
100 assertEquals(str.charAt(3), content.charAt(3)); in testReleaseKey()
105 CharSequence str = "123456"; in testAdjustMetaAfterKeypress() local
106 Spannable content = Editable.Factory.getInstance().newEditable(str); in testAdjustMetaAfterKeypress()
108 int len = str.length(); // for one line less than 100 in testAdjustMetaAfterKeypress()
[all …]
DCharacterPickerDialogTest.java56 final CharSequence str = "123456"; in testConstructor() local
57 final Editable content = Editable.Factory.getInstance().newEditable(str); in testConstructor()
65 final CharSequence str = "123456"; in testConstructorNullContext() local
66 final Editable content = Editable.Factory.getInstance().newEditable(str); in testConstructorNullContext()
75 final CharSequence str = "123456"; in testOnItemClick() local
76 Editable text = Editable.Factory.getInstance().newEditable(str); in testOnItemClick()
84 assertEquals(str, text.toString()); in testOnItemClick()
101 text = Editable.Factory.getInstance().newEditable(str); in testOnItemClick()
105 assertEquals(str, text.toString()); in testOnItemClick()
117 final CharSequence str = "123456"; in testOnClick() local
[all …]
DTextKeyListenerTest.java71 String str = "hello world! man"; in testShouldCap() local
75 assertFalse(TextKeyListener.shouldCap(Capitalize.NONE, str, 0)); in testShouldCap()
76 assertTrue(TextKeyListener.shouldCap(Capitalize.SENTENCES, str, 0)); in testShouldCap()
77 assertTrue(TextKeyListener.shouldCap(Capitalize.WORDS, str, 0)); in testShouldCap()
78 assertTrue(TextKeyListener.shouldCap(Capitalize.CHARACTERS, str, 0)); in testShouldCap()
80 assertFalse(TextKeyListener.shouldCap(Capitalize.NONE, str, 6)); in testShouldCap()
81 assertFalse(TextKeyListener.shouldCap(Capitalize.SENTENCES, str, 6)); in testShouldCap()
82 assertTrue(TextKeyListener.shouldCap(Capitalize.WORDS, str, 6)); in testShouldCap()
83 assertTrue(TextKeyListener.shouldCap(Capitalize.CHARACTERS, str, 6)); in testShouldCap()
85 assertFalse(TextKeyListener.shouldCap(Capitalize.NONE, str, 13)); in testShouldCap()
[all …]
/cts/hostsidetests/sustainedperf/shadertoy_android/jni/
Dutils.cpp68 std::string str; in GLCheckErrorStr() local
72 str = "GL_INVALID_ENUM"; in GLCheckErrorStr()
75 str = "GL_INVALID_OPERATION"; in GLCheckErrorStr()
78 str = "GL_INVALID_VALUE"; in GLCheckErrorStr()
81 str = "GL_OUT_OF_MEMORY"; in GLCheckErrorStr()
84 str = "GL_INVALID_FRAMEBUFFER_OPERATION"; in GLCheckErrorStr()
87 LOGE("OpenGL error : %s : %s (%#08x)\n", msg.c_str(), str.c_str(), e); in GLCheckErrorStr()
/cts/apps/CameraITS/tests/scene1_1/
Dtest_auto_vs_manual.py53 logging.debug('%s gains: %s', cap_name, str(awb_gains))
54 logging.debug('%s transform: %s', cap_name, str(awb_xform))
97 logging.debug('AWB gains: %s', str(awb_gains))
98 logging.debug('AWB transform: %s', str(awb_xform))
127 str(awb_xform), str(x), AWB_MANUAL_ATOL)
130 str(awb_gains), str(g), AWB_MANUAL_ATOL)
135 str(awb_xform), str(awb_xform_a), AWB_AUTO_RTOL, AWB_AUTO_ATOL)
139 str(awb_gains), str(awb_gains_a), AWB_AUTO_RTOL, AWB_AUTO_ATOL)
Dtest_capture_result.py75 logging.debug('AWB gains: %s', str(awb_gains))
76 logging.debug('AWB transform: %s', str(
79 logging.debug('AE region: %s', str(metadata['android.control.aeRegions']))
81 logging.debug('AF region: %s', str(metadata['android.control.afRegions']))
83 logging.debug('AWB region: %s', str(metadata['android.control.awbRegions']))
136 logging.debug('LSC map: %dx%d, %s', lsc_map_w, lsc_map_h, str(lsc_map[:8]))
196 logging.debug('Tonemap: %s', str(curves[0][1::16]))
211 logging.debug('LSC map: %dx%d, %s', lsc_map_w, lsc_map_h, str(lsc_map[:8]))
/cts/apps/CameraITS/tests/scene0/
Dtest_solid_color_test_pattern.py99 color, str(exp_values))
101 logging.debug('Captured frame averages: %s', str(rgb_means))
104 logging.debug('Captured frame variances: %s', str(rgb_vars))
109 color, str(rgb_means), str(exp_values), bw_ch_atol)
114 color, str(rgb_vars), ch_variance_atol)
123 color, str(rgb_means), str(exp_values), rgb_primary_min)
128 color, str(rgb_means), str(exp_values), rgb_secondary_max)
136 color, str(rgb_vars), ch_variance_atol)
141 color, str(rgb_vars), ch_variance_atol)
214 str([int(c/_SAT) for c in color['RGGB']]))
[all …]
/cts/suite/audio_quality/lib/include/
DStringUtil.h32 static std::vector<android::String8>* split(const android::String8& str, char delimiter);
34 static android::String8 substr(const android::String8& str, size_t pos, size_t n);
35 static int compare(const android::String8& str, const char* other);
36 static bool endsWith(const android::String8& str, const char* other);
/cts/common/device-side/bedstead/activitycontext/src/test/java/com/android/activitycontext/
DActivityContextTest.java62 STRING_VALUE, (context, str) -> context != null); in getWithContext_oneArgument_passesActivityContext()
69 String passedString = ActivityContext.getWithContext(STRING_VALUE, (context, str) -> str); in getWithContext_oneArgument_passesFirstArgument()
77 STRING_VALUE, INT_VALUE, (context, str, i) -> context != null); in getWithContext_twoArguments_passesActivityContext()
85 STRING_VALUE, INT_VALUE, (context, str, i) -> str); in getWithContext_twoArguments_passesFirstArgument()
93 STRING_VALUE, INT_VALUE, (context, str, i) -> i); in getWithContext_twoArguments_passesSecondArgument()
102 (context, str, i, b) -> context != null); in getWithContext_threeArguments_passesActivityContext()
110 STRING_VALUE, INT_VALUE, BOOLEAN_VALUE, (context, str, i, b) -> str); in getWithContext_threeArguments_passesFirstArgument()
118 STRING_VALUE, INT_VALUE, BOOLEAN_VALUE, (context, str, i, b) -> i); in getWithContext_threeArguments_passesSecondArgument()
126 STRING_VALUE, INT_VALUE, BOOLEAN_VALUE, (context, str, i, b) -> b); in getWithContext_threeArguments_passesThirdArgument()
/cts/apps/CameraITS/tests/
Dtutorial.py94 logging.debug('props\n%s', str(props))
107 logging.debug('metadata\n%s', str(cap['metadata']))
132 logging.info('AWB: gains %s', str(gains))
133 logging.info('AWB: transform %s', str(xform))
156 logging.debug('req: %s', str(req))
166 logging.info('RGB image dimensions: %s', str(rgbimg.shape))
167 logging.info('RGB image top-left pixel: %s', str(rgbimg[0, 0]))
178 logging.info('RGB means: %s', str(rgb_means))
/cts/hostsidetests/car/src/android/car/cts/powerpolicy/
DPowerPolicyGroups.java44 StringBuilder str = new StringBuilder(); in toString() local
45 str.append("Power policy groups:\n"); in toString()
46 mPolicyGroups.forEach((k, v) -> str.append(v.toString())); in toString()
47 return str.toString(); in toString()
123 StringBuilder str = new StringBuilder(); in toString() local
124 str.append(" ").append(mGroupId).append('\n'); in toString()
125 str.append(" - WaitForVHAL --> ").append(mWaitForVHALStatePolicy).append('\n'); in toString()
126 str.append(" - On --> ").append(mOnStatePolicy).append('\n'); in toString()
127 return str.toString(); in toString()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2018-9472/
Dpoc.cpp35 size_t strlen(const char *str) { in strlen() argument
39 if (!strncmp(str, TEST_STRING, sizeof(TEST_STRING))) { in strlen()
42 return real_strlen(str); in strlen()
/cts/hostsidetests/securitybulletin/src/android/security/cts/
DCVE_2021_0523.java33 private static void extractInt(String str, int[] displaySize) { in extractInt() argument
34 str = ((str.replaceAll("[^\\d]", " ")).trim()).replaceAll(" +", " "); in extractInt()
35 if (str.equals("")) { in extractInt()
38 String s[] = str.split(" "); in extractInt()
/cts/tools/release-parser/src/com/android/cts/releaseparser/
DSoParser.java239 for (String str : roStrings) { in getDynamicLoadingDependencies()
241 if (str.length() < 4) { in getDynamicLoadingDependencies()
245 if (str.endsWith(".so")) { in getDynamicLoadingDependencies()
247 if (str.contains(getFileName())) { in getDynamicLoadingDependencies()
250 if (str.contains(" ")) { in getDynamicLoadingDependencies()
253 if (str.contains("?")) { in getDynamicLoadingDependencies()
256 if (str.contains("%")) { in getDynamicLoadingDependencies()
257 System.err.println("ToDo getDynamicLoadingDependencies: " + str); in getDynamicLoadingDependencies()
260 if (str.startsWith("_")) { in getDynamicLoadingDependencies()
261 System.err.println("ToDo getDynamicLoadingDependencies: " + str); in getDynamicLoadingDependencies()
[all …]
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/if_nez/
DTest_if_nez.java26 String str = null; in testN2() local
27 assertEquals(1234, t.run(str)); in testN2()
35 String str = "abc"; in testN3() local
36 assertEquals(1, t.run(str)); in testN3()
/cts/hostsidetests/incrementalinstall/app/nativelibcompressed/src/cpp/
Dcompressednative_lib.cpp7 std::string str = "String from compressed native lib"; in Java_android_incrementalinstall_incrementaltestapp_nativelib_CompressedNativeLib_getString() local
8 return env->NewStringUTF(str.c_str()); in Java_android_incrementalinstall_incrementaltestapp_nativelib_CompressedNativeLib_getString()
/cts/hostsidetests/incrementalinstall/app/nativelibuncompressed/src/cpp/
Duncompressednative_lib.cpp7 std::string str = "String from uncompressed native lib"; in Java_android_incrementalinstall_incrementaltestapp_nativelib_UncompressedNativeLib_getString() local
8 return env->NewStringUTF(str.c_str()); in Java_android_incrementalinstall_incrementaltestapp_nativelib_UncompressedNativeLib_getString()
/cts/tests/signature/tests/src/android/signature/cts/tests/
DLineSpliteratorTestBase.java39 protected static final Function<String, Integer> CONVERTER = str -> {
40 return Integer.parseInt(str.substring(4));
42 protected static final Consumer<Integer> FAIL_CONSUMER = str -> {
72 doTestConverter(str -> createSpliterator(str, CONVERTER), i -> createVerifier(i)); in testConverter()
/cts/hostsidetests/systemui/src/android/host/systemui/
DBaseTileServiceTest.java109 protected boolean waitFor(String str) throws DeviceNotAvailableException, InterruptedException { in waitFor() argument
110 final String searchStr = TEST_PREFIX + str; in waitFor()
118 protected boolean hasLog(String str) throws DeviceNotAvailableException { in hasLog() argument
121 return logs.contains(str); in hasLog()

1234567