UserManagerCompatV16.java revision ed13187a745866483139e2878037e1f8427ce567
1ed13187a745866483139e2878037e1f8427ce567Kenny Guy/* 2ed13187a745866483139e2878037e1f8427ce567Kenny Guy * Copyright (C) 2014 The Android Open Source Project 3ed13187a745866483139e2878037e1f8427ce567Kenny Guy * 4ed13187a745866483139e2878037e1f8427ce567Kenny Guy * Licensed under the Apache License, Version 2.0 (the "License"); 5ed13187a745866483139e2878037e1f8427ce567Kenny Guy * you may not use this file except in compliance with the License. 6ed13187a745866483139e2878037e1f8427ce567Kenny Guy * You may obtain a copy of the License at 7ed13187a745866483139e2878037e1f8427ce567Kenny Guy * 8ed13187a745866483139e2878037e1f8427ce567Kenny Guy * http://www.apache.org/licenses/LICENSE-2.0 9ed13187a745866483139e2878037e1f8427ce567Kenny Guy * 10ed13187a745866483139e2878037e1f8427ce567Kenny Guy * Unless required by applicable law or agreed to in writing, software 11ed13187a745866483139e2878037e1f8427ce567Kenny Guy * distributed under the License is distributed on an "AS IS" BASIS, 12ed13187a745866483139e2878037e1f8427ce567Kenny Guy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ed13187a745866483139e2878037e1f8427ce567Kenny Guy * See the License for the specific language governing permissions and 14ed13187a745866483139e2878037e1f8427ce567Kenny Guy * limitations under the License. 15ed13187a745866483139e2878037e1f8427ce567Kenny Guy */ 16ed13187a745866483139e2878037e1f8427ce567Kenny Guy 17ed13187a745866483139e2878037e1f8427ce567Kenny Guypackage com.android.launcher3.compat; 18ed13187a745866483139e2878037e1f8427ce567Kenny Guy 19ed13187a745866483139e2878037e1f8427ce567Kenny Guyimport android.graphics.drawable.Drawable; 20ed13187a745866483139e2878037e1f8427ce567Kenny Guy 21ed13187a745866483139e2878037e1f8427ce567Kenny Guyimport java.util.ArrayList; 22ed13187a745866483139e2878037e1f8427ce567Kenny Guyimport java.util.List; 23ed13187a745866483139e2878037e1f8427ce567Kenny Guy 24ed13187a745866483139e2878037e1f8427ce567Kenny Guypublic class UserManagerCompatV16 extends UserManagerCompat { 25ed13187a745866483139e2878037e1f8427ce567Kenny Guy 26ed13187a745866483139e2878037e1f8427ce567Kenny Guy UserManagerCompatV16() { 27ed13187a745866483139e2878037e1f8427ce567Kenny Guy } 28ed13187a745866483139e2878037e1f8427ce567Kenny Guy 29ed13187a745866483139e2878037e1f8427ce567Kenny Guy public List<UserHandleCompat> getUserProfiles() { 30ed13187a745866483139e2878037e1f8427ce567Kenny Guy List<UserHandleCompat> profiles = new ArrayList<UserHandleCompat>(1); 31ed13187a745866483139e2878037e1f8427ce567Kenny Guy profiles.add(UserHandleCompat.myUserHandle()); 32ed13187a745866483139e2878037e1f8427ce567Kenny Guy return profiles; 33ed13187a745866483139e2878037e1f8427ce567Kenny Guy } 34ed13187a745866483139e2878037e1f8427ce567Kenny Guy 35ed13187a745866483139e2878037e1f8427ce567Kenny Guy public UserHandleCompat getUserForSerialNumber(long serialNumber) { 36ed13187a745866483139e2878037e1f8427ce567Kenny Guy return UserHandleCompat.myUserHandle(); 37ed13187a745866483139e2878037e1f8427ce567Kenny Guy } 38ed13187a745866483139e2878037e1f8427ce567Kenny Guy 39ed13187a745866483139e2878037e1f8427ce567Kenny Guy public Drawable getBadgedDrawableForUser(Drawable unbadged, 40ed13187a745866483139e2878037e1f8427ce567Kenny Guy UserHandleCompat user) { 41ed13187a745866483139e2878037e1f8427ce567Kenny Guy return unbadged; 42ed13187a745866483139e2878037e1f8427ce567Kenny Guy } 43ed13187a745866483139e2878037e1f8427ce567Kenny Guy 44ed13187a745866483139e2878037e1f8427ce567Kenny Guy public long getSerialNumberForUser(UserHandleCompat user) { 45ed13187a745866483139e2878037e1f8427ce567Kenny Guy return 0; 46ed13187a745866483139e2878037e1f8427ce567Kenny Guy } 47ed13187a745866483139e2878037e1f8427ce567Kenny Guy} 48