/system/core/base/ |
D | strings_test.cpp | 25 std::vector<std::string> parts = android::base::Split("", ","); in TEST() 31 std::vector<std::string> parts = android::base::Split("foo", ","); in TEST() 37 std::vector<std::string> parts = android::base::Split("foo,bar,baz", ","); in TEST() 45 std::vector<std::string> parts = android::base::Split("foo,,bar", ","); in TEST() 54 android::base::Split(std::string("foo\0bar", 7), std::string("\0", 1)); in TEST() 61 std::vector<std::string> parts = android::base::Split("foo:bar,baz", ",:"); in TEST() 69 std::vector<std::string> parts = android::base::Split("foo:,bar", ",:"); in TEST() 77 ASSERT_EQ("", android::base::Trim("")); in TEST() 81 ASSERT_EQ("foo", android::base::Trim("foo")); in TEST() 85 ASSERT_EQ("foo", android::base::Trim(" foo")); in TEST() [all …]
|
D | logging_test.cpp | 75 std::string make_log_pattern(android::base::LogSeverity severity, in make_log_pattern() 79 return android::base::StringPrintf( in make_log_pattern() 94 android::base::ReadFdToString(cap.fd(), &output); in TEST() 97 make_log_pattern(android::base::WARNING, "foobar")); in TEST() 107 android::base::ReadFdToString(cap.fd(), &output); in TEST() 110 make_log_pattern(android::base::INFO, "foobar")); in TEST() 120 android::base::ReadFdToString(cap.fd(), &output); in TEST() 125 android::base::ScopedLogSeverity severity(android::base::DEBUG); in TEST() 131 android::base::ReadFdToString(cap.fd(), &output); in TEST() 134 make_log_pattern(android::base::DEBUG, "foobar")); in TEST() [all …]
|
D | file_test.cpp | 32 ASSERT_FALSE(android::base::ReadFileToString("/proc/does-not-exist", &s)); in TEST() 39 ASSERT_TRUE(android::base::ReadFileToString("/proc/version", &s)) << errno; in TEST() 49 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.filename)) << errno; in TEST() 51 ASSERT_TRUE(android::base::ReadFileToString(tf.filename, &s)) << errno; in TEST() 58 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.filename, 0660, in TEST() 67 ASSERT_TRUE(android::base::ReadFileToString(tf.filename, &s)) << errno; in TEST() 74 ASSERT_TRUE(android::base::WriteStringToFd("abc", tf.fd)); in TEST() 79 ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)) << errno; in TEST() 89 ASSERT_TRUE(android::base::ReadFully(fd, buf, 5)); in TEST() 94 ASSERT_FALSE(android::base::ReadFully(fd, buf, sizeof(buf))); in TEST() [all …]
|
D | stringprintf_test.cpp | 25 EXPECT_EQ("00107e59", android::base::StringPrintf("%08zx", size)); in TEST() 26 EXPECT_EQ("0x00107e59", android::base::StringPrintf("0x%08zx", size)); in TEST() 31 android::base::StringAppendF(&s, "b"); in TEST() 37 android::base::StringPrintf("hello %s", "world"); in TEST() 45 std::string s(android::base::StringPrintf("%s", buf)); in TestN()
|
/system/core/healthd/ |
D | healthd.h | 58 android::String8 batteryStatusPath; 59 android::String8 batteryHealthPath; 60 android::String8 batteryPresentPath; 61 android::String8 batteryCapacityPath; 62 android::String8 batteryVoltagePath; 63 android::String8 batteryTemperaturePath; 64 android::String8 batteryTechnologyPath; 65 android::String8 batteryCurrentNowPath; 66 android::String8 batteryCurrentAvgPath; 67 android::String8 batteryChargeCounterPath; [all …]
|
/system/core/libutils/ |
D | SharedBufferTest.cpp | 27 EXPECT_DEATH(android::SharedBuffer::alloc(SIZE_MAX), ""); in TEST() 28 EXPECT_DEATH(android::SharedBuffer::alloc(SIZE_MAX - sizeof(android::SharedBuffer)), ""); in TEST() 32 android::SharedBuffer* buf = in TEST() 33 android::SharedBuffer::alloc(SIZE_MAX - sizeof(android::SharedBuffer) - 1); in TEST() 36 buf = android::SharedBuffer::alloc(0); in TEST() 43 android::SharedBuffer* buf = android::SharedBuffer::alloc(10); in TEST() 44 EXPECT_DEATH(buf->editResize(SIZE_MAX - sizeof(android::SharedBuffer)), ""); in TEST() 45 buf = android::SharedBuffer::alloc(10); in TEST() 48 buf = android::SharedBuffer::alloc(10); in TEST() 51 buf = buf->editResize(SIZE_MAX - sizeof(android::SharedBuffer) - 1); in TEST() [all …]
|
/system/core/fingerprintd/ |
D | fingerprintd.cpp | 38 android::sp<android::IServiceManager> serviceManager = android::defaultServiceManager(); in main() 39 android::sp<android::FingerprintDaemonProxy> proxy = in main() 40 android::FingerprintDaemonProxy::getInstance(); in main() 41 android::status_t ret = serviceManager->addService( in main() 42 android::FingerprintDaemonProxy::descriptor, proxy); in main() 43 if (ret != android::OK) { in main() 52 android::IPCThreadState::self()->joinThreadPool(); in main()
|
/system/core/base/include/base/ |
D | logging.h | 26 namespace android { 55 explicit LogdLogger(LogId default_log_id = android::base::MAIN); 87 ::android::base::LogMessage(__FILE__, __LINE__, ::android::base::DEFAULT, \ 88 ::android::base::severity, -1).stream() 93 ::android::base::LogMessage(__FILE__, __LINE__, ::android::base::dest, \ 94 ::android::base::severity, -1).stream() 99 ::android::base::LogMessage(__FILE__, __LINE__, ::android::base::DEFAULT, \ 100 ::android::base::severity, errno).stream() 104 ::android::base::LogMessage(__FILE__, __LINE__, ::android::base::dest, \ 105 ::android::base::severity, errno).stream() [all …]
|
/system/vold/ |
D | main.cpp | 50 using android::base::StringPrintf; 54 android::base::InitLogging(argv, android::base::LogdLogger(android::base::SYSTEM)); in main() 59 << (android::vold::IsFilesystemSupported("ext4") ? " ext4" : "") in main() 60 << (android::vold::IsFilesystemSupported("f2fs") ? " f2fs" : "") in main() 61 << (android::vold::IsFilesystemSupported("vfat") ? " vfat" : ""); in main() 154 case 'b': android::vold::sBlkidContext = optarg; break; in parse_args() 155 case 'B': android::vold::sBlkidUntrustedContext = optarg; break; in parse_args() 156 case 'f': android::vold::sFsckContext = optarg; break; in parse_args() 157 case 'F': android::vold::sFsckUntrustedContext = optarg; break; in parse_args() 161 CHECK(android::vold::sBlkidContext != nullptr); in parse_args() [all …]
|
D | VolumeManager.h | 64 typedef android::List<ContainerData*> AsecIdCollection; 118 std::shared_ptr<android::vold::Disk> findDisk(const std::string& id); 119 std::shared_ptr<android::vold::VolumeBase> findVolume(const std::string& id); 121 void listVolumes(android::vold::VolumeBase::Type type, std::list<std::string>& list); 132 int setPrimary(const std::shared_ptr<android::vold::VolumeBase>& vol); 209 std::list<std::shared_ptr<android::vold::Disk>> mDisks; 214 std::shared_ptr<android::vold::VolumeBase> mInternalEmulated; 215 std::shared_ptr<android::vold::VolumeBase> mPrimary;
|
D | Benchmark.cpp | 33 using android::base::ReadFileToString; 34 using android::base::WriteStringToFile; 36 namespace android { namespace 138 if (android::vold::PrepareDir(benchPath, 01771, AID_SYSTEM, AID_MISC)) { in BenchmarkPrivate() 142 if (android::vold::PrepareDir(benchPath, 0700, AID_ROOT, AID_ROOT)) { in BenchmarkPrivate() 146 if (android::vold::PrepareDir(benchPath, 0700, AID_ROOT, AID_ROOT)) { in BenchmarkPrivate()
|
/system/core/logd/ |
D | LogStatistics.cpp | 38 namespace android { namespace 155 char *name = android::uidToName(userId); in uidToName() 157 name = android::uidToName(userId - (AID_SHARED_GID_START - AID_APP)); in uidToName() 186 static void format_line(android::String8 &output, in format_line() 187 android::String8 &name, android::String8 &size, android::String8 &pruned) { in format_line() 215 android::String8 output("size/num"); in format() 288 android::String8 name(""); in format() 298 android::String8 size("Size"); in format() 299 android::String8 pruned("Pruned"); in format() 316 android::String8 name(""); in format() [all …]
|
D | LogStatistics.h | 160 namespace android { 172 uid(android::pidToUid(p)), in PidEntry() 173 name(android::pidToName(pid)) { } in PidEntry() 178 name(android::pidToName(e->getPid())) { } in PidEntry() 196 char *n = android::pidToName(p); in add() 208 name = android::pidToName(e->getPid()); in add() 224 uid(android::pidToUid(t)), in TidEntry() 225 name(android::tidToName(tid)) { } in TidEntry() 230 name(android::tidToName(e->getTid())) { } in TidEntry() 248 char *n = android::tidToName(t); in add() [all …]
|
/system/core/include/utils/ |
D | Singleton.h | 25 namespace android { 68 template<> ::android::Mutex \ 69 (::android::Singleton< TYPE >::sLock)(::android::Mutex::PRIVATE); \ 70 template<> TYPE* ::android::Singleton< TYPE >::sInstance(0); \ 71 template class ::android::Singleton< TYPE >;
|
/system/core/libnativebridge/tests/ |
D | DummyNativeBridge2.cpp | 24 extern "C" bool native_bridge2_initialize(const android::NativeBridgeRuntimeCallbacks* /* art_cbs *… in native_bridge2_initialize() 43 extern "C" const struct android::NativeBridgeRuntimeValues* native_bridge2_getAppEnv( in native_bridge2_getAppEnv() 59 extern "C" android::NativeBridgeSignalHandlerFn native_bridge2_get_signal_handler(int signal) { in native_bridge2_get_signal_handler() 66 android::NativeBridgeCallbacks NativeBridgeItf {
|
D | DummyNativeBridge.cpp | 22 extern "C" bool native_bridge_initialize(const android::NativeBridgeRuntimeCallbacks* /* art_cbs */, in native_bridge_initialize() 41 extern "C" const struct android::NativeBridgeRuntimeValues* native_bridge_getAppEnv( in native_bridge_getAppEnv() 46 android::NativeBridgeCallbacks NativeBridgeItf {
|
/system/netd/server/ |
D | NetworkController.cpp | 141 android::RWLock::AutoRLock lock(mRWLock); in getDefaultNetwork() 146 android::RWLock::AutoWLock lock(mRWLock); in setDefaultNetwork() 183 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForDns() 210 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForUser() 232 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForConnect() 265 android::RWLock::AutoRLock lock(mRWLock); in getNetworkForInterface() 275 android::RWLock::AutoRLock lock(mRWLock); in isVirtualNetwork() 299 android::RWLock::AutoWLock lock(mRWLock); in createPhysicalNetwork() 315 android::RWLock::AutoWLock lock(mRWLock); in createVirtualNetwork() 335 android::RWLock::AutoWLock lock(mRWLock); in destroyNetwork() [all …]
|
/system/core/libpixelflinger/ |
D | format.cpp | 21 namespace android { namespace 73 *numEntries = sizeof(android::gPixelFormatInfos)/sizeof(GGLFormat); in gglGetPixelFormatTable() 75 return android::gPixelFormatInfos; in gglGetPixelFormatTable()
|
/system/core/adb/ |
D | test_track_devices.cpp | 42 if (!android::base::WriteFully(s, buffer, len)) in main() 46 if (!android::base::ReadFully(s, buffer, 4)) in main() 55 if (!android::base::ReadFully(s, head, 4)) in main() 62 if (!android::base::ReadFully(s, buffer, len)) in main()
|
D | adb_io_test.cpp | 61 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in TEST() 75 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in TEST() 89 ASSERT_TRUE(android::base::WriteStringToFd(input, tf.fd)) << strerror(errno); in TEST() 112 ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)); in TEST() 129 ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)); in TEST() 152 ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)); in TEST() 165 ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)); in TEST()
|
/system/core/init/ |
D | bootchart.cpp | 63 if (!android::base::ReadFileToString("/proc/uptime", &uptime)) { in get_uptime_jiffies() 86 android::base::ReadFileToString("/proc/cmdline", &kernel_cmdline); in log_header() 110 if (android::base::ReadFileToString(procfile, &content)) { in do_log_file() 131 android::base::ReadFileToString(filename, &cmdline); in do_log_procs() 137 if (android::base::ReadFileToString(filename, &stat)) { in do_log_procs() 158 android::base::ReadFileToString(LOG_STARTFILE, &start); in bootchart_init() 167 android::base::ReadFileToString("/proc/cmdline", &cmdline); in bootchart_init() 225 if (android::base::ReadFileToString(LOG_STOPFILE, &stop) && stop == "1") { in bootchart_step()
|
D | signal_handler.cpp | 43 return android::base::StringPrintf("exited with status %d", WEXITSTATUS(status)); in DescribeStatus() 45 return android::base::StringPrintf("killed by signal %d", WTERMSIG(status)); in DescribeStatus() 47 return android::base::StringPrintf("stopped by signal %d", WSTOPSIG(status)); in DescribeStatus() 67 name = android::base::StringPrintf("Service '%s' (pid %d)", svc->name, pid); in wait_for_one_process() 69 name = android::base::StringPrintf("Untracked pid %d", pid); in wait_for_one_process()
|
/system/core/gatekeeperd/ |
D | gatekeeperd.cpp | 45 namespace android { namespace 336 android::sp<android::IServiceManager> sm = android::defaultServiceManager(); in main() 337 android::sp<android::GateKeeperProxy> proxy = new android::GateKeeperProxy(); in main() 338 android::status_t ret = sm->addService( in main() 339 android::String16("android.service.gatekeeper.IGateKeeperService"), proxy); in main() 340 if (ret != android::OK) { in main() 349 android::IPCThreadState::self()->joinThreadPool(); in main()
|
/system/core/debuggerd/test/ |
D | dump_memory_test.cpp | 159 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 179 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 198 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 211 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 267 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 287 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 312 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 338 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 392 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() 417 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &tombstone_contents)); in TEST_F() [all …]
|
/system/extras/tests/sdcard/ |
D | sdcard_perf_test.cpp | 95 using android::kernelVersion; 96 using android::kMinKernelVersionBufferSize; 97 using android::schedFeatures; 98 using android::kMinSchedFeaturesBufferSize; 100 using android::writePidAndWaitForReply; 101 using android::waitForChildrenAndSignal; 102 using android::waitForChildrenOrExit; 176 int oomAdj = android::pidOutOfMemoryAdj(); in printHeader() 181 android::setPidOutOfMemoryAdj(0); in printHeader() 182 printf("adjuted to %d", android::pidOutOfMemoryAdj()); in printHeader() [all …]
|