Preload sfplugin_ccodec for performance

preload libsfplugin_ccodec to avoid latency during camera startup (and
other media consuming apps).

Bug: 133186424
Test: boot, debug logging of times
Change-Id: Ifa283d13f4564ff323b98e7cf815a477f1c7d169
This commit is contained in:
Ray Essick
2019-06-04 13:34:35 -07:00
parent 730b22c229
commit 30da74bda4

View File

@@ -189,6 +189,13 @@ public class ZygoteInit {
System.loadLibrary("android");
System.loadLibrary("compiler_rt");
System.loadLibrary("jnigraphics");
// tolerate missing sfplugin_ccodec which is only present on Codec 2 devices
try {
System.loadLibrary("sfplugin_ccodec");
} catch (Error | RuntimeException e) {
Log.w(TAG, "Problem preloading sfplugin_ccodec: " + e);
}
}
native private static void nativePreloadAppProcessHALs();