Fix two storage measurement bugs.

First, every time installd starts up we need to invalidateMounts()
to ensure we have valid mappings for quotactl() to work.  (Without
this forced invalidation, we were falling back to manual calculation
after an installd restart.)

Second, when calculating the disk space for an app, we need to use
the real appId deconstructed from the uid; oops!  (Without this we
were always trying to calculate the disk usage for UID 0, which
forced us back into the slow-path.)

Bug: 36032444, 35706513
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
Change-Id: I1ca55e2b7670678ed55798e2e06857d727ce2487
2 files changed