Loading cmds/installd/InstalldNativeService.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -1641,6 +1641,7 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: int64_t videoSize = 0; int64_t imageSize = 0; int64_t appSize = 0; int64_t obbSize = 0; auto device = findQuotaDeviceForUuid(uuid); if (device.empty()) { Loading Loading @@ -1688,6 +1689,13 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: #endif imageSize = dq.dqb_curspace; } if (quotactl(QCMD(Q_GETQUOTA, GRPQUOTA), device.c_str(), AID_MEDIA_OBB, reinterpret_cast<char*>(&dq)) == 0) { #if MEASURE_DEBUG LOG(DEBUG) << "quotactl() for GID " << AID_MEDIA_OBB << " " << dq.dqb_curspace; #endif obbSize = dq.dqb_curspace; } ATRACE_END(); ATRACE_BEGIN("apps"); Loading Loading @@ -1744,6 +1752,11 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: } fts_close(fts); ATRACE_END(); ATRACE_BEGIN("obb"); auto obbPath = create_data_media_obb_path(uuid_, ""); calculate_tree_size(obbPath, &obbSize); ATRACE_END(); } std::vector<int64_t> ret; Loading @@ -1752,6 +1765,7 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: ret.push_back(videoSize); ret.push_back(imageSize); ret.push_back(appSize); ret.push_back(obbSize); #if MEASURE_DEBUG LOG(DEBUG) << "Final result " << toString(ret); #endif Loading Loading
cmds/installd/InstalldNativeService.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -1641,6 +1641,7 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: int64_t videoSize = 0; int64_t imageSize = 0; int64_t appSize = 0; int64_t obbSize = 0; auto device = findQuotaDeviceForUuid(uuid); if (device.empty()) { Loading Loading @@ -1688,6 +1689,13 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: #endif imageSize = dq.dqb_curspace; } if (quotactl(QCMD(Q_GETQUOTA, GRPQUOTA), device.c_str(), AID_MEDIA_OBB, reinterpret_cast<char*>(&dq)) == 0) { #if MEASURE_DEBUG LOG(DEBUG) << "quotactl() for GID " << AID_MEDIA_OBB << " " << dq.dqb_curspace; #endif obbSize = dq.dqb_curspace; } ATRACE_END(); ATRACE_BEGIN("apps"); Loading Loading @@ -1744,6 +1752,11 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: } fts_close(fts); ATRACE_END(); ATRACE_BEGIN("obb"); auto obbPath = create_data_media_obb_path(uuid_, ""); calculate_tree_size(obbPath, &obbSize); ATRACE_END(); } std::vector<int64_t> ret; Loading @@ -1752,6 +1765,7 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: ret.push_back(videoSize); ret.push_back(imageSize); ret.push_back(appSize); ret.push_back(obbSize); #if MEASURE_DEBUG LOG(DEBUG) << "Final result " << toString(ret); #endif Loading