summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eric Biggers <ebiggers@google.com> 2025-01-06 11:01:31 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-01-06 11:01:31 -0800
commitf6cf8309296e0a5e78680978619e124345e493a0 (patch)
tree8029f4163aba983a2918b5038d709ba1e537a074
parent14e8573aaaf5d1a6f2d4bb014c2289104976e2c3 (diff)
parent44e68ab3724e35ef8e59acf7371de104b63f48e6 (diff)
Merge "Make fixRaceConditionInTieProfileLock unconditional" into main am: 81036dbfaa am: 44e68ab372
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3436659 Change-Id: I1c63e788fdcd5a2c774371a5a67e16ccfda0cde8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--core/java/android/app/admin/flags/flags.aconfig10
-rw-r--r--services/core/java/com/android/server/locksettings/LockSettingsService.java17
2 files changed, 4 insertions, 23 deletions
diff --git a/core/java/android/app/admin/flags/flags.aconfig b/core/java/android/app/admin/flags/flags.aconfig
index af035cb630dc..75589fa47892 100644
--- a/core/java/android/app/admin/flags/flags.aconfig
+++ b/core/java/android/app/admin/flags/flags.aconfig
@@ -160,16 +160,6 @@ flag {
}
flag {
- name: "fix_race_condition_in_tie_profile_lock"
- namespace: "enterprise"
- description: "Fix race condition in tieProfileLockIfNecessary()"
- bug: "355905501"
- metadata {
- purpose: PURPOSE_BUGFIX
- }
-}
-
-flag {
name: "quiet_mode_credential_bug_fix"
namespace: "enterprise"
description: "Guards a bugfix that ends the credential input flow if the managed user has not stopped."
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java
index 3f915757f137..286238e7888c 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsService.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java
@@ -451,6 +451,7 @@ public class LockSettingsService extends ILockSettings.Stub {
* @param profileUserId profile user Id
* @param profileUserPassword profile original password (when it has separated lock).
*/
+ @GuardedBy("mSpManager")
private void tieProfileLockIfNecessary(int profileUserId,
LockscreenCredential profileUserPassword) {
// Only for profiles that shares credential with parent
@@ -909,14 +910,8 @@ public class LockSettingsService extends ILockSettings.Stub {
// Hide notification first, as tie profile lock takes time
hideEncryptionNotification(new UserHandle(userId));
- if (android.app.admin.flags.Flags.fixRaceConditionInTieProfileLock()) {
- synchronized (mSpManager) {
- tieProfileLockIfNecessary(userId, LockscreenCredential.createNone());
- }
- } else {
- if (isCredentialSharableWithParent(userId)) {
- tieProfileLockIfNecessary(userId, LockscreenCredential.createNone());
- }
+ synchronized (mSpManager) {
+ tieProfileLockIfNecessary(userId, LockscreenCredential.createNone());
}
}
});
@@ -1380,11 +1375,7 @@ public class LockSettingsService extends ILockSettings.Stub {
mStorage.removeChildProfileLock(userId);
removeKeystoreProfileKey(userId);
} else {
- if (android.app.admin.flags.Flags.fixRaceConditionInTieProfileLock()) {
- synchronized (mSpManager) {
- tieProfileLockIfNecessary(userId, profileUserPassword);
- }
- } else {
+ synchronized (mSpManager) {
tieProfileLockIfNecessary(userId, profileUserPassword);
}
}