Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 74e5d2af authored by Yang Yu's avatar Yang Yu
Browse files

Cache storage info into file.

System is able to query the storage info from AppSearch through
AppSearchStorageStatsAugmenter. Currently, AppSearchImpl is required to
be initialized for querying the storage info. So if system need to query
the storage info before AppSearch is connected/initialized, it would
introduce multiple AppSearchImpl instance initializations for user,
which may block the Setting-Storage UI thread.

In this CL, we cache the user's storage info into a file under their
credential encrypted system directory while initializing
AppSearchUserInstance for the user.
Next time, if system need to query the user's storage info before
AppSearch is intialized, it would try to read the cached info from the
file on disk.

Bug: 179160886
Test: UserStorageInfoTest
Change-Id: I1f760879858a4d667b734018f63e108084c54e1a
parent 2faed608
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment