Ensure the getCredentialType cache gets enabled

Invalidate the getCredentialType cache at boot time.  This works around
an issue in PropertyInvalidatedCache where caches don't work until they
are invalidated for the first time.  This workaround can be removed if
the underlying issue in PropertyInvalidatedCache is fixed, but that will
require a bit more discussion and will be riskier than this workaround.

This fixes a performance regression introduced by ag/19284361 ("Simplify
invalidation of lockscreen credential type cache").  That CL eliminated
unnecessary cache invalidations, which should have improved performance.
Unfortunately, due to the unexpected PropertyInvalidatedCache behavior,
it actually made the cache stop working entirely in the common case
where no user's lockscreen credential has changed since boot.

Bug: 268192609
Test: Set DEBUG=true in PropertyInvalidatedCache.java.  Build and flash.
      Run 'adb logcat | grep getCredentialType', and turn screen off and
      on.  Verified that "cache hit" messages are logged, whereas before
      this CL "cache getCredentialType unset" messages were logged.
Change-Id: Ie826bdb163288e5741a33e26209d3175de426bd1
(cherry picked from commit d91457a155c99bb4506e8c70c0129b634f3e1247)
Merged-In: Ie826bdb163288e5741a33e26209d3175de426bd1
2 files changed