Fix storing VkPipelineCache in HWUI's shader cache breaking persistence

See b/268205519 for the full analysis and description, but the summary
is mSavePending could previously get stuck in the true state, preventing
the shader cache from being written to disk for the rest of an app's
lifecycle.

This stuck state seems to occur on every app launch after the first,
unless any shaders are compiled in the first 4 seconds. This occurs
frequently, as the shaders initially required by an app in its first 4
seconds were likely compiled on its first launch and already available
in its persistent cache, thus not necessitating new compilation in that
initial window and triggering the failure case.

This seems to have serious jank implications, particularly for SysUI.

Note: time is now represented in milliseconds to make testing easier.

Fixes: 268205519

Bug: 268205519
Bug: 225211273

Test: `atest hwui_unit_tests:ShaderCacheTest` (before and after fix)

Change-Id: I102d75df4c61f9b3012dd5d956dc37435d5b5a84
diff --git a/libs/hwui/pipeline/skia/ShaderCache.h b/libs/hwui/pipeline/skia/ShaderCache.h
index bc35fa5f..f5506d6 100644
--- a/libs/hwui/pipeline/skia/ShaderCache.h
+++ b/libs/hwui/pipeline/skia/ShaderCache.h
@@ -156,7 +156,8 @@
      * pending.  Each time a key/value pair is inserted into the cache via
      * load, a deferred save is initiated if one is not already pending.
      * This will wait some amount of time and then trigger a save of the cache
-     * contents to disk.
+     * contents to disk, unless mDeferredSaveDelayMs is 0 in which case saving
+     * is disabled.
      */
     bool mSavePending = false;
 
@@ -166,9 +167,11 @@
     size_t mObservedBlobValueSize = 20 * 1024;
 
     /**
-     *  The time in seconds to wait before saving newly inserted cache entries.
+     *  The time in milliseconds to wait before saving newly inserted cache entries.
+     *
+     *  WARNING: setting this to 0 will disable writing the cache to disk.
      */
-    unsigned int mDeferredSaveDelay = 4;
+    unsigned int mDeferredSaveDelayMs = 4 * 1000;
 
     /**
      * "mMutex" is the mutex used to prevent concurrent access to the member