commit | e686f52daef58650d0fd1d53966252e3ed77f0c2 | [log] [tgz] |
---|---|---|
author | Chris Antol <cantol@google.com> | Fri Jan 19 22:52:28 2024 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jan 19 22:52:28 2024 +0000 |
tree | 66c214790e0e3d7ad47b489289f75929f9bad7cb | |
parent | fd7250817708d3cec020c333e14e7f51c7ba5976 [diff] | |
parent | 8595d95122f2c6b744734e18083cb47e33e5c2f8 [diff] |
Merge "Hide accounts of users that should not be shown" into main am: 8595d95122 Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2898064 Change-Id: I3e0fe00eca5c30127a38a1e7cd36c22ec7666de6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/src/com/android/settings/accounts/AccountPreferenceController.java b/src/com/android/settings/accounts/AccountPreferenceController.java index cdaba20..dd8c69a 100644 --- a/src/com/android/settings/accounts/AccountPreferenceController.java +++ b/src/com/android/settings/accounts/AccountPreferenceController.java
@@ -42,6 +42,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.UserInfo; +import android.content.pm.UserProperties; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Bundle; @@ -336,6 +337,10 @@ } return; } + if (mUm.getUserProperties(userInfo.getUserHandle()).getShowInSettings() + == UserProperties.SHOW_IN_SETTINGS_NO) { + return; + } final Context context = mContext; final ProfileData profileData = new ProfileData(); profileData.userInfo = userInfo;