OSDN Git Service

Add more sane multi-profile app attribution.
authorDaniel Nishi <dhnishi@google.com>
Fri, 16 Jun 2017 00:19:31 +0000 (17:19 -0700)
committerDaniel Nishi <dhnishi@google.com>
Fri, 16 Jun 2017 00:25:10 +0000 (17:25 -0700)
commitb088010d12bdb709fc1aa4269a86924aab58be47
treee7d110f9fd8db2e4f33fb9ea0a7c6319f42071e1
parent327b9119d7954901068f89dc9ac336687ce7931a
Add more sane multi-profile app attribution.

Due to issues w.r.t. attribution across multiple users, we originally
duplicated the previous implementation which zeroed out the sizes. This,
however, caused system bloat due to the change in how we calculate the
system size.

By attributing apps which do not exist in the primary profile to the
first user that shows up with it installed, we can avoid accidentally
attributing it to the system size.

Bug: 62623731
Test: Settings unittest & Settings robotest
Change-Id: I9514c9ecef62ea6270723f62e6bf27c69b75f180
src/com/android/settings/deviceinfo/StorageProfileFragment.java
src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java
src/com/android/settings/deviceinfo/storage/UserProfileController.java
tests/robotests/src/com/android/settings/deviceinfo/StorageProfileFragmentTest.java
tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java