Loading core/java/android/os/Environment.java +10 −0 Original line number Diff line number Diff line Loading @@ -291,6 +291,16 @@ public class Environment { return buildPath(getDataDirectory(), "misc", "profiles", "cur", String.valueOf(userId)); } /** {@hide} */ public static File getDataVendorCeDirectory(int userId) { return buildPath(getDataDirectory(), "vendor_ce", String.valueOf(userId)); } /** {@hide} */ public static File getDataVendorDeDirectory(int userId) { return buildPath(getDataDirectory(), "vendor_de", String.valueOf(userId)); } /** {@hide} */ public static File getProfileSnapshotPath(String packageName, String codePath) { return buildPath(buildPath(getDataDirectory(), "misc", "profiles", "ref", packageName, Loading services/core/java/com/android/server/fingerprint/FingerprintService.java +14 −2 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.hardware.fingerprint.IFingerprintService; import android.hardware.fingerprint.IFingerprintServiceLockoutResetCallback; import android.hardware.fingerprint.IFingerprintServiceReceiver; import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.DeadObjectException; import android.os.Environment; Loading @@ -58,6 +59,7 @@ import android.os.RemoteException; import android.os.SELinux; import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.security.KeyStore; Loading Loading @@ -1419,8 +1421,17 @@ public class FingerprintService extends SystemService implements IHwBinder.Death try { userId = getUserOrWorkProfileId(clientPackage, userId); if (userId != mCurrentUserId) { final File systemDir = Environment.getUserSystemDirectory(userId); final File fpDir = new File(systemDir, FP_DATA_DIR); File baseDir; if (Build.VERSION.FIRST_SDK_INT <= Build.VERSION_CODES.O_MR1 && !SystemProperties.getBoolean( "ro.treble.supports_vendor_data", false)) { // TODO(b/72405644) remove the override when possible. baseDir = Environment.getUserSystemDirectory(userId); } else { baseDir = Environment.getDataVendorDeDirectory(userId); } File fpDir = new File(baseDir, FP_DATA_DIR); if (!fpDir.exists()) { if (!fpDir.mkdir()) { Slog.v(TAG, "Cannot make directory: " + fpDir.getAbsolutePath()); Loading @@ -1434,6 +1445,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death return; } } daemon.setActiveGroup(userId, fpDir.getAbsolutePath()); mCurrentUserId = userId; } Loading Loading
core/java/android/os/Environment.java +10 −0 Original line number Diff line number Diff line Loading @@ -291,6 +291,16 @@ public class Environment { return buildPath(getDataDirectory(), "misc", "profiles", "cur", String.valueOf(userId)); } /** {@hide} */ public static File getDataVendorCeDirectory(int userId) { return buildPath(getDataDirectory(), "vendor_ce", String.valueOf(userId)); } /** {@hide} */ public static File getDataVendorDeDirectory(int userId) { return buildPath(getDataDirectory(), "vendor_de", String.valueOf(userId)); } /** {@hide} */ public static File getProfileSnapshotPath(String packageName, String codePath) { return buildPath(buildPath(getDataDirectory(), "misc", "profiles", "ref", packageName, Loading
services/core/java/com/android/server/fingerprint/FingerprintService.java +14 −2 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.hardware.fingerprint.IFingerprintService; import android.hardware.fingerprint.IFingerprintServiceLockoutResetCallback; import android.hardware.fingerprint.IFingerprintServiceReceiver; import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.DeadObjectException; import android.os.Environment; Loading @@ -58,6 +59,7 @@ import android.os.RemoteException; import android.os.SELinux; import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.security.KeyStore; Loading Loading @@ -1419,8 +1421,17 @@ public class FingerprintService extends SystemService implements IHwBinder.Death try { userId = getUserOrWorkProfileId(clientPackage, userId); if (userId != mCurrentUserId) { final File systemDir = Environment.getUserSystemDirectory(userId); final File fpDir = new File(systemDir, FP_DATA_DIR); File baseDir; if (Build.VERSION.FIRST_SDK_INT <= Build.VERSION_CODES.O_MR1 && !SystemProperties.getBoolean( "ro.treble.supports_vendor_data", false)) { // TODO(b/72405644) remove the override when possible. baseDir = Environment.getUserSystemDirectory(userId); } else { baseDir = Environment.getDataVendorDeDirectory(userId); } File fpDir = new File(baseDir, FP_DATA_DIR); if (!fpDir.exists()) { if (!fpDir.mkdir()) { Slog.v(TAG, "Cannot make directory: " + fpDir.getAbsolutePath()); Loading @@ -1434,6 +1445,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death return; } } daemon.setActiveGroup(userId, fpDir.getAbsolutePath()); mCurrentUserId = userId; } Loading