3 * Copyright (C) 2014 The Android Open Source Project
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 package com.android.launcher3.compat;
20 import android.content.Context;
21 import android.graphics.drawable.Drawable;
22 import android.os.UserHandle;
23 import android.os.UserManager;
25 import java.util.ArrayList;
26 import java.util.Collections;
27 import java.util.List;
29 public class UserManagerCompatVL extends UserManagerCompatV17 {
31 UserManagerCompatVL(Context context) {
36 public List<UserHandleCompat> getUserProfiles() {
37 List<UserHandle> users = mUserManager.getUserProfiles();
39 return Collections.EMPTY_LIST;
41 ArrayList<UserHandleCompat> compatUsers = new ArrayList<UserHandleCompat>(
43 for (UserHandle user : users) {
44 compatUsers.add(UserHandleCompat.fromUser(user));
50 public Drawable getBadgedDrawableForUser(Drawable unbadged, UserHandleCompat user) {
52 // STOPSHIP(mokani): Clean this up.
53 return mUserManager.getBadgedIconForUser(unbadged, user.getUser());
54 } catch (Throwable t) {
60 public CharSequence getBadgedLabelForUser(CharSequence label, UserHandleCompat user) {
64 return mUserManager.getBadgedLabelForUser(label, user.getUser());