/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/core/base/ |
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 | 31 android::base::SetProperty("debug.libbase.property_test", "hello"); in TEST() 33 std::string s = android::base::GetProperty("debug.libbase.property_test", ""); in TEST() 36 android::base::SetProperty("debug.libbase.property_test", "world"); in TEST() 37 s = android::base::GetProperty("debug.libbase.property_test", ""); in TEST() 40 s = android::base::GetProperty("this.property.does.not.exist", ""); in TEST() 43 s = android::base::GetProperty("this.property.does.not.exist", "default"); in TEST() 51 android::base::SetProperty("debug.libbase.property_test", ""); in TEST() 52 std::string s = android::base::GetProperty("debug.libbase.property_test", "default"); in TEST() 57 android::base::SetProperty("debug.libbase.property_test", value.c_str()); in CheckGetBoolProperty() 58 ASSERT_EQ(expected, android::base::GetBoolProperty("debug.libbase.property_test", default_value)); in CheckGetBoolProperty() [all …]
|
D | logging_test.cpp | 88 if (android::base::kEnableDChecks) { in TEST() 93 if (android::base::kEnableDChecks) { in TEST() 98 if (android::base::kEnableDChecks) { in TEST() 111 static_assert(android::base::severity < android::base::FATAL, "Bad input"); \ 112 for (size_t i = static_cast<size_t>(android::base::severity) + 1; \ 113 i <= static_cast<size_t>(android::base::FATAL); \ 116 android::base::ScopedLogSeverity sls2(static_cast<android::base::LogSeverity>(i)); \ 120 android::base::ScopedLogSeverity sls2(static_cast<android::base::LogSeverity>(i)); \ 121 EXPECT_FALSE(WOULD_LOG(::android::base::severity)) << i; \ 126 for (size_t i = static_cast<size_t>(android::base::VERBOSE); \ [all …]
|
D | file_test.cpp | 34 ASSERT_FALSE(android::base::ReadFileToString("/proc/does-not-exist", &s)); in TEST() 42 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path)) in TEST() 45 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST() 56 ASSERT_FALSE(android::base::WriteStringToFile("foo", link.path, false)); in TEST() 58 ASSERT_TRUE(android::base::WriteStringToFile("foo", link.path, true)); in TEST() 61 ASSERT_FALSE(android::base::ReadFileToString(link.path, &s)); in TEST() 63 ASSERT_TRUE(android::base::ReadFileToString(link.path, &s, true)); in TEST() 74 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path, 0660, in TEST() 83 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST() 92 ASSERT_TRUE(android::base::WriteStringToFd("abc", tf.fd)); in TEST() [all …]
|
/system/update_engine/update_manager/ |
D | evaluation_context.h | 65 class EvaluationContext : public base::RefCounted<EvaluationContext>, 70 base::TimeDelta evaluation_timeout, 71 base::TimeDelta expiration_timeout, 72 std::unique_ptr<base::Callback<void(EvaluationContext*)>> unregister_cb); 74 base::TimeDelta evaluation_timeout) in EvaluationContext() 78 base::TimeDelta::Max(), in EvaluationContext() 79 std::unique_ptr<base::Callback<void(EvaluationContext*)>>()) {} in EvaluationContext() 94 bool IsWallclockTimeGreaterThan(base::Time timestamp); 95 bool IsMonotonicTimeGreaterThan(base::Time timestamp); 120 bool RunOnValueChangeOrTimeout(base::Closure callback); [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/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 …]
|
/system/libhidl/transport/base/1.0/vts/functional/ |
D | vts_ibase_test.cpp | 34 using android::hidl::base::V1_0::IBase; 116 [&](const Hal& base) { EXPECT_OK(base.service->ping()) << "Cannot ping " << base.name; }); in TEST_F() argument 120 EachHal([&](const Hal& base) { in TEST_F() argument 121 EXPECT_OK(base.service->interfaceChain([&](const auto& interfaceChain) { in TEST_F() 123 EXPECT_GT(interfaceChain.size(), 1u) << "Invalid instance name " << base.name; in TEST_F() 124 })) << base.name; in TEST_F() 129 EachHal([&](const Hal& base) { in TEST_F() argument 130 EXPECT_OK(base.service->interfaceDescriptor([&](const auto& descriptor) { in TEST_F() 132 EXPECT_GT(descriptor.size(), 0u) << base.name; in TEST_F() 133 EXPECT_NE(IBase::descriptor, descriptor) << base.name; in TEST_F() [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 | 51 base::TrimWhitespaceASCII(str_value, base::TRIM_ALL, &str_value); in GetInt64() 52 TEST_AND_RETURN_FALSE(base::StringToInt64(str_value, value)); in GetInt64() 57 return SetString(key, base::Int64ToString(value)); in SetInt64() 64 base::TrimWhitespaceASCII(str_value, base::TRIM_ALL, &str_value); in GetBoolean() 109 bool Prefs::Init(const base::FilePath& prefs_dir) { in Init() 113 bool Prefs::FileStorage::Init(const base::FilePath& prefs_dir) { in Init() 119 base::FilePath filename; in GetKey() 121 if (!base::ReadFileToString(filename, value)) { in GetKey() 129 base::FilePath filename; in SetKey() 131 if (!base::DirectoryExists(filename.DirName())) { in SetKey() [all …]
|
/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_;
|
D | repeating_timer.h | 54 bool SchedulePeriodic(const base::WeakPtr<MessageLoopThread>& thread, 55 const base::Location& from_here, 56 base::RepeatingClosure task, base::TimeDelta period); 76 base::WeakPtr<MessageLoopThread> message_loop_thread_; 77 base::CancelableClosure task_wrapper_; 78 base::RepeatingClosure task_; 79 base::TimeDelta period_;
|
/system/core/base/include/android-base/ |
D | logging.h | 80 namespace base { 124 explicit LogdLogger(LogId default_log_id = android::base::MAIN); 183 using ::android::base::VERBOSE; \ 184 using ::android::base::DEBUG; \ 185 using ::android::base::INFO; \ 186 using ::android::base::WARNING; \ 187 using ::android::base::ERROR; \ 188 using ::android::base::FATAL_WITHOUT_ABORT; \ 189 using ::android::base::FATAL; \ 203 #define ABORT_AFTER_LOG_EXPR_IF(c, x) (((c) && ::android::base::LogAbortAfterFullExpr()) || (x)) [all …]
|
/system/update_engine/ |
D | payload_state.h | 95 inline base::Time GetBackoffExpiryTime() override { in GetBackoffExpiryTime() 99 base::TimeDelta GetUpdateDuration() override; 101 base::TimeDelta GetUpdateDurationUptime() override; 122 base::Time GetP2PFirstAttemptTimestamp() override; 132 base::TimeDelta GetScatteringWaitPeriod() override { in GetScatteringWaitPeriod() 136 void SetScatteringWaitPeriod(base::TimeDelta wait_period) override; 138 void SetStagingWaitPeriod(base::TimeDelta wait_period) override; 295 void SetBackoffExpiryTime(const base::Time& new_time); 301 void SetUpdateTimestampStart(const base::Time& value); 306 void SetUpdateTimestampEnd(const base::Time& value); [all …]
|
/system/netd/libnetdutils/ |
D | MemBlockTest.cpp | 38 slice.base()[0] = ARBITRARY_VALUE; in makeArbitraryMemBlock() 45 EXPECT_EQ(0U, slice.base()[0]); in checkAllZeros() 52 EXPECT_NE(nullptr, slice.base()); in checkArbitraryMemBlock() 54 EXPECT_EQ(ARBITRARY_VALUE, slice.base()[0]); in checkArbitraryMemBlock() 59 EXPECT_EQ('h', dest.base()[0]); in checkHelloMello() 60 EXPECT_EQ('e', dest.base()[1]); in checkHelloMello() 61 EXPECT_EQ('l', dest.base()[2]); in checkHelloMello() 62 EXPECT_EQ('l', dest.base()[3]); in checkHelloMello() 63 EXPECT_EQ('o', dest.base()[4]); in checkHelloMello() 65 src.base()[0] = 'm'; in checkHelloMello() [all …]
|
/system/bt/stack/test/ |
D | stack_btu_test.cc | 40 void wait(int seconds, base::Closure callback) { in wait() 69 bt_status_t do_in_jni_thread(const base::Location& from_here, in do_in_jni_thread() 70 base::OnceClosure task) { in do_in_jni_thread() 90 base::MessageLoop* message_loop; 99 helper.wait(5, base::Bind(&BtuMessageLoopTest::Fail, base::Unretained(this), in SetUp() 119 base::Bind(&BtuMessageLoopTest::TestCallback, base::Unretained(this))); in TEST_F() 122 FROM_HERE, base::Bind(&TimeoutHelper::notify, base::Unretained(&helper))); in TEST_F() 125 helper.wait(5, base::Bind(&BtuMessageLoopTest::Fail, base::Unretained(this), in TEST_F()
|