diff options
| author | Janis Danisevskis <jdanis@google.com> | 2020-11-16 19:28:11 -0800 |
|---|---|---|
| committer | Janis Danisevskis <jdanis@google.com> | 2020-11-16 19:28:35 -0800 |
| commit | 148e99707ee5a230485cc1297df6d940d1a4d1db (patch) | |
| tree | ca32219aa9d40b1c72cf7366fefd678a2f68b8fa /core/java | |
| parent | 92c2f231ed81346d13e96be8f98b2b49a3810ced (diff) | |
| parent | 07bfeb3630fe70bb2b58a825edc3c7db3cab4bd2 (diff) | |
resolve merge conflicts of 07bfeb3630fe70bb2b58a825edc3c7db3cab4bd2 to master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: Iab84b0fa8c708845aecd13dd45c242147829fd8b
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/com/android/internal/os/ZygoteInit.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index c762939faac2..1fcc6b0a6d55 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -73,6 +73,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.security.Provider; import java.security.Security; +import java.util.Optional; /** * Startup class for the zygote process. @@ -225,7 +226,17 @@ public class ZygoteInit { // AndroidKeyStoreProvider.install() manipulates the list of JCA providers to insert // preferred providers. Note this is not done via security.properties as the JCA providers // are not on the classpath in the case of, for example, raw dalvikvm runtimes. - AndroidKeyStoreProvider.install(); + // TODO b/171305684 This code is used to conditionally enable the installation of the + // Keystore 2.0 provider to enable teams adjusting to Keystore 2.0 at their own + // pace. This code will be removed when all calling code was adjusted to + // Keystore 2.0. + Optional<Boolean> keystore2_enabled = + android.sysprop.Keystore2Properties.keystore2_enabled(); + if (keystore2_enabled.isPresent() && keystore2_enabled.get()) { + android.security.keystore2.AndroidKeyStoreProvider.install(); + } else { + AndroidKeyStoreProvider.install(); + } Log.i(TAG, "Installed AndroidKeyStoreProvider in " + (SystemClock.uptimeMillis() - startTime) + "ms."); Trace.traceEnd(Trace.TRACE_TAG_DALVIK); |
