/packages/modules/adb/client/ |
D | mdns_utils_test.cpp | 26 std::string str = "."; in TEST() local 27 auto res = mdns_parse_instance_name(str); in TEST() 29 EXPECT_EQ(str, res->instance_name); in TEST() 34 std::string str = "my.name"; in TEST() local 35 auto res = mdns_parse_instance_name(str); in TEST() 37 EXPECT_EQ(str, res->instance_name); in TEST() 42 std::string str = "my.name."; in TEST() local 43 auto res = mdns_parse_instance_name(str); in TEST() 45 EXPECT_EQ(str, res->instance_name); in TEST() 53 std::string str = android::base::StringPrintf("%s", transport.data()); in TEST() local [all …]
|
/packages/modules/StatsD/tests/src/android/cts/statsd/atom/ |
D | BufferDebug.java | 64 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 …]
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | DhcpInfo.java | 53 StringBuffer str = new StringBuffer(); in toString() local 55 str.append("ipaddr "); putAddress(str, ipAddress); in toString() 56 str.append(" gateway "); putAddress(str, gateway); in toString() 57 str.append(" netmask "); putAddress(str, netmask); in toString() 58 str.append(" dns1 "); putAddress(str, dns1); in toString() 59 str.append(" dns2 "); putAddress(str, dns2); in toString() 60 str.append(" DHCP server "); putAddress(str, serverAddress); in toString() 61 str.append(" lease ").append(leaseDuration).append(" seconds"); in toString() 63 return str.toString(); in toString()
|
D | StaticIpConfiguration.java | 245 StringBuffer str = new StringBuffer(); in toString() local 247 str.append("IP address "); in toString() 248 if (ipAddress != null ) str.append(ipAddress).append(" "); in toString() 250 str.append("Gateway "); in toString() 251 if (gateway != null) str.append(gateway.getHostAddress()).append(" "); in toString() 253 str.append(" DNS servers: ["); in toString() 255 str.append(" ").append(dnsServer.getHostAddress()); in toString() 258 str.append(" ] Domains "); in toString() 259 if (domains != null) str.append(domains); in toString() 260 return str.toString(); in toString()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
D | NativeUtil.java | 52 public static ArrayList<Byte> stringToByteArrayList(String str) { in stringToByteArrayList() argument 53 if (str == null) { in stringToByteArrayList() 59 ByteBuffer encoded = encoder.encode(CharBuffer.wrap(str)); in stringToByteArrayList() 93 public static byte[] stringToByteArray(String str) { in stringToByteArray() argument 94 if (str == null) { in stringToByteArray() 97 return str.getBytes(StandardCharsets.UTF_8); in stringToByteArray() 212 public static String addEnclosingQuotes(String str) { in addEnclosingQuotes() argument 213 return "\"" + str + "\""; in addEnclosingQuotes() 225 public static ArrayList<Byte> hexOrQuotedStringToBytes(String str) { in hexOrQuotedStringToBytes() argument 226 if (str == null) { in hexOrQuotedStringToBytes() [all …]
|
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/ |
D | GattPMCReceiver.java | 67 String str; in onReceive() local 85 str = extras.getString("StartTime"); in onReceive() 86 Log.d(TAG, "Start Time = " + str); in onReceive() 87 startTime = Integer.valueOf(str); in onReceive() 94 str = extras.getString("WriteTime"); in onReceive() 95 Log.d(TAG, "Write Time = " + str); in onReceive() 96 writeTime = Integer.valueOf(str); in onReceive() 102 str = extras.getString("IdleTime"); in onReceive() 103 Log.d(TAG, "Idle Time = " + str); in onReceive() 104 idleTime = Integer.valueOf(str); in onReceive() [all …]
|
D | BleScanReceiver.java | 257 String str; in onReceive() local 271 str = extras.getString("ScanMode"); in onReceive() 272 Log.d(TAG, "Scan Mode = " + str); in onReceive() 273 scanMode = Integer.valueOf(str); in onReceive() 279 str = extras.getString("StartTime"); in onReceive() 280 Log.d(TAG, "Start Time = " + str); in onReceive() 281 startTime = Integer.valueOf(str); in onReceive() 287 str = extras.getString("ScanTime"); in onReceive() 288 Log.d(TAG, "Scan Time = " + str); in onReceive() 289 scanTime = Integer.valueOf(str); in onReceive() [all …]
|
/packages/services/Car/tests/DiagnosticTools/src/com/google/android/car/diagnostictools/utils/ |
D | MathEval.java | 33 static boolean testTranslation(final String str) { in testTranslation() argument 34 if (str == null || str.length() == 0) { in testTranslation() 36 } else if (str.length() > 50) { in testTranslation() 41 eval(str, (float) 100.0); in testTranslation() 42 eval(str, (float) 10.0); in testTranslation() 43 eval(str, (float) 1); in testTranslation() 44 eval(str, (float) .1); in testTranslation() 45 eval(str, (float) 0); in testTranslation() 46 eval(str, (float) -100.0); in testTranslation() 47 eval(str, (float) -10.0); in testTranslation() [all …]
|
/packages/services/BuiltInPrintService/jni/plugins/genPCLm/src/ |
D | genPCLm.cpp | 228 void PCLmGenerator::writeStr2OutBuff(char *str) { in writeStr2OutBuff() argument 229 sint32 strSize = strlen(str); in writeStr2OutBuff() 233 memcpy(currBuffPtr, str, strSize); in writeStr2OutBuff() 616 char str[512]; in injectImageTransform() local 618 sprintf(str, "q /image Do Q\n"); in injectImageTransform() 619 strLength = strlen(str); in injectImageTransform() 642 sprintf(pOutStr, "%s", str); in injectImageTransform() 652 char str[512]; in injectJPEG() local 730 sprintf(str, "q /image Do Q\n"); in injectJPEG() 744 void writeStr2Buff(char *buffer, char *str) { in writeStr2Buff() argument [all …]
|
/packages/modules/Connectivity/tests/common/java/android/net/ |
D | TcpKeepalivePacketDataTest.kt | 88 val str = data.toString() in <lambda>() constant 90 assertTrue(str.contains(data.srcAddress.hostAddress)) in <lambda>() 91 assertTrue(str.contains(data.srcPort.toString())) in <lambda>() 92 assertTrue(str.contains(data.dstAddress.hostAddress)) in <lambda>() 93 assertTrue(str.contains(data.dstPort.toString())) in <lambda>() 95 assertTrue(str.contains(data.getTcpSeq().toString())) in <lambda>() 96 assertTrue(str.contains(data.getTcpAck().toString())) in <lambda>() 97 assertTrue(str.contains(data.getTcpWindow().toString())) in <lambda>() 98 assertTrue(str.contains(data.getTcpWindowScale().toString())) in <lambda>() 99 assertTrue(str.contains(data.getIpTos().toString())) in <lambda>() [all …]
|
/packages/modules/adb/ |
D | adb_io.cpp | 46 auto str = android::base::StringPrintf("%04x", length).append(s); in SendProtocolString() local 47 return WriteFdExactly(fd, str); in SendProtocolString() 132 bool WriteFdExactly(borrowed_fd fd, const char* str) { in WriteFdExactly() argument 133 return WriteFdExactly(fd, str, strlen(str)); in WriteFdExactly() 136 bool WriteFdExactly(borrowed_fd fd, const std::string& str) { in WriteFdExactly() argument 137 return WriteFdExactly(fd, str.c_str(), str.size()); in WriteFdExactly() 141 std::string str; in WriteFdFmt() local 145 android::base::StringAppendV(&str, fmt, ap); in WriteFdFmt() 148 return WriteFdExactly(fd, str); in WriteFdFmt()
|
D | adb_utils.h | 100 inline std::string_view StripTrailingNulls(std::string_view str) { in StripTrailingNulls() argument 102 for (auto it = str.rbegin(); it != str.rend(); ++it) { in StripTrailingNulls() 109 str.remove_suffix(n); in StripTrailingNulls() 110 return str; in StripTrailingNulls() 115 inline bool ParseUint(T* result, std::string_view str, std::string_view* remaining = nullptr) { 117 const auto res = std::from_chars(str.begin(), str.end(), value); 121 if (res.ptr != str.end() && !remaining) { 125 *remaining = std::string_view(res.ptr, str.end() - res.ptr);
|
D | test_adb.py | 143 reply_fd = str(write_handle) 146 reply_fd = str(write_pipe) 239 proc = subprocess.Popen(["adb", "-P", str(port), "start-server"], 282 subprocess.check_output(["adb", "-P", str(port), "kill-server"], 306 ["adb", "-P", str(server_port), "kill-server"], 347 ["adb", "-s", "emulator-" + str(port), "emu", "kill"], 393 subprocess.check_output(["adb", "-P", str(server_port), 410 subprocess.check_call(["adb", "-P", str(server_port), 412 output = subprocess.check_output(["adb", "-P", str(server_port), 497 output = subprocess.check_output(["adb", "-P", str(port), "devices"]) [all …]
|
/packages/apps/Camera2/src/com/android/camera/util/ |
D | CaptureDataSerializer.java | 185 StringBuilder str = new StringBuilder(); in toString() local 186 str.append("LensShadingMap{"); in toString() 194 str.append(channelName[ch]); in toString() 195 str.append(":("); in toString() 198 str.append("["); in toString() 201 str.append(gain); in toString() 203 str.append(", "); in toString() 206 str.append("]"); in toString() 208 str.append(", "); in toString() 212 str.append(")"); in toString() [all …]
|
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/ |
D | prettywriter.h | 73 bool String(const Ch* str, SizeType length, bool copy = false) { 76 return Base::WriteString(str, length); 80 bool String(const std::basic_string<Ch>& str) { in String() argument 81 return String(str.data(), SizeType(str.size())); in String() 91 … bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); } 141 bool String(const Ch* str) { return String(str, internal::StrLen(str)); } in String() argument 142 bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); } in Key() argument
|
D | writer.h | 122 bool String(const Ch* str, SizeType length, bool copy = false) { 125 return WriteString(str, length); 129 bool String(const std::basic_string<Ch>& str) { in String() argument 130 return String(str.data(), SizeType(str.size())); in String() 140 … bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); } 175 bool String(const Ch* str) { return String(str, internal::StrLen(str)); } in String() argument 176 bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); } in Key() argument 244 bool WriteString(const Ch* str, SizeType length) { in WriteString() argument 259 GenericStringStream<SourceEncoding> is(str); in WriteString()
|
D | document.h | 286 GenericStringRef(const CharType (&str)[N]) RAPIDJSON_NOEXCEPT // NOLINT, implicit 287 : s(str), length(N-1) {} 308 explicit GenericStringRef(const CharType* str) 309 : s(str), length(internal::StrLen(str)){ RAPIDJSON_ASSERT(s != NULL); } 318 GenericStringRef(const CharType* str, SizeType len) 319 : s(str), length(len) { RAPIDJSON_ASSERT(s != NULL); } 332 GenericStringRef(CharType (&str)[N]) /* = delete */; // NOLINT, implicit 348 inline GenericStringRef<CharType> StringRef(const CharType* str) { 349 return GenericStringRef<CharType>(str, internal::StrLen(str)); 368 inline GenericStringRef<CharType> StringRef(const CharType* str, size_t length) { [all …]
|
/packages/modules/NeuralNetworks/runtime/test/fuzzing/ |
D | RandomGraphGeneratorUtils.h | 71 void log(const std::string& str) { in log() argument 72 if (os.is_open()) os << getElapsedTime() << str << std::flush; in log() 89 Logger::get()->log(ss.str() + '\n'); in ~LoggerStream() 92 __android_log_print(ANDROID_LOG_FATAL, mLogTag.c_str(), "%s", ss.str().c_str()); in ~LoggerStream() 94 std::cout << ss.str() << std::endl; in ~LoggerStream() 101 LoggerStream& operator<<(const T& str) { 102 ss << str; 131 return ss.str(); in joinStr() 135 inline std::string joinStr(const std::string& joint, const std::vector<T>& items, Function str) { in joinStr() argument 139 ss << str(items[i]); in joinStr() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/bluetooth/ |
D | BluetoothScanner.java | 59 StringBuilder str = new StringBuilder(); in toString() local 60 str.append("Device(addr="); in toString() 61 str.append(address); in toString() 62 str.append(" name=\""); in toString() 63 str.append(name); in toString() 64 str.append("\" leds="); in toString() 65 str.append(leds); in toString() 66 str.append("\" configuration_type="); in toString() 67 str.append(configurationType); in toString() 68 str.append(")"); in toString() [all …]
|
/packages/apps/Test/connectivity/sl4n/ |
D | main.cpp | 44 char str[SOCK_BUF_LEN]; in SockTest() local 82 memset(str, MEMSET_VALUE, sizeof(str)); in SockTest() 83 int read_result = read(comm_fd, str, SOCK_BUF_LEN); in SockTest() 90 d.Parse(str); in SockTest() 95 strncpy(str, str2.c_str(), sizeof(str)-1); in SockTest() 96 int result = write(comm_fd, str, strlen(str)+1); in SockTest()
|
/packages/apps/SecureElement/src/com/android/se/internal/ |
D | ByteArrayConverter.java | 126 public static byte[] hexStringToByteArray(String str, int offset, int length) { in hexStringToByteArray() argument 131 str = str.toUpperCase(); in hexStringToByteArray() 133 byte[] outputBytes = new byte[str.length() / 2]; in hexStringToByteArray() 136 char c1 = str.charAt(i + offset); in hexStringToByteArray() 137 char c2 = str.charAt(i + 1 + offset); in hexStringToByteArray() 154 public static byte[] hexStringToByteArray(String str) { in hexStringToByteArray() argument 155 return hexStringToByteArray(str, 0, str.length()); in hexStringToByteArray()
|
/packages/modules/NeuralNetworks/tools/test_generator/ |
D | spec_visualizer.py | 65 return str(data[0]) 67 return "[%s]" % (", ".join(str(i) for i in data)) 99 op_name=str(op), 150 "source": str(tensor), 155 "target": str(tensor), 170 "id": str(op), 171 "name": str(op), 184 "relaxed": str(example.model.isRelaxed), 185 "use shared memory": str(tg.Configuration.useSHM()), 186 "expect failure": str(example.expectFailure), [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/ |
D | ShadowWifiManager.java | 109 private static boolean isQuoted(String str) { in isQuoted() argument 110 if (str == null || str.length() < 2) { in isQuoted() 114 return str.charAt(0) == '"' && str.charAt(str.length() - 1) == '"'; in isQuoted() 117 private static String stripQuotes(String str) { in stripQuotes() argument 118 return str.substring(1, str.length() - 1); in stripQuotes()
|
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/ |
D | CarrierIdProvider.java | 443 for (String str : attr.mccmncTuple) { in convertCarrierAttrToContentValues() 444 cv.put(CarrierId.All.MCCMNC, str); in convertCarrierAttrToContentValues() 451 for (String str : attr.imsiPrefixXpattern) { in convertCarrierAttrToContentValues() 452 cv.put(CarrierId.All.IMSI_PREFIX_XPATTERN, str); in convertCarrierAttrToContentValues() 459 for (String str : attr.gid1) { in convertCarrierAttrToContentValues() 460 cv.put(CarrierId.All.GID1, str.toLowerCase()); in convertCarrierAttrToContentValues() 467 for (String str : attr.gid2) { in convertCarrierAttrToContentValues() 468 cv.put(CarrierId.All.GID2, str.toLowerCase()); in convertCarrierAttrToContentValues() 475 for (String str : attr.plmn) { in convertCarrierAttrToContentValues() 476 cv.put(CarrierId.All.PLMN, str); in convertCarrierAttrToContentValues() [all …]
|
/packages/modules/DnsResolver/ |
D | doh.rs | 28 use std::str::FromStr; 59 const SYSTEM_CERT_PATH: &str = "/system/etc/security/cacerts"; 81 fn make_doh_udp_socket(ip_addr: &str, mark: u32) -> Result<std::net::UdpSocket> { in make_doh_udp_socket() argument 99 url: &str, in new() argument 100 ip_addr: &str, in new() argument 102 cert_path: Option<&str>, in new() argument 110 url: &str, in new_with_socket() argument 111 ip_addr: &str, in new_with_socket() argument 113 cert_path: Option<&str>, in new_with_socket() argument 265 path.push_str(std::str::from_utf8(&query)?); in send_dns_query() [all …]
|