1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.launcher3.compat;
18 
19 import android.content.ComponentName;
20 import android.content.pm.ApplicationInfo;
21 import android.content.pm.LauncherActivityInfo;
22 import android.graphics.drawable.Drawable;
23 import android.os.UserHandle;
24 
25 public class LauncherActivityInfoCompatVL extends LauncherActivityInfoCompat {
26     private LauncherActivityInfo mLauncherActivityInfo;
27 
LauncherActivityInfoCompatVL(LauncherActivityInfo launcherActivityInfo)28     LauncherActivityInfoCompatVL(LauncherActivityInfo launcherActivityInfo) {
29         super();
30         mLauncherActivityInfo = launcherActivityInfo;
31     }
32 
getComponentName()33     public ComponentName getComponentName() {
34         return mLauncherActivityInfo.getComponentName();
35     }
36 
getUser()37     public UserHandleCompat getUser() {
38         return UserHandleCompat.fromUser(mLauncherActivityInfo.getUser());
39     }
40 
getLabel()41     public CharSequence getLabel() {
42         return mLauncherActivityInfo.getLabel();
43     }
44 
getIcon(int density)45     public Drawable getIcon(int density) {
46         return mLauncherActivityInfo.getIcon(density);
47     }
48 
getApplicationInfo()49     public ApplicationInfo getApplicationInfo() {
50         return mLauncherActivityInfo.getApplicationInfo();
51     }
52 
getFirstInstallTime()53     public long getFirstInstallTime() {
54         return mLauncherActivityInfo.getFirstInstallTime();
55     }
56 
getBadgedIcon(int density)57     public Drawable getBadgedIcon(int density) {
58         return mLauncherActivityInfo.getBadgedIcon(density);
59     }
60 }
61