Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffc805e1 authored by Chuwei Xu's avatar Chuwei Xu Committed by Alex Medina
Browse files

DO NOT MERGE Fix testVerifyStatsExternalConsistent case

Root cause: For devices mount /data partition without quota option will
get this testcase failure, because
the getExternalSize logic will use Android/obb path
to calculate totalsize.
But the testcase will check the totalsize excluding obb.

Solution: For device mounted userdata without quota option
will remove obbSize from totalSize, to
Make android.appsecurity.cts.StorageHostTest
testcase PASS.

Test:  run cts-on-gsi -m CtsAppSecurityHostTestCases -t
android.appsecurity.cts.StorageHostTest

Bug: 145269983
Change-Id: I8df02d5427d7512046ca3793f03a133a4ad00cbd
(cherry picked from 5d64ddfe)
parent aa0f5b00
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2016,6 +2016,9 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std:
        auto obbPath = StringPrintf("%s/Android/obb",
                create_data_media_path(uuid_, userId).c_str());
        calculate_tree_size(obbPath, &obbSize);
        if (!(flags & FLAG_USE_QUOTA)) {
            totalSize -= obbSize;
        }
        ATRACE_END();
    }