/frameworks/base/cmds/idmap2/tests/ |
D | RawPrintVisitorTests.cpp | 38 #define ASSERT_CONTAINS_REGEX(pattern, str) \ argument 40 ASSERT_TRUE(std::regex_search(str, std::regex(pattern))) \ 42 << (str) << "--------"; \ 66 ASSERT_CONTAINS_REGEX(ADDRESS "504d4449 magic\n", stream.str()); in TEST() 67 ASSERT_CONTAINS_REGEX(ADDRESS "00000009 version\n", stream.str()); in TEST() 70 stream.str()); in TEST() 73 stream.str()); in TEST() 74 ASSERT_CONTAINS_REGEX(ADDRESS "00000001 fulfilled policies: public\n", stream.str()); in TEST() 75 ASSERT_CONTAINS_REGEX(ADDRESS "00000001 enforce overlayable\n", stream.str()); in TEST() 76 ASSERT_CONTAINS_REGEX(ADDRESS "00000004 target entry count", stream.str()); in TEST() [all …]
|
/frameworks/base/tools/split-select/ |
D | Rule.cpp | 25 inline static void indentStr(String8& str, int indent) { in indentStr() argument 27 str.append(" "); in indentStr() 43 String8 str; in toJson() local 44 indentStr(str, indent); in toJson() 45 str.append("{\n"); in toJson() 47 indentStr(str, indent); in toJson() 48 str.append("\"op\": \""); in toJson() 51 str.append("ALWAYS_TRUE"); in toJson() 54 str.append("GREATER_THAN"); in toJson() 57 str.append("LESS_THAN"); in toJson() [all …]
|
/frameworks/av/camera/include/camera/ |
D | StringUtils.h | 29 inline String8 toString8(const std::string &str) { in toString8() argument 30 return String8(str.c_str()); in toString8() 33 inline String8 toString8(const String16 &str) { in toString8() argument 34 return String8(str); in toString8() 37 inline String8 toString8(const char *str) { in toString8() argument 38 return String8(str); in toString8() 41 inline String16 toString16(const std::string &str) { in toString16() argument 42 return String16(str.c_str()); in toString16() 45 inline String16 toString16(const String8 &str) { in toString16() argument 46 return String16(str); in toString16() [all …]
|
/frameworks/av/media/libmediahelper/include/media/ |
D | TypeConverter.h | 74 static void collectionFromString(const std::string &str, typename Traits::Collection &collection, 77 char *literal = strdup(str.c_str()); 91 static bool toString(const typename Traits::Type &value, std::string &str); 93 static bool fromString(const std::string &str, typename Traits::Type &result); 95 static void collectionFromString(const std::string &str, 100 const std::string &str, const char *del = AudioParameter::valueListSeparator); 103 typename Traits::Type mask, std::string &str, 110 static bool toStringImpl(const typename Traits::Type &value, std::string &str); 111 static bool fromStringImpl(const std::string &str, typename Traits::Type &result); 123 const typename Traits::Type &value, std::string &str) { in toStringImpl() argument [all …]
|
D | convert.h | 108 static inline bool fromString(const std::string &str, T &result) 115 if (str.find_first_of(std::string("\r\n\t\v ")) != std::string::npos) { 122 if (str.find('-') != std::string::npos 127 std::stringstream ss(str); 131 if (str.substr(0, 2) == "0x") { 146 static inline bool toString(const T &value, std::string &str) 156 str = oss.str(); 167 static inline bool run(const std::string &str, dstType &result) 169 return fromString<dstType>(str, result); 177 static inline bool run(const srcType &str, std::string &result) [all …]
|
/frameworks/base/libs/androidfw/ |
D | PathUtils.cpp | 23 String8 getPathLeaf(const String8& str) { in getPathLeaf() argument 25 const char*const buf = str.c_str(); in getPathLeaf() 29 return str; in getPathLeaf() 36 const char*const str = str8.c_str(); in getPathDir() local 38 cp = strrchr(str, OS_PATH_SEPARATOR); in getPathDir() 42 return String8(str, cp - str); in getPathDir() 48 const char* const str = str8.c_str(); in findExtension() local 51 lastSlash = strrchr(str, OS_PATH_SEPARATOR); in findExtension() 53 lastSlash = str; in findExtension() 66 String8 getPathExtension(const String8& str) { in getPathExtension() argument [all …]
|
/frameworks/base/core/java/com/android/internal/pm/pkg/component/ |
D | ParsedIntentInfoUtils.java | 236 String str = sa.getNonConfigurationString( in parseRelRefGroupData() local 238 if (str != null) { in parseRelRefGroupData() 240 PatternMatcher.PATTERN_LITERAL, str)); in parseRelRefGroupData() 243 str = sa.getNonConfigurationString( in parseRelRefGroupData() 245 if (str != null) { in parseRelRefGroupData() 247 PatternMatcher.PATTERN_PREFIX, str)); in parseRelRefGroupData() 250 str = sa.getNonConfigurationString( in parseRelRefGroupData() 252 if (str != null) { in parseRelRefGroupData() 258 PatternMatcher.PATTERN_SIMPLE_GLOB, str)); in parseRelRefGroupData() 261 str = sa.getNonConfigurationString( in parseRelRefGroupData() [all …]
|
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/ |
D | QuickStepContract.java | 180 StringJoiner str = new StringJoiner("|"); in getSystemUiStateString() local 182 str.add("screen_pinned"); in getSystemUiStateString() 185 str.add("overview_disabled"); in getSystemUiStateString() 188 str.add("home_disabled"); in getSystemUiStateString() 191 str.add("search_disabled"); in getSystemUiStateString() 194 str.add("navbar_hidden"); in getSystemUiStateString() 197 str.add("notif_expanded"); in getSystemUiStateString() 200 str.add("qs_visible"); in getSystemUiStateString() 203 str.add("keygrd_visible"); in getSystemUiStateString() 206 str.add("keygrd_occluded"); in getSystemUiStateString() [all …]
|
/frameworks/base/tools/aapt2/util/ |
D | Util.cpp | 47 static std::vector<std::string> SplitAndTransform(StringPiece str, char sep, char (*f)(char)) { in SplitAndTransform() argument 49 const StringPiece::const_iterator end = std::end(str); in SplitAndTransform() 50 StringPiece::const_iterator start = std::begin(str); in SplitAndTransform() 64 std::vector<std::string> Split(StringPiece str, char sep) { in Split() argument 65 return SplitAndTransform(str, sep, nullptr); in Split() 68 std::vector<std::string> SplitAndLowercase(StringPiece str, char sep) { in SplitAndLowercase() argument 69 return SplitAndTransform(str, sep, [](char c) -> char { return ::tolower(c); }); in SplitAndLowercase() 72 bool StartsWith(StringPiece str, StringPiece prefix) { in StartsWith() argument 73 if (str.size() < prefix.size()) { in StartsWith() 76 return str.substr(0, prefix.size()) == prefix; in StartsWith() [all …]
|
/frameworks/base/tools/streaming_proto/ |
D | string_utils.cpp | 11 to_camel_case(const string& str) in to_camel_case() argument 14 const int N = str.size(); in to_camel_case() 18 char c = str[i]; in to_camel_case() 40 make_constant_name(const string& str) in make_constant_name() argument 43 const int N = str.size(); in make_constant_name() 46 char c = str[i]; in make_constant_name() 64 file_base_name(const string& str) in file_base_name() argument 66 size_t start = str.rfind('/'); in file_base_name() 72 size_t end = str.find('.', start); in file_base_name() 74 end = str.size(); in file_base_name() [all …]
|
/frameworks/base/tools/aapt/ |
D | AaptConfig.h | 37 bool parse(const android::String8& str, ConfigDescription* out = NULL); 45 bool parseCommaSeparatedList(const android::String8& str, std::set<ConfigDescription>* outSet); 55 bool parseMcc(const char* str, android::ResTable_config* out = NULL); 56 bool parseMnc(const char* str, android::ResTable_config* out = NULL); 57 bool parseLayoutDirection(const char* str, android::ResTable_config* out = NULL); 58 bool parseSmallestScreenWidthDp(const char* str, android::ResTable_config* out = NULL); 59 bool parseScreenWidthDp(const char* str, android::ResTable_config* out = NULL); 60 bool parseScreenHeightDp(const char* str, android::ResTable_config* out = NULL); 61 bool parseScreenLayoutSize(const char* str, android::ResTable_config* out = NULL); 62 bool parseScreenLayoutLong(const char* str, android::ResTable_config* out = NULL); [all …]
|
/frameworks/native/include/ftl/details/ |
D | hash.h | 63 inline std::uint64_t hash_length_0_to_16(const char* str, std::uint64_t length) { in hash_length_0_to_16() argument 65 const auto a = read_unaligned(str); in hash_length_0_to_16() 66 const auto b = read_unaligned(str + length - 8); in hash_length_0_to_16() 70 const auto a = read_unaligned<std::uint32_t>(str); in hash_length_0_to_16() 71 const auto b = read_unaligned<std::uint32_t>(str + length - 4); in hash_length_0_to_16() 75 const auto a = static_cast<unsigned char>(str[0]); in hash_length_0_to_16() 76 const auto b = static_cast<unsigned char>(str[length >> 1]); in hash_length_0_to_16() 77 const auto c = static_cast<unsigned char>(str[length - 1]); in hash_length_0_to_16() 86 inline std::uint64_t hash_length_17_to_32(const char* str, std::uint64_t length) { in hash_length_17_to_32() argument 87 const auto a = read_unaligned(str) * kPrime1; in hash_length_17_to_32() [all …]
|
/frameworks/base/libs/androidfw/include_pathutils/androidfw/ |
D | PathUtils.h | 34 String8 getPathLeaf(const String8& str); 46 String8 getPathDir(const String8& str); 61 String8 getPathExtension(const String8& str); 71 String8 getBasePath(const String8& str); 83 String8& appendPath(String8& str, const char* leaf); 84 inline String8& appendPath(String8& str, const String8& leaf) { in appendPath() argument 85 return appendPath(str, leaf.c_str()); in appendPath() 93 inline String8 appendPathCopy(String8 str, const char* leaf) { return appendPath(str, leaf); } in appendPathCopy() argument 94 inline String8 appendPathCopy(String8 str, const String8& leaf) { in appendPathCopy() argument 95 return appendPath(str, leaf.c_str()); in appendPathCopy()
|
/frameworks/base/core/java/android/text/ |
D | BidiFormatter.java | 307 public String markAfter(CharSequence str, TextDirectionHeuristic heuristic) { in markAfter() argument 308 final boolean isRtl = heuristic.isRtl(str, 0, str.length()); in markAfter() 310 if (!mIsRtlContext && (isRtl || getExitDir(str) == DIR_RTL)) { in markAfter() 313 if (mIsRtlContext && (!isRtl || getExitDir(str) == DIR_LTR)) { in markAfter() 336 public String markBefore(CharSequence str, TextDirectionHeuristic heuristic) { in markBefore() argument 337 final boolean isRtl = heuristic.isRtl(str, 0, str.length()); in markBefore() 339 if (!mIsRtlContext && (isRtl || getEntryDir(str) == DIR_RTL)) { in markBefore() 342 if (mIsRtlContext && (!isRtl || getEntryDir(str) == DIR_LTR)) { in markBefore() 355 public boolean isRtl(String str) { in isRtl() argument 356 return isRtl((CharSequence) str); in isRtl() [all …]
|
/frameworks/av/media/module/codecs/mp3dec/src/asm/ |
D | pvmp3_mdct_18_gcc.s | 83 str r9,[r0],#4 87 str lr,[r1],#-4 99 str r0,[r5,#0x40] 102 str r0,[r5,#0x38] 105 str r1,[r5,#0x30] 108 str r12,[r5,#0x28] 110 str r12,[r5,#0x20] 112 str r12,[r5,#0x18] 114 str r12,[r5,#0x10] 116 str r12,[r5,#8] [all …]
|
D | pvmp3_dct_16_gcc.s | 56 str r2,[sp,#0x14] 65 str r3,[sp] 87 str r4,[sp,#4] 95 str lr,[sp,#0x10] 112 str r9,[sp,#0xc] 115 str r9,[sp,#0x18] 120 str r9,[sp,#8] 140 str r8,[r0] 143 str r8,[r0,#0x20] 148 str r3,[r0,#0x10] [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/ |
D | AnswerToResetTest.java | 43 String str = "3B02145"; in testAnswerToRestOddLength() local 44 AnswerToReset atr = AnswerToReset.parseAtr(str); in testAnswerToRestOddLength() 51 String str = "3B"; in testAnswerToRestTooShortLength() local 52 AnswerToReset atr = AnswerToReset.parseAtr(str); in testAnswerToRestTooShortLength() 59 String str = "3B00"; in testAnswerToRestNoInterfaceByteNoHistoricalByte() local 60 AnswerToReset atr = AnswerToReset.parseAtr(str); in testAnswerToRestNoInterfaceByteNoHistoricalByte() 72 String str = "3F909580B1FE001F4297"; in testAnswerToRestNoHistoricalByte() local 73 AnswerToReset atr = AnswerToReset.parseAtr(str); in testAnswerToRestNoHistoricalByte() 99 String str = "3F078031A073BE211797"; in testAnswerToRestNoInterfaceByte() local 100 AnswerToReset atr = AnswerToReset.parseAtr(str); in testAnswerToRestNoInterfaceByte() [all …]
|
/frameworks/base/tools/bit/ |
D | util.cpp | 148 escape_quotes(const char* str) in escape_quotes() argument 151 while (*str) { in escape_quotes() 152 if (*str == '"') { in escape_quotes() 156 result += *str; in escape_quotes() 163 escape_for_commandline(const char* str) in escape_for_commandline() argument 165 if (strchr(str, '"') != NULL || strchr(str, ' ') != NULL in escape_for_commandline() 166 || strchr(str, '\t') != NULL) { in escape_for_commandline() 167 return escape_quotes(str); in escape_for_commandline() 169 return str; in escape_for_commandline() 180 trim(const string& str) in trim() argument [all …]
|
/frameworks/base/tools/aapt2/ |
D | ResourceUtils.h | 41 bool ParseResourceName(android::StringPiece str, ResourceNameRef* out_resource, 52 bool ParseReference(android::StringPiece str, ResourceNameRef* out_reference, 59 bool IsReference(android::StringPiece str); 66 bool ParseAttributeReference(android::StringPiece str, ResourceNameRef* out_reference); 72 bool IsAttributeReference(android::StringPiece str); 88 std::optional<bool> ParseBool(android::StringPiece str); 93 std::optional<uint32_t> ParseInt(android::StringPiece str); 98 std::optional<ResourceId> ParseResourceId(android::StringPiece str); 103 std::optional<int> ParseSdkVersion(android::StringPiece str); 116 std::optional<Reference> ParseStyleParentReference(android::StringPiece str, [all …]
|
D | ResourceParser_test.cpp | 68 ::testing::AssertionResult TestParse(StringPiece str) { in TestParse() argument 69 return TestParse(str, ConfigDescription{}); in TestParse() 72 ::testing::AssertionResult TestParse(StringPiece str, const ConfigDescription& config) { in TestParse() argument 79 input.append(str.data(), str.size()); in TestParse() 97 String* str = test::GetValue<String>(&table_, "string/foo"); in TEST_F() local 98 ASSERT_THAT(str, NotNull()); in TEST_F() 99 EXPECT_THAT(*str, StrValueEq(" hey there ")); in TEST_F() 100 EXPECT_THAT(str->untranslatable_sections, IsEmpty()); in TEST_F() 103 str = test::GetValue<String>(&table_, "string/bar"); in TEST_F() 104 ASSERT_THAT(str, NotNull()); in TEST_F() [all …]
|
/frameworks/native/libs/ftl/ |
D | concat_test.cpp | 27 EXPECT_EQ(string.str(), "Vol: -3 dB"); in TEST() 32 EXPECT_EQ(ftl::Concat(u'a', ' ', U'b').str(), "97 98"); in TEST() 38 EXPECT_EQ(ftl::Concat(i[0], std::as_const(i[1]), u).str(), "-123"); in TEST() 42 EXPECT_EQ(ftl::Concat(b, "tt", c).str(), "falsetto"); in TEST() 47 static_assert(ftl::Concat{true, false, true}.str() == "truefalsetrue"); 48 static_assert(ftl::Concat{':', '-', ')'}.str() == ":-)"); 50 static_assert(ftl::Concat{"foo"}.str() == "foo"); 51 static_assert(ftl::Concat{ftl::truncated<3>("foobar")}.str() == "foo"); 57 static_assert(kConcat.str() == "potrzebie"); 58 static_assert(kConcat.str() == std::string_view(kConcat.c_str())); [all …]
|
/frameworks/base/tools/powermodel/src/com/android/powermodel/ |
D | AttributionKey.java | 92 final StringBuilder str = new StringBuilder("AttributionKey("); in toString() local 94 str.append(" uid="); in toString() 95 str.append(mUid); in toString() 98 str.append(" packages=["); in toString() 100 str.append(' '); in toString() 101 str.append(pkg); in toString() 103 str.append(" ]"); in toString() 106 str.append(" specialApp="); in toString() 107 str.append(mSpecialApp.name()); in toString() 109 str.append(" )"); in toString() [all …]
|
/frameworks/base/core/jni/ |
D | android_os_Trace.cpp | 30 inline static void sanitizeString(char* str) { in sanitizeString() argument 31 while (*str) { in sanitizeString() 32 char c = *str; in sanitizeString() 34 *str = ' '; in sanitizeString() 36 str++; in sanitizeString() 64 [tag, value](const char* str) { tracing_perfetto::traceCounter(tag, str, value); }); in android_os_Trace_nativeTraceCounter() argument 69 withString(env, nameStr, [tag](const char* str) { tracing_perfetto::traceBegin(tag, str); }); in android_os_Trace_nativeTraceBegin() argument 78 withString(env, nameStr, [tag, cookie](const char* str) { in android_os_Trace_nativeAsyncTraceBegin() argument 79 tracing_perfetto::traceAsyncBegin(tag, str, cookie); in android_os_Trace_nativeAsyncTraceBegin() 85 withString(env, nameStr, [tag, cookie](const char* str) { in android_os_Trace_nativeAsyncTraceEnd() argument [all …]
|
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/ |
D | NetworkState.java | 141 StringBuffer str = new StringBuffer ("States: "); in validateNetworkDisconnection() local 142 str.append(printStates()); in validateNetworkDisconnection() 144 str.append(String.format(" Initial state should be CONNECTED, but it is %s.", in validateNetworkDisconnection() 146 mReason = str.toString(); in validateNetworkDisconnection() 151 str.append(String.format(" Last state should be DISCONNECTED, but it is %s", in validateNetworkDisconnection() 153 mReason = str.toString(); in validateNetworkDisconnection() 167 str.append(String.format(" Transition state from %s to %s is not valid", in validateNetworkDisconnection() 169 mReason = str.toString(); in validateNetworkDisconnection() 173 mReason = str.toString(); in validateNetworkDisconnection() 182 StringBuffer str = new StringBuffer("States "); in validateNetworkConnection() local [all …]
|
/frameworks/opt/localepicker/src/com/android/localepicker/ |
D | LocaleHelper.java | 68 static String toSentenceCase(String str, Locale locale) { in toSentenceCase() argument 69 if (str.isEmpty()) { in toSentenceCase() 70 return str; in toSentenceCase() 72 final int firstCodePointLen = str.offsetByCodePoints(0, 1); in toSentenceCase() 73 return str.substring(0, firstCodePointLen).toUpperCase(locale) in toSentenceCase() 74 + str.substring(firstCodePointLen); in toSentenceCase() 88 static String normalizeForSearch(String str, Locale locale) { in normalizeForSearch() argument 93 return str != null ? str.toUpperCase() : null; in normalizeForSearch() 203 private String removePrefixForCompare(Locale locale, String str) { in removePrefixForCompare() argument 204 if ("ar".equals(locale.getLanguage()) && str.startsWith(PREFIX_ARABIC)) { in removePrefixForCompare() [all …]
|