diff options
author | 2015-10-23 13:25:19 +0100 | |
---|---|---|
committer | 2015-10-23 16:18:18 +0100 | |
commit | f05b9d0830ab7fd1ba4da8801194353889919ffc (patch) | |
tree | 0a41df8210895498a7da4811a02f36e393ddca6e | |
parent | 5ba31aa77d4319c3a473d626c5bd48be5c3a0dd2 (diff) |
Return actual userId when File Based Encryption is present
The existing UserManagerService#getCredentialOwnerProfile always
returned the parent profile for the given userId. With File
Based Encryption, we want to enable per-user credentials.
This is part of the Separate Work Challenge feature.
Change-Id: If5b32d22a5da63103b773acbe4a6d1396d34412b
-rw-r--r-- | services/core/java/com/android/server/pm/UserManagerService.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index b36a22e4461f..bf960a72cc68 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -44,6 +44,7 @@ import android.os.Parcelable; import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.StorageManager; @@ -139,11 +140,6 @@ public class UserManagerService extends IUserManager.Stub { // without first making sure that the rest of the framework is prepared for it. private static final int MAX_MANAGED_PROFILES = 1; - /** - * Flag indicating whether device credentials are shared among same-user profiles. - */ - private static final boolean CONFIG_PROFILES_SHARE_CREDENTIAL = true; - static final int WRITE_USER_MSG = 1; static final int WRITE_USER_DELAY = 2*1000; // 2 seconds @@ -343,7 +339,7 @@ public class UserManagerService extends IUserManager.Stub { @Override public int getCredentialOwnerProfile(int userHandle) { checkManageUsersPermission("get the credential owner"); - if (CONFIG_PROFILES_SHARE_CREDENTIAL) { + if (!"file".equals(SystemProperties.get("ro.crypto.type", "none"))) { synchronized (mPackagesLock) { UserInfo profileParent = getProfileParentLocked(userHandle); if (profileParent != null) { |