/system/bt/build/secondary/third_party/libchrome/ |
D | BUILD.gn | 19 "base/at_exit.cc", 20 "base/atomic_ref_count.h", 21 "base/atomic_sequence_num.h", 22 "base/atomicops.h", 23 "base/base64.cc", 24 "base/base64.h", 25 "base/base_export.h", 26 "base/base_switches.cc", 27 "base/build_time.cc", 28 "base/callback_helpers.cc", [all …]
|
/system/libbase/ |
D | strings_test.cpp | 27 std::vector<std::string> parts = android::base::Split("", ","); in TEST() 33 std::vector<std::string> parts = android::base::Split("foo", ","); in TEST() 39 std::vector<std::string> parts = android::base::Split("foo,bar,baz", ","); in TEST() 47 std::vector<std::string> parts = android::base::Split("foo,,bar", ","); in TEST() 55 std::vector<std::string> parts = android::base::Split("foo,bar,", ","); in TEST() 64 android::base::Split(std::string("foo\0bar", 7), std::string("\0", 1)); in TEST() 71 std::vector<std::string> parts = android::base::Split("foo:bar,baz", ",:"); in TEST() 79 std::vector<std::string> parts = android::base::Split("foo:,bar", ",:"); in TEST() 87 ASSERT_EQ("", android::base::Trim("")); in TEST() 91 ASSERT_EQ("foo", android::base::Trim("foo")); in TEST() [all …]
|
D | parsedouble_test.cpp | 23 ASSERT_FALSE(android::base::ParseDouble("", &d)); in TEST() 24 ASSERT_FALSE(android::base::ParseDouble("x", &d)); in TEST() 25 ASSERT_FALSE(android::base::ParseDouble("123.4x", &d)); in TEST() 27 ASSERT_TRUE(android::base::ParseDouble("123.4", &d)); in TEST() 29 ASSERT_TRUE(android::base::ParseDouble("-123.4", &d)); in TEST() 32 ASSERT_TRUE(android::base::ParseDouble("0", &d, 0.0)); in TEST() 34 ASSERT_FALSE(android::base::ParseDouble("0", &d, 1e-9)); in TEST() 35 ASSERT_FALSE(android::base::ParseDouble("3.0", &d, -1.0, 2.0)); in TEST() 36 ASSERT_TRUE(android::base::ParseDouble("1.0", &d, 0.0, 2.0)); in TEST() 39 ASSERT_FALSE(android::base::ParseDouble("123.4x", nullptr)); in TEST() [all …]
|
D | parseint_test.cpp | 26 ASSERT_FALSE(android::base::ParseInt("x", &i)); in TEST() 29 ASSERT_FALSE(android::base::ParseInt("123x", &i)); in TEST() 32 ASSERT_TRUE(android::base::ParseInt("123", &i)); in TEST() 36 EXPECT_TRUE(android::base::ParseInt(" 123", &i)); in TEST() 38 ASSERT_TRUE(android::base::ParseInt("-123", &i)); in TEST() 41 EXPECT_TRUE(android::base::ParseInt(" -123", &i)); in TEST() 45 ASSERT_TRUE(android::base::ParseInt("1234", &s)); in TEST() 48 ASSERT_TRUE(android::base::ParseInt("12", &i, 0, 15)); in TEST() 51 ASSERT_FALSE(android::base::ParseInt("-12", &i, 0, 15)); in TEST() 54 ASSERT_FALSE(android::base::ParseInt("16", &i, 0, 15)); in TEST() [all …]
|
D | properties_test.cpp | 33 android::base::SetProperty("debug.libbase.property_test", "hello"); in TEST() 35 std::string s = android::base::GetProperty("debug.libbase.property_test", ""); in TEST() 38 android::base::SetProperty("debug.libbase.property_test", "world"); in TEST() 39 s = android::base::GetProperty("debug.libbase.property_test", ""); in TEST() 42 s = android::base::GetProperty("this.property.does.not.exist", ""); in TEST() 45 s = android::base::GetProperty("this.property.does.not.exist", "default"); in TEST() 58 ASSERT_FALSE(android::base::SetProperty(key, value)); in TEST() 59 ASSERT_EQ("missing", android::base::GetProperty(key, "missing")); in TEST() 63 ASSERT_TRUE(android::base::SetProperty(key, value)); in TEST() 64 ASSERT_EQ(value, android::base::GetProperty(key, "missing")); in TEST() [all …]
|
D | logging_test.cpp | 101 if (android::base::kEnableDChecks) { in TEST() 106 if (android::base::kEnableDChecks) { in TEST() 112 if (android::base::kEnableDChecks) { in TEST() 118 if (android::base::kEnableDChecks) { in TEST() 131 static_assert(android::base::severity < android::base::FATAL, "Bad input"); \ 132 for (size_t i = static_cast<size_t>(android::base::severity) + 1; \ 133 i <= static_cast<size_t>(android::base::FATAL); \ 136 android::base::ScopedLogSeverity sls2(static_cast<android::base::LogSeverity>(i)); \ 140 android::base::ScopedLogSeverity sls2(static_cast<android::base::LogSeverity>(i)); \ 141 EXPECT_FALSE(WOULD_LOG(::android::base::severity)) << i; \ [all …]
|
D | file_test.cpp | 41 ASSERT_FALSE(android::base::ReadFileToString("/proc/does-not-exist", &s)); in TEST() 49 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path)) in TEST() 52 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST() 63 ASSERT_FALSE(android::base::WriteStringToFile("foo", link.path, false)); in TEST() 65 ASSERT_TRUE(android::base::WriteStringToFile("foo", link.path, true)); in TEST() 68 ASSERT_FALSE(android::base::ReadFileToString(link.path, &s)); in TEST() 70 ASSERT_TRUE(android::base::ReadFileToString(link.path, &s, true)); in TEST() 81 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path, 0660, in TEST() 90 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST() 119 ASSERT_TRUE(android::base::WriteStringToFd("abc", tf.fd)); in TEST() [all …]
|
/system/update_engine/update_manager/ |
D | evaluation_context.h | 68 base::TimeDelta evaluation_timeout, 69 base::TimeDelta expiration_timeout, 70 std::unique_ptr<base::Callback<void(EvaluationContext*)>> unregister_cb); 72 base::TimeDelta evaluation_timeout) in EvaluationContext() 76 base::TimeDelta::Max(), in EvaluationContext() 77 std::unique_ptr<base::Callback<void(EvaluationContext*)>>()) {} in EvaluationContext() 92 bool IsWallclockTimeGreaterThan(base::Time timestamp); 93 bool IsMonotonicTimeGreaterThan(base::Time timestamp); 118 bool RunOnValueChangeOrTimeout(base::Closure callback); 128 std::unique_ptr<base::Closure> RemoveObserversAndTimeout(); [all …]
|
/system/server_configurable_flags/libflags/ |
D | server_configurable_flags_test.cc | 31 using namespace android::base; 44 android::base::SetProperty("persist.device_config.category.flag", "hello"); in TEST() 50 android::base::SetProperty("persist.device_config.category.flag", ""); in TEST() 67 android::base::SetProperty("persist.device_config.attempted_boot_count", "1"); in TEST() 68 android::base::SetProperty("persist.device_config.category1.prop1", "val1"); in TEST() 69 android::base::SetProperty("persist.device_config.category1.prop2", "val2"); in TEST() 70 android::base::SetProperty("persist.device_config.category2.prop3", "val3"); in TEST() 71 android::base::SetProperty("sys.category3.test", "val4"); in TEST() 72 android::base::SetProperty("device_config.reset_performed", ""); in TEST() 76 ASSERT_EQ("2", android::base::GetProperty("persist.device_config.attempted_boot_count", "")); in TEST() [all …]
|
/system/apex/apexd/ |
D | apexd.h | 34 android::base::Result<void> resumeRevertIfNeeded(); 38 android::base::Result<void> scanPackagesDirAndActivate( 41 android::base::Result<void> preinstallPackages( 43 android::base::Result<void> postinstallPackages( 46 android::base::Result<void> stagePackages( 48 android::base::Result<void> unstagePackages( 51 android::base::Result<std::vector<ApexFile>> submitStagedSession( 55 android::base::Result<void> markStagedSessionReady(const int session_id) 57 android::base::Result<void> markStagedSessionSuccessful(const int session_id) 59 android::base::Result<void> revertActiveSessions( [all …]
|
/system/bt/service/test/ |
D | settings_unittest.cc | 34 void SetUp() override { base::CommandLine::Reset(); } in SetUp() 36 void TearDown() override { base::CommandLine::Reset(); } in TearDown() 39 base::AtExitManager exit_manager_; 47 const base::CommandLine::CharType* argv[] = {"program"}; in TEST_F() 48 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F() 53 const base::CommandLine::CharType* argv[] = { in TEST_F() 55 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F() 60 const base::CommandLine::CharType* argv[] = {"program", "--foobarbaz"}; in TEST_F() 61 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F() 66 const base::CommandLine::CharType* argv[] = {"program", "foobarbaz"}; in TEST_F() [all …]
|
/system/core/fs_mgr/libfs_avb/tests/ |
D | fs_avb_test_util.h | 40 int rc = system(base::StringPrintf(command_format, ##__VA_ARGS__).c_str()); \ 51 base::FilePath path; 59 base::FilePath key_blob_path; 62 inline android::base::unique_fd OpenUniqueReadFd(const base::FilePath& file_path) { in OpenUniqueReadFd() 63 return android::base::unique_fd(open(file_path.value().c_str(), O_RDONLY | O_CLOEXEC)); in OpenUniqueReadFd() 81 base::FilePath GenerateVBMetaImage( 83 const base::FilePath& key_path, 84 const std::vector<base::FilePath>& include_descriptor_image_paths, 90 base::FilePath ExtractVBMetaImage(const base::FilePath& image_path, 96 base::FilePath GenerateImage(const std::string& file_name, size_t image_size, [all …]
|
D | fs_avb_test_util.cpp | 29 base::FilePath BaseFsAvbTest::data_dir_ = base::FilePath("tests/data"); 36 base::SetCurrentDirectory(base::FilePath(android::base::GetExecutableDirectory())); in SetUp() 39 base::FilePath tmp_dir; in SetUp() 41 base::CreateTemporaryDirInDir(tmp_dir, "libfs_avb-tests.", &test_dir_); in SetUp() 47 ASSERT_TRUE(base::DeleteFile(test_dir_, true /* recursive */)); in TearDown() 56 base::FilePath image_path = iter->second.path; in CalcVBMetaDigest() 57 base::FilePath vbmeta_digest_path = test_dir_.Append("vbmeta_digest"); in CalcVBMetaDigest() 65 EXPECT_TRUE(base::ReadFileToString(vbmeta_digest_path, &vbmeta_digest_data)); in CalcVBMetaDigest() 68 base::TrimString(vbmeta_digest_data, " \t\n", &trimmed_digest_data); in CalcVBMetaDigest() 72 base::FilePath BaseFsAvbTest::GenerateVBMetaImage( in GenerateVBMetaImage() [all …]
|
D | util_test.cpp | 155 base::FilePath tmp_dir; in TEST() 159 base::FilePath wait_path = tmp_dir.Append("libfs_avb-test-exist-dir"); in TEST() 160 ASSERT_TRUE(base::DeleteFile(wait_path, false /* resursive */)); in TEST() 162 EXPECT_TRUE(base::CreateDirectory(wait_path)); in TEST() 166 ASSERT_TRUE(base::DeleteFile(wait_path, false /* resursive */)); in TEST() 170 base::FilePath wait_path("/path/not/exist"); in TEST() 176 base::FilePath tmp_dir; in TEST() 180 base::FilePath wait_path = tmp_dir.Append("libfs_avb-test-exist-dir"); in TEST() 181 ASSERT_TRUE(base::DeleteFile(wait_path, false /* resursive */)); in TEST() 186 EXPECT_TRUE(base::CreateDirectory(wait_path)); in TEST() [all …]
|
/system/bpf/libbpf_android/include/bpf/ |
D | BpfMap.h | 65 base::Result<Key> getFirstKey() const { in getFirstKey() 73 base::Result<Key> getNextKey(const Key& key) const { in getNextKey() 81 base::Result<void> writeValue(const Key& key, const Value& value, uint64_t flags) { in writeValue() 88 base::Result<Value> readValue(const Key key) const { in readValue() 96 base::Result<void> deleteValue(const Key& key) { in deleteValue() 104 base::Result<void> init(const char* path); 108 base::Result<void> iterate( 109 const std::function<base::Result<void>(const Key& key, const BpfMap<Key, Value>& map)>& 114 base::Result<void> iterateWithValue( 115 const std::function<base::Result<void>(const Key& key, const Value& value, [all …]
|
/system/bt/btif/avrcp/ |
D | avrcp_service.cc | 38 base::MessageLoop* jni_message_loop_ = nullptr; 39 base::CancelableTaskTracker task_tracker_; 41 void do_in_avrcp_jni(const base::Closure& task) { in do_in_avrcp_jni() 142 do_in_avrcp_jni(base::Bind(&MediaInterface::SendKeyEvent, in SendKeyEvent() 143 base::Unretained(wrapped_), key, state)); in SendKeyEvent() 148 do_in_main_thread(FROM_HERE, base::Bind(cb, data)); in GetSongInfo() 151 auto bound_cb = base::Bind(cb_lambda, info_cb); in GetSongInfo() 153 do_in_avrcp_jni(base::Bind(&MediaInterface::GetSongInfo, in GetSongInfo() 154 base::Unretained(wrapped_), bound_cb)); in GetSongInfo() 159 do_in_main_thread(FROM_HERE, base::Bind(cb, status)); in GetPlayStatus() [all …]
|
/system/update_engine/common/ |
D | clock.cc | 23 base::Time Clock::GetWallclockTime() { in GetWallclockTime() 24 return base::Time::Now(); in GetWallclockTime() 27 base::Time Clock::GetMonotonicTime() { in GetMonotonicTime() 35 return base::Time(); in GetMonotonicTime() 39 now_tv.tv_usec = now_ts.tv_nsec / base::Time::kNanosecondsPerMicrosecond; in GetMonotonicTime() 40 return base::Time::FromTimeVal(now_tv); in GetMonotonicTime() 43 base::Time Clock::GetBootTime() { in GetBootTime() 50 return base::Time(); in GetBootTime() 54 now_tv.tv_usec = now_ts.tv_nsec / base::Time::kNanosecondsPerMicrosecond; in GetBootTime() 55 return base::Time::FromTimeVal(now_tv); in GetBootTime()
|
D | fake_clock.h | 29 base::Time GetWallclockTime() override { return wallclock_time_; } in GetWallclockTime() 31 base::Time GetMonotonicTime() override { return monotonic_time_; } in GetMonotonicTime() 33 base::Time GetBootTime() override { return boot_time_; } in GetBootTime() 35 void SetWallclockTime(const base::Time& time) { wallclock_time_ = time; } in SetWallclockTime() 37 void SetMonotonicTime(const base::Time& time) { monotonic_time_ = time; } in SetMonotonicTime() 39 void SetBootTime(const base::Time& time) { boot_time_ = time; } in SetBootTime() 42 base::Time wallclock_time_; 43 base::Time monotonic_time_; 44 base::Time boot_time_;
|
D | prefs.cc | 39 void DeleteEmptyDirectories(const base::FilePath& path) { in DeleteEmptyDirectories() 40 base::FileEnumerator path_enum( in DeleteEmptyDirectories() 41 path, false /* recursive */, base::FileEnumerator::DIRECTORIES); in DeleteEmptyDirectories() 42 for (base::FilePath dir_path = path_enum.Next(); !dir_path.empty(); in DeleteEmptyDirectories() 45 if (base::IsDirectoryEmpty(dir_path)) in DeleteEmptyDirectories() 46 base::DeleteFile(dir_path, false); in DeleteEmptyDirectories() 71 base::TrimWhitespaceASCII(str_value, base::TRIM_ALL, &str_value); in GetInt64() 72 TEST_AND_RETURN_FALSE(base::StringToInt64(str_value, value)); in GetInt64() 77 return SetString(key, base::NumberToString(value)); in SetInt64() 84 base::TrimWhitespaceASCII(str_value, base::TRIM_ALL, &str_value); in GetBoolean() [all …]
|
/system/bt/gd/common/ |
D | bind.h | 24 using base::Bind; 25 using base::BindOnce; 26 using base::ConstRef; 27 using base::IgnoreResult; 28 using base::MakeUnboundRunType; 29 using base::Owned; 30 using base::Passed; 31 using base::RetainedRef; 32 using base::Unretained; 35 inline base::Callback<MakeUnboundRunType<Functor, T, Args...>> BindOn(T* obj, Functor&& functor, Ar… in BindOn()
|
/system/bt/common/ |
D | message_loop_thread.h | 70 bool DoInThread(const base::Location& from_here, base::OnceClosure task); 93 base::PlatformThreadId GetThreadId() const; 127 base::WeakPtr<MessageLoopThread> GetWeakPtr(); 136 base::MessageLoop* message_loop() const; 176 bool DoInThreadDelayed(const base::Location& from_here, 177 base::OnceClosure task, const base::TimeDelta& delay); 192 base::MessageLoop* message_loop_; 193 base::RunLoop* run_loop_; 195 base::PlatformThreadId thread_id_; 198 base::WeakPtrFactory<MessageLoopThread> weak_ptr_factory_;
|
D | once_timer_unittest.cc | 98 base::BindOnce(&OnceTimerTest::GetName, in TEST_F() 99 base::Unretained(this), &my_name, promise_), in TEST_F() 100 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F() 125 base::BindOnce(&OnceTimerTest::CancelTimerAndWait, in TEST_F() 126 base::Unretained(this)), in TEST_F() 127 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F() 137 base::BindOnce(&OnceTimerTest::ShouldNotHappen, base::Unretained(this)), in TEST_F() 138 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F() 151 base::BindOnce(&OnceTimerTest::ShouldNotHappen, base::Unretained(this)), in TEST_F() 152 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F() [all …]
|
D | once_timer.h | 54 bool Schedule(const base::WeakPtr<MessageLoopThread>& thread, 55 const base::Location& from_here, base::OnceClosure task, 56 base::TimeDelta delay); 76 base::WeakPtr<MessageLoopThread> message_loop_thread_; 77 base::CancelableOnceClosure task_wrapper_; 78 base::OnceClosure task_; 79 base::TimeDelta delay_;
|
/system/core/toolbox/ |
D | modprobe.cpp | 78 void MyLogger(android::base::LogId id, android::base::LogSeverity severity, const char* tag, in MyLogger() 80 android::base::StdioLogger(id, severity, tag, file, line, message); in MyLogger() 82 android::base::KernelLogger(id, severity, tag, file, line, message); in MyLogger() 89 android::base::InitLogging(argv, MyLogger); in modprobe_main() 90 android::base::SetMinimumLogSeverity(android::base::INFO); in modprobe_main() 125 if (!android::base::ReadFileToString(optarg, &mods)) { in modprobe_main() 129 for (auto mod : android::base::Split(stripComments(mods), "\n")) { in modprobe_main() 130 mod = android::base::Trim(mod); in modprobe_main() 147 android::base::SetMinimumLogSeverity(android::base::INFO); in modprobe_main() 155 android::base::SetMinimumLogSeverity(android::base::WARNING); in modprobe_main() [all …]
|
/system/bt/stack/include/ |
D | btu.h | 47 void btu_hcif_send_cmd_with_cb(const base::Location& posted_from, 50 base::OnceCallback<void(uint8_t*, uint16_t)> cb); 62 base::MessageLoop* get_main_message_loop(); 63 bt_status_t do_in_main_thread(const base::Location& from_here, 64 base::OnceClosure task); 65 bt_status_t do_in_main_thread_delayed(const base::Location& from_here, 66 base::OnceClosure task, 67 const base::TimeDelta& delay);
|