| 379 | |
| 380 | #ifdef __ANDROID__ |
| 381 | std::string getAppDirectory(const std::string &pkg) |
| 382 | { |
| 383 | std::string directory = "/data/app/", base_apk = "base.apk", ret; |
| 384 | KittyIOFile::listFilesCallback(directory, [&](const std::string &filePath) { |
| 385 | if (KittyUtils::Path::fileName(filePath) == base_apk) |
| 386 | { |
| 387 | const std::string fileDir = KittyUtils::Path::fileDirectory(filePath); |
| 388 | if (strstr(fileDir.c_str(), pkg.c_str())) |
| 389 | { |
| 390 | ret = fileDir; |
| 391 | return true; |
| 392 | } |
| 393 | } |
| 394 | return false; |
| 395 | }); |
| 396 | return ret; |
| 397 | } |
| 398 | #endif |
| 399 | |
| 400 | } // namespace KittyMemoryEx |
nothing calls this directly
no outgoing calls
no test coverage detected