Cache was being counted as cache and also as data in the app info page.
This is due to a faulty assumption I made that getDataBytes() and
getCacheBytes() measured distinct areas of storage (in actuality,
getCacheBytes() is a subset of getDataBytes()). This improper assumption
also led to the unit test being incorrect.
Change-Id: I4144d50800f82feaecb7a0a8dff26be3e4f14da8
Fixes: 62182151
Test: Settings robotest & manual
This is a test-only change whose goal is to increase our
confidence in future changes that touch the actual code.
Bug: 62171690
Test: make -j64 RunSettingsRoboTests
Change-Id: Ic5122453c9fec2b166fcfe0c5c33be2705c10906
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
Bug: 62141436
It has failing robolectric test but treehugger didn't catch it for some reason.
This reverts commit 3541f597a4.
Change-Id: Id4bc0ba2d5995092c625a54fa415ff0c2c6785cb
If there is a managed profile, launchers that don't support managed profiles
cannot be selected as default Home
Change-Id: I7a19b5951402ec87a48464d783a539a607adabfe
Fix: 62013411
Test: m RunSettingsRoboTests
This removes the jitter when the cache is empty and there is
initially no summary, and then it is replaced by the fetched summary
when it's available.
Bug:36463348
Test: make RunSettingsRoboTests
Change-Id: I92cafbf23e3c562a470488dea28fd5106bbdf885
Also consider the visiblity of list container, when list container
is invisible, we should show the empty view.
Bug: 62062415
Test: RunSettingsRoboTests
Change-Id: I065e70386242c425ef3cbfb2b703a5433dbe40c1
This will avoid unnecessary static ranking if smart ranking is used.
Since loader does not need to provided sorted collection of results,
the loading data type has changed from List<> to Set<>. This will also
faster lookup in the Adapter.
Fixes: 38447799
Test: make RunSettingsRoboTests
Change-Id: I448b29bd4e8700c8ec4b5766cbeab4b3087ae39a