diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-10-08 05:43:29 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-10-08 05:43:29 +0000 |
| commit | 26e228da83424cef58dbd98441667fc85bd499ef (patch) | |
| tree | 3420819c60095b5eabf21cce40882910804ed7fc /core/java | |
| parent | 0e4965517e5ee5ddbb0bea2da102b6fa634b40a5 (diff) | |
| parent | 84181f7db7e5f57bd750c19595b4b972a0409f43 (diff) | |
Merge "Should not switch to a user with removal in progress"
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/content/pm/UserInfo.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java index 08b23b04f2ae..d81dff8f2908 100644 --- a/core/java/android/content/pm/UserInfo.java +++ b/core/java/android/content/pm/UserInfo.java @@ -366,8 +366,9 @@ public class UserInfo implements Parcelable { * @return true if this user can be switched to. **/ public boolean supportsSwitchTo() { - if (isEphemeral() && !isEnabled()) { - // Don't support switching to an ephemeral user with removal in progress. + if (partial || !isEnabled()) { + // Don't support switching to disabled or partial users, which includes users with + // removal in progress. return false; } if (preCreated) { |
