2014-04-30 03:02:21 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2014 The Android Open Source Project
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package com.android.launcher3.compat;
|
|
|
|
|
|
2015-05-14 00:07:08 -07:00
|
|
|
import android.annotation.TargetApi;
|
2014-04-30 03:02:21 +01:00
|
|
|
import android.content.ComponentName;
|
2014-06-30 12:30:31 +01:00
|
|
|
import android.content.pm.ApplicationInfo;
|
|
|
|
|
import android.content.pm.LauncherActivityInfo;
|
2014-04-30 03:02:21 +01:00
|
|
|
import android.graphics.drawable.Drawable;
|
2015-05-14 00:07:08 -07:00
|
|
|
import android.os.Build;
|
2014-04-30 03:02:21 +01:00
|
|
|
|
2015-05-14 00:07:08 -07:00
|
|
|
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
2014-04-30 03:02:21 +01:00
|
|
|
public class LauncherActivityInfoCompatVL extends LauncherActivityInfoCompat {
|
2014-06-30 12:30:31 +01:00
|
|
|
private LauncherActivityInfo mLauncherActivityInfo;
|
2014-04-30 03:02:21 +01:00
|
|
|
|
2014-06-30 12:30:31 +01:00
|
|
|
LauncherActivityInfoCompatVL(LauncherActivityInfo launcherActivityInfo) {
|
2014-04-30 03:02:21 +01:00
|
|
|
super();
|
|
|
|
|
mLauncherActivityInfo = launcherActivityInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ComponentName getComponentName() {
|
2014-06-30 12:30:31 +01:00
|
|
|
return mLauncherActivityInfo.getComponentName();
|
2014-04-30 03:02:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public UserHandleCompat getUser() {
|
2014-06-30 12:30:31 +01:00
|
|
|
return UserHandleCompat.fromUser(mLauncherActivityInfo.getUser());
|
2014-04-30 03:02:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CharSequence getLabel() {
|
2014-06-30 12:30:31 +01:00
|
|
|
return mLauncherActivityInfo.getLabel();
|
2014-04-30 03:02:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Drawable getIcon(int density) {
|
2014-06-30 12:30:31 +01:00
|
|
|
return mLauncherActivityInfo.getIcon(density);
|
2014-04-30 03:02:21 +01:00
|
|
|
}
|
|
|
|
|
|
2014-06-30 12:30:31 +01:00
|
|
|
public ApplicationInfo getApplicationInfo() {
|
|
|
|
|
return mLauncherActivityInfo.getApplicationInfo();
|
2014-04-30 03:02:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public long getFirstInstallTime() {
|
2014-06-30 12:30:31 +01:00
|
|
|
return mLauncherActivityInfo.getFirstInstallTime();
|
2014-04-30 03:02:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Drawable getBadgedIcon(int density) {
|
2014-06-30 12:30:31 +01:00
|
|
|
return mLauncherActivityInfo.getBadgedIcon(density);
|
2014-04-30 03:02:21 +01:00
|
|
|
}
|
|
|
|
|
}
|