Add path cache to avoid SharedPreferences jank.

The old getSharedPreferences() API had a side-effect behavior that
subsequent calls wouldn't touch disk if there was a cache hit.  Now
that we're using File as the cache key, we were generating the path
every time, which resulted in touching disk.

To bring back the old behavior, let's add yet another cache!

Bug: 26979210
Change-Id: Ib8346c6f69ae25f8f164e3b7e05bc6358de38906
1 file changed