/packages/modules/Bluetooth/system/gd/common/ |
D | strings.cc | 50 bool IsValidHexString(const std::string& str) { in IsValidHexString() argument 51 return std::find_if_not(str.begin(), str.end(), IsHexDigit{}) == str.end(); in IsValidHexString() 54 std::optional<std::vector<uint8_t>> FromHexString(const std::string& str) { in FromHexString() argument 55 if (str.size() % 2 != 0) { in FromHexString() 56 LOG_INFO("str size is not divisible by 2, size is %zu", str.size()); in FromHexString() 59 if (std::find_if_not(str.begin(), str.end(), IsHexDigit{}) != str.end()) { in FromHexString() 64 value.reserve(str.size() / 2); in FromHexString() 65 for (size_t i = 0; i < str.size(); i += 2) { in FromHexString() 67 auto ret = std::from_chars(str.c_str() + i, str.c_str() + i + 2, v, 16); in FromHexString() 77 std::string StringTrim(std::string str) { in StringTrim() argument [all …]
|
D | strings.h | 43 return tmp.str(); in ToString() 55 return tmp.str(); in ToHexString() 67 return tmp.str(); 75 return tmp.str(); 88 return ss.str(); in ToHexString() 94 bool IsValidHexString(const std::string& str); 97 std::optional<std::vector<uint8_t>> FromHexString(const std::string& str); 100 std::string StringTrim(std::string str); 103 std::vector<std::string> StringSplit(const std::string& str, const std::string& delim, size_t max_t… 109 std::optional<int64_t> Int64FromString(const std::string& str); [all …]
|
/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/Bluetooth/system/gd/rust/linux/stack/src/ |
D | uuid.rs | 8 pub const A2DP_SINK: &str = "0000110B-0000-1000-8000-00805F9B34FB"; 9 pub const A2DP_SOURCE: &str = "0000110A-0000-1000-8000-00805F9B34FB"; 10 pub const ADV_AUDIO_DIST: &str = "0000110D-0000-1000-8000-00805F9B34FB"; 11 pub const HSP: &str = "00001108-0000-1000-8000-00805F9B34FB"; 12 pub const HSP_AG: &str = "00001112-0000-1000-8000-00805F9B34FB"; 13 pub const HFP: &str = "0000111E-0000-1000-8000-00805F9B34FB"; 14 pub const HFP_AG: &str = "0000111F-0000-1000-8000-00805F9B34FB"; 15 pub const AVRCP_CONTROLLER: &str = "0000110E-0000-1000-8000-00805F9B34FB"; 16 pub const AVRCP_TARGET: &str = "0000110C-0000-1000-8000-00805F9B34FB"; 17 pub const OBEX_OBJECT_PUSH: &str = "00001105-0000-1000-8000-00805f9b34fb"; [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()
|
/packages/modules/Bluetooth/system/blueberry/tests/gd/cert/ |
D | gd_device.py | 147 …def __init__(self, grpc_port: str, grpc_root_server_port: str, signal_port: str, cmd: List[str], l… argument 148 type_identifier: str, name: str, verbose_mode: bool): argument 319 …def __init__(self, grpc_port: str, grpc_root_server_port: str, signal_port: str, cmd: List[str], l… argument 320 type_identifier: str, name: str, verbose_mode: bool): argument 327 self.environment["LLVM_PROFILE_FILE"] = str(self.backing_process_profraw_path) 333 … logging.warning("[%s] Cannot find LLVM symbolizer at %s" % (self.label, str(llvm_symbolizer))) 372 (label, str(backing_process_profraw_path))) 377 (label, str(backing_process_profraw_path))) 381 (label, str(backing_process_profraw_path))) 386 …info("[%s] Skip coverage report as llvm-profdata is not found at %s" % (label, str(llvm_profdata))) [all …]
|
/packages/modules/Virtualization/compos/common/ |
D | lib.rs | 32 pub const COMPOS_APEX_ROOT: &str = "/apex/com.android.compos"; 35 pub const COMPOS_DATA_ROOT: &str = "/data/misc/apexdata/com.android.compos"; 39 pub const CURRENT_INSTANCE_DIR: &str = "current"; 43 pub const TEST_INSTANCE_DIR: &str = "test"; 46 pub const INSTANCE_IMAGE_FILE: &str = "instance.img"; 49 pub const IDSIG_FILE: &str = "idsig"; 53 pub const IDSIG_MANIFEST_APK_FILE: &str = "idsig_manifest_apk"; 56 pub const DEFAULT_VM_CONFIG_PATH: &str = "assets/vm_config.json"; 60 pub const PREFER_STAGED_VM_CONFIG_PATH: &str = "assets/vm_config_staged.json"; 63 pub const DEX2OAT_THREADS_PROP_NAME: &str = "dalvik.vm.boot-dex2oat-threads"; [all …]
|
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/ |
D | GattPMCReceiver.java | 68 String str; in onReceive() local 86 str = extras.getString("StartTime"); in onReceive() 87 Log.d(TAG, "Start Time = " + str); in onReceive() 88 startTime = Integer.valueOf(str); in onReceive() 95 str = extras.getString("WriteTime"); in onReceive() 96 Log.d(TAG, "Write Time = " + str); in onReceive() 97 writeTime = Integer.valueOf(str); in onReceive() 103 str = extras.getString("IdleTime"); in onReceive() 104 Log.d(TAG, "Idle Time = " + str); in onReceive() 105 idleTime = Integer.valueOf(str); in onReceive() [all …]
|
D | BleScanReceiver.java | 258 String str; in onReceive() local 272 str = extras.getString("ScanMode"); in onReceive() 273 Log.d(TAG, "Scan Mode = " + str); in onReceive() 274 scanMode = Integer.valueOf(str); in onReceive() 280 str = extras.getString("StartTime"); in onReceive() 281 Log.d(TAG, "Start Time = " + str); in onReceive() 282 startTime = Integer.valueOf(str); in onReceive() 288 str = extras.getString("ScanTime"); in onReceive() 289 Log.d(TAG, "Scan Time = " + str); in onReceive() 290 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/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/modules/Bluetooth/system/bta/ag/ |
D | bta_ag_cmd.cc | 300 char str[12]; in bta_ag_send_ind() local 301 char* p = str; in bta_ag_send_ind() 356 bta_ag_send_result(p_scb, BTA_AG_IND_RES, str, 0); in bta_ag_send_ind() 593 if ((p_end - p_arg + 1) >= (long)sizeof(val.str)) { in bta_ag_at_hsp_cback() 598 strlcpy(val.str, p_arg, sizeof(val.str)); in bta_ag_at_hsp_cback() 608 static void remove_spaces(char* str) { in remove_spaces() argument 609 char* dest_str = str; in remove_spaces() 611 while (*str) { in remove_spaces() 612 if (*str == ' ') { in remove_spaces() 613 str++; in remove_spaces() [all …]
|
/packages/modules/AppSearch/framework/java/external/android/app/appsearch/util/ |
D | IndentingStringBuilder.java | 62 public IndentingStringBuilder append(@NonNull String str) { in append() argument 63 applyIndentToString(str); in append() 97 private void applyIndentToString(@NonNull String str) { in applyIndentToString() argument 98 int index = str.indexOf("\n"); in applyIndentToString() 103 if (str.length() > 1) { in applyIndentToString() 104 applyIndentToString(str.substring(index + 1)); in applyIndentToString() 109 String beforeIndentString = str.substring(0, index); in applyIndentToString() 113 if (str.length() > index + 1) { in applyIndentToString() 114 String afterIndentString = str.substring(index + 1); in applyIndentToString() 123 mStringBuilder.append(str); in applyIndentToString()
|
/packages/modules/Bluetooth/tools/pdl/src/ |
D | test_utils.rs | 17 pub fn find_binary(name: &str) -> Result<std::path::PathBuf, String> { in find_binary() 42 pub fn rustfmt(input: &str) -> String { in rustfmt() 68 pub fn diff(left_label: &str, left: &str, right_label: &str, right: &str) -> String { in diff() argument 98 pub fn assert_eq_with_diff(left_label: &str, left: &str, right_label: &str, right: &str) { in assert_eq_with_diff() argument 125 pub fn assert_contains(haystack: &str, needle: &str) { in assert_contains() argument 148 pub fn assert_snapshot_eq<P: AsRef<Path>>(snapshot_path: P, actual_content: &str) { in assert_snapshot_eq() argument
|
/packages/modules/Bluetooth/system/blueberry/utils/ |
D | android_bluetooth_decorator.py | 197 def set_user_params(self, params: Dict[str, Any]) -> None: argument 200 def get_user_params(self) -> Dict[str, Any]: 212 def is_package_installed(self, package_name: str) -> bool: argument 289 def wait_for_discovery_success(self, mac_address: str, timeout: float = 30) -> float: argument 317 def wait_for_pairing_success(self, mac_address: str, timeout: float = 30) -> float: argument 339 def wait_for_connection_success(self, mac_address: str, timeout: int = 30) -> float: argument 374 def get_device_info(self) -> Dict[str, Any]: 393 def pair_and_connect_bluetooth(self, mac_address: str, attempts: int = 3, argument 459 def disconnect_bluetooth(self, mac_address: str, timeout: float = 30) -> float: argument 489 def connect_bluetooth(self, mac_address: str, timeout: float = 30) -> float: argument [all …]
|
/packages/modules/Connectivity/tests/common/java/android/net/ |
D | TcpKeepalivePacketDataTest.kt | 83 val str = data.toString() in <lambda>() constant 85 assertTrue(str.contains(data.srcAddress.hostAddress)) in <lambda>() 86 assertTrue(str.contains(data.srcPort.toString())) in <lambda>() 87 assertTrue(str.contains(data.dstAddress.hostAddress)) in <lambda>() 88 assertTrue(str.contains(data.dstPort.toString())) in <lambda>() 90 assertTrue(str.contains(data.getTcpSeq().toString())) in <lambda>() 91 assertTrue(str.contains(data.getTcpAck().toString())) in <lambda>() 92 assertTrue(str.contains(data.getTcpWindow().toString())) in <lambda>() 93 assertTrue(str.contains(data.getTcpWindowScale().toString())) in <lambda>() 94 assertTrue(str.contains(data.getIpTos().toString())) in <lambda>() [all …]
|
/packages/modules/Bluetooth/android/pandora/mmi2grpc/mmi2grpc/ |
D | l2cap.py | 32 def MMI_IUT_SEND_LE_CREDIT_BASED_CONNECTION_REQUEST(self, test: str, pts_addr: bytes, **kwargs): argument 95 def MMI_TESTER_ENABLE_LE_CONNECTION(self, test: str, **kwargs): argument 146 def MMI_UPPER_TESTER_CONFIRM_LE_DATA(self, sent_data: str, test: str, **kwargs): argument 185 def MMI_UPPER_TESTER_CONFIRM_RECEIVE_COMMAND_NOT_UNDERSTAOOD(self, test: str, **kwargs): argument 208 def MMI_UPPER_TESTER_CONFIRM_RECEIVE_REJECT_PSM(self, test: str, **kwargs): argument 221 def MMI_UPPER_TESTER_CONFIRM_RECEIVE_REJECT_AUTHENTICATION(self, test: str, **kwargs): argument 239 def _mmi_135(self, test: str, **kwargs): argument 262 def MMI_UPPER_TESTER_CONFIRM_RECEIVE_REJECT_AUTHORIZATION(self, test: str, **kwargs): argument 280 def MMI_UPPER_TESTER_CONFIRM_RECEIVE_REJECT_ENCRYPTION_KEY_SIZE(self, test: str, **kwargs): argument 298 def MMI_UPPER_TESTER_CONFIRM_RECEIVE_REJECT_INVALID_SOURCE_CID(self, test: str, **kwargs): argument [all …]
|
D | gatt.py | 115 def MMI_IUT_SEND_PREPARE_WRITE_REQUEST_VALID_SIZE(self, description: str, **kwargs): argument 144 def MMI_SEND_PRIMARY_SERVICE_UUID(self, description: str, **kwargs): argument 159 def MMI_SEND_PRIMARY_SERVICE_UUID_128(self, description: str, **kwargs): argument 215 def MMI_CONFIRM_PRIMARY_SERVICE(self, test, description: str, **kwargs): argument 263 def MMI_CONFIRM_INCLUDE_SERVICE(self, description: str, **kwargs): argument 296 def MMI_IUT_DISCOVER_SERVICE_UUID(self, description: str, **kwargs): argument 312 def MMI_CONFIRM_ALL_CHARACTERISTICS_SERVICE(self, description: str, **kwargs): argument 331 def MMI_IUT_DISCOVER_SERVICE_UUID_RANGE(self, description: str, **kwargs): argument 356 def MMI_CONFIRM_CHARACTERISTICS(self, description: str, **kwargs): argument 387 def MMI_IUT_DISCOVER_DESCRIPTOR_RANGE(self, description: str, **kwargs): argument [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);
|
/packages/modules/Bluetooth/system/osi/test/ |
D | allocator_test.cc | 29 char str[] = "IloveBluetooth"; in TEST_F() local 30 size_t len = strlen(str); in TEST_F() 34 copy_str = osi_strndup(str, 0); in TEST_F() 39 copy_str = osi_strndup(str, len); in TEST_F() 40 EXPECT_EQ(0, strcmp(str, copy_str)); in TEST_F() 44 copy_str = osi_strndup(str, len - 5); in TEST_F() 49 copy_str = osi_strndup(str, len + 5); in TEST_F() 50 EXPECT_EQ(0, strcmp(str, copy_str)); in TEST_F()
|
/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
|
/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/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 …]
|