History log of /frameworks/base/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0034788844fd053f87beee60092c1dd44c7046e2 18-Apr-2017 Jeff Sharkey <jsharkey@android.com> Fix code accounting bugs, track external app data.

When counting code size, don't include APKs baked into the system.

Settings already accounts external storage used by apps, so they
need a way to exclude that from the total space used by external
storage; give them new getAppSize() API.

Refine docs to explain that emulated storage might be included in
measured statistics.

Resolve symlinks as part of matching getUuidForPath().

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 35812899, 35844919, 37193650
Change-Id: Iec3ce8b336b71dc98a7d25fdd30fa78e9ee826dc
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
90bd8930e5ca47b89c4394d267e2decc140c3fdf 18-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Only measure each UID once in InstallerTest." am: 32aac7b9c9 am: 7b6d21b37e am: 5092952317
am: a199722ed6

Change-Id: I1164f2786b55f029283d309a951dddeb610fcb47
dd0edac92f15d009f0da7db832f80c520f137fb1 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Only measure each UID once in InstallerTest.

Test: builds, boots
Bug: 34341727
Change-Id: Ic8250b7383f52adf30139ceed02469a9d278dc18
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
8dedad31f7fa604028ee6d28963bcc564e76c467 10-Jan-2017 Jeff Sharkey <jsharkey@android.com> Wire up storage stats API to installd.

Now that installd has the implementation details we need, we can wire
up the public APIs to use them.

Shuffle APIs around a bit so that StorageStats can be reused for both
UID and UserHandle results, and rename StorageSummary to
ExternalStorageStats. Provide getTotalBytes() and getFreeBytes() as
first-class methods so we can answer those questions quickly without
paying the cost of measuring external storage details.

Current costs on a typical device with a test account after flushing
dentry caches:

queryStatsForUid() manual: 6922ms
queryStatsForUid() quota: 525ms

queryStatsForUser() manual: 1686ms
queryStatsForUser() quota: 113ms

queryExternalStatsForUser() manual: 42ms
queryExternalStatsForUser() quota: 2ms

For verification purposes, a new "fw.verify_storage" system property
can be set to compute both manual and quota statistics, and log any
discrepancies.

Test: builds, boots
Bug: 27948817, 32206268
Change-Id: I4ea3df3372a7379aa8cf4c20c44120c8f0702c15
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
82ca90171fdd5b76f58225bacbf9939a76350712 09-Jan-2017 Jeff Sharkey <jsharkey@android.com> Methods to calculate user and external disk usage.

Add method to calculate user disk usage, which will be faster than
making a Binder call for every single appId under a user. Add method
to calculate external disk usage, which uses file extensions to track
usage with "audio", "video", and "images" categories.

Start measuring internal and external storage space separately; new
GIDs are coming in a future CL. Pass down all package names, inodes,
and code paths, since shared UIDs host more than one.

Test: builds, boots, stats are consistent
Bug: 27948817, 32206268
Change-Id: Icbb82a30fe711ef05e9a16bb1dc740dc943a9ddc
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java