• Home
  • History
  • Annotate
  • only in /frameworks/base/services/tests/servicestests/src/com/android/server/storage/
History log of /frameworks/base/services/tests/servicestests/src/com/android/server/storage/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d230dc202cb03185652e12b3024ceea1132dd4d 10-Apr-2017 Daniel Nishi <dhnishi@google.com> Use the StorageStatsManager in FileCollector.

This should vastly improve the speed of the FileCollector and
resolves the null context issue from the previous variant.

Change-Id: I16a70cd0376511b095b1d7fe1c25e8df95263bc1
Fixes: 35807386
Test: Existing tests continue to pass.
iskStatsLoggingServiceTest.java
3cf3b199e3e120f23f54eb7f9905c8d285cb8a28 13-Apr-2017 Daniel Nishi <dhnishi@google.com> Revert "Use the StorageStatsManager in FileCollector."

This reverts commit bd441caaf6fb268b2756bc51304efa038bf58376 due to
causing NPE crashes.

Bug: 37314851
Change-Id: I933eaa3888f84945873de8f7fca0d235306f6aaa
iskStatsLoggingServiceTest.java
bd441caaf6fb268b2756bc51304efa038bf58376 10-Apr-2017 Daniel Nishi <dhnishi@google.com> Use the StorageStatsManager in FileCollector.

This should vastly improve the speed of the FileCollector.

Change-Id: I7a878a0622bbd6c758fb1d36125414d8b025e709
Fixes: 35807386
Test: Existing tests continue to pass.
iskStatsLoggingServiceTest.java
579e5581d5339dbdc79b9176fcc2fad660d155db 09-Mar-2017 Daniel Nishi <dhnishi@google.com> Don't look up storage for uninstalled apps.

This also catches any potential state exceptions which may
occur when errors occur during storage queries on a package.
This should stop the crashes.

Change-Id: Idab92434f74eaf44ba7b3fdbbc6c2c1ac9b10ee2
Fixes: 36075582
Test: FrameworkServicesTest & manually verified file is populated
ppCollectorTest.java
8603ad42df11630e833c10a5d211b01d2cc60c25 07-Mar-2017 Daniel Nishi <dhnishi@google.com> Merge "Use the fast track for the AppCollector."
e40da3c1b7d4eb810b6f067075dbbb011d02a379 14-Feb-2017 Daniel Nishi <dhnishi@google.com> Save/load calculated cache quotas to a file.

This will prevent us from unnecessarily redoing calculation work
by loading the last caches on boot and shoving them down to
installd.

Bug: 33965858
Test: Framework services tests
Change-Id: Ie94e269aa72bceb1ebe87911eaa42e2d826c1123
acheQuotaStrategyTest.java
d7b0329ab7c3355c84f8227939e88f305dd78b51 28-Feb-2017 Daniel Nishi <dhnishi@google.com> Use the fast track for the AppCollector.

This replaces some of the threading shenanigans done to get this
working with the regular PackageManager call. By swapping this
out, we can get results faster, using less power, and with a
simpler implementation and testing strategy.

Bug: 35807386
Test: FrameworkServicesTest
Change-Id: Ib94fd7eba838b5e728f8f2615bcb4d9c82f21885
ppCollectorTest.java
b902a835a3e9a8765b76b034030b61b702db6968 22-Feb-2017 Daniel Nishi <dhnishi@google.com> Don't crash when primary volume is null in AppCollector. am: d54f3a487b
am: e13bfbde1a

Change-Id: I8b35924b59938f84502b0afaa8165ebf1fc2e4d4
d54f3a487bba1dc5008e2e1482ef451a59500752 22-Feb-2017 Daniel Nishi <dhnishi@google.com> Don't crash when primary volume is null in AppCollector.

getPrimaryStorageCurrentVolume() may return a null value. I did
not plan for this case in the AppCollector. This case occurs when
the primary storage is not mounted when the function is called.

By adding in a null check after getPrimaryStorageCurrentVolume()
and adding in preconditions to verify the non-nullness of the
volume as it propagates through the AppCollector, we ensure that
there should be no more NPE crashes for this reason.

Bug: 35636901
Test: FrameworkServicesTests
Change-Id: I4009e55502f71b8f14dd917ddd00caef3551aafd
ppCollectorTest.java
e47eac74f7c80738017734342f66b615189e7596 19-Jan-2017 Daniel Nishi <dhnishi@google.com> Only count user 0 for diskstats package logging.

This avoids sizing issues and allows us to be accurate within
a subset of the users, rather than less accurate over the entire
user base.

Bug: 34457425
Test: services instrumentation tests
Change-Id: Ic460a564a9ab9805c7739b4f40502e96bbfe7953
iskStatsFileLoggerTest.java
cf76a16e660a361670745b043198b797ccd86747 22-Dec-2016 Daniel Nishi <dhnishi@google.com> Fix a bug where the package stats query timeout may crash.

This adds a null-check to verify that we got real data before
trying to use it and increases the timeout time to reduce the
likelihood of timing out.

Test: FrameworkServicesTests
Bug: 33836034
Change-Id: Ia1ad4aba05c5c4fb8688fc9fc94df344f736e396
iskStatsLoggingServiceTest.java
639f95dd13270805fd5914fec2ea785e941aa516 21-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'diskstats-mr2' into nyc-mr2-dev

* changes:
Augment diskstats dumpsys to have categorization and apps.
Add a file collector to the platform.
090b2d9d6c73ad1b92fd6374aaaa26a384333239 13-Dec-2016 Daniel Nishi <dhnishi@google.com> Augment diskstats dumpsys to have categorization and apps.

This adds a new service which opportunistically saves the
file system categorization information and the app sizes. This
information is fetched during a diskstats dumpsys call from a file
stored on the disk. This allows us to keep the dumpsys running quickly
while adding information which is costly to calculate.

Bug: 32207207
Test: System server instrumentation tests
Change-Id: Id59e84b9ad38a9debf3e46e5133ef06f7353829d
iskStatsFileLoggerTest.java
iskStatsLoggingServiceTest.java
c7d9de59bfa083472a5c8fcfc02c2363b33e204f 13-Dec-2016 Daniel Nishi <dhnishi@google.com> Add an app size collector.

The app collector gets a list of app sizes for packages on a given
storage volume. This information will be exposed as part of an
expansion of the diskstats dumpsys.

When the collector runs, it sets up a handler on a BackgroundThread
which asks the PackageManager for the package sizes for all apps and
all users. The call for the information is blocked using a
CompletableFuture until the call times out or until we've received
all of the package stats. After the stats are all obtained, the
future completes.

Bug: 32207207
Test: System server instrumentation tests
Change-Id: I3a27dc4410effb12ae33894b561c02a60322f7b0
ppCollectorTest.java
be770dce086413618d05917ebb967e0414346dce 10-Nov-2016 Daniel Nishi <dhnishi@google.com> Add a file collector to the platform.

The file collector takes in a file path and recursively
classifies and provides the amount of storage provided by
each classification. This information can be surfaced in
Settings or to fulfill storage telemetry calculations.

Bug: 32207207
Test: System server instrumentation tests
Change-Id: Iff03260859cd4bbd11e7d60b1825115aad540d48
ileCollectorTest.java