From feab82cf82778d7db88c7b7f3560e0f54b360dae Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Tue, 22 Jan 2019 10:18:05 +0900 Subject: [PATCH] Schematize Crypto system properties Properties accessed across partitions are now schematized and will become APIs to make explicit interfaces among partitions. Bug: 117924132 Test: m -j Change-Id: I141ae3a011f9cb3ea283ca25175205b6af966ec6 Merged-In: I141ae3a011f9cb3ea283ca25175205b6af966ec6 --- core/java/com/android/internal/os/RoSystemProperties.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/com/android/internal/os/RoSystemProperties.java b/core/java/com/android/internal/os/RoSystemProperties.java index dc660a452c3be..209933adf91d6 100644 --- a/core/java/com/android/internal/os/RoSystemProperties.java +++ b/core/java/com/android/internal/os/RoSystemProperties.java @@ -17,6 +17,7 @@ package com.android.internal.os; import android.os.SystemProperties; +import android.sysprop.CryptoProperties; /** * This is a cache of various ro.* properties so that they can be read just once @@ -44,7 +45,7 @@ public class RoSystemProperties { // ------ ro.crypto.* -------- // public static final String CRYPTO_STATE = SystemProperties.get("ro.crypto.state"); - public static final String CRYPTO_TYPE = SystemProperties.get("ro.crypto.type"); + public static final String CRYPTO_TYPE = CryptoProperties.type().orElse("none"); // These are pseudo-properties public static final boolean CRYPTO_ENCRYPTABLE = !CRYPTO_STATE.isEmpty() && !"unsupported".equals(CRYPTO_STATE);