Use the migrated injected setting code in settingslib.

Manual merge to master from pi-car-dev
Bug: 68198078
Test: Tested on device
Change-Id: Iff767cd6bf7408b45ce9594628d3fd0a71744e9f
This commit is contained in:
Aarthi Balachander
2018-07-10 17:04:53 -07:00
parent cc65fbba9d
commit d0f835981c
4 changed files with 29 additions and 750 deletions

View File

@@ -389,9 +389,7 @@ public final class Utils extends com.android.settingslib.Utils {
*/
public static UserHandle getManagedProfile(UserManager userManager) {
List<UserHandle> userProfiles = userManager.getUserProfiles();
final int count = userProfiles.size();
for (int i = 0; i < count; i++) {
final UserHandle profile = userProfiles.get(i);
for (UserHandle profile : userProfiles) {
if (profile.getIdentifier() == userManager.getUserHandle()) {
continue;
}