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

Skip to content
Commit ce66524d authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-team Robot
Browse files

Consistent "low storage" behavior.

Fix several bugs related to storage accounting.  Since getDataBytes()
already includes cached data, we need to subtract it to avoid blaming
apps for it.

We also need to blame app code on someone, so we blame it on the
current user.  StorageStatsManager was fixed awhile back to only
return the app code size on the requested storage volume, so we can
remove the system app checks.

Subtract "appBytes" from external storage accounting, since it's
already been blamed elsewhere against specific apps.

Pass along storage results from all users on the device, and subtract
them all when estimating size of "system" data.  To avoid embarrassing
estimation bugs, make sure that "system" data is at least 1GB.

Bug: 38008706
Test: cts-tradefed run commandAndExit cts-dev -m CtsJobSchedulerTestCases -t android.jobscheduler.cts.StorageConstraintTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Change-Id: Ide1e6d0690e5ad4e751c87891f63ba1036434619
(cherry picked from commit 77fe8c1e)
parent 9dda29a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment