• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.annotation.TargetApi;
20 import android.content.ComponentName;
21 import android.content.pm.ApplicationInfo;
22 import android.content.pm.LauncherActivityInfo;
23 import android.graphics.drawable.Drawable;
24 import android.os.Build;
25 
26 @TargetApi(Build.VERSION_CODES.LOLLIPOP)
27 public class LauncherActivityInfoCompatVL extends LauncherActivityInfoCompat {
28     private LauncherActivityInfo mLauncherActivityInfo;
29 
LauncherActivityInfoCompatVL(LauncherActivityInfo launcherActivityInfo)30     LauncherActivityInfoCompatVL(LauncherActivityInfo launcherActivityInfo) {
31         super();
32         mLauncherActivityInfo = launcherActivityInfo;
33     }
34 
getComponentName()35     public ComponentName getComponentName() {
36         return mLauncherActivityInfo.getComponentName();
37     }
38 
getUser()39     public UserHandleCompat getUser() {
40         return UserHandleCompat.fromUser(mLauncherActivityInfo.getUser());
41     }
42 
getLabel()43     public CharSequence getLabel() {
44         return mLauncherActivityInfo.getLabel();
45     }
46 
getIcon(int density)47     public Drawable getIcon(int density) {
48         return mLauncherActivityInfo.getIcon(density);
49     }
50 
getApplicationInfo()51     public ApplicationInfo getApplicationInfo() {
52         return mLauncherActivityInfo.getApplicationInfo();
53     }
54 
getFirstInstallTime()55     public long getFirstInstallTime() {
56         return mLauncherActivityInfo.getFirstInstallTime();
57     }
58 
getBadgedIcon(int density)59     public Drawable getBadgedIcon(int density) {
60         return mLauncherActivityInfo.getBadgedIcon(density);
61     }
62 }
63