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.content.ComponentName; 200b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyalimport android.content.Context; 21c2bd8101b8e26b9ebb2c079ae6867229dad3f196Kenny Guyimport android.content.pm.ApplicationInfo; 220b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyalimport android.content.pm.ResolveInfo; 23ed13187a745866483139e2878037e1f8427ce567Kenny Guyimport android.graphics.drawable.Drawable; 24ed13187a745866483139e2878037e1f8427ce567Kenny Guy 25ed13187a745866483139e2878037e1f8427ce567Kenny Guypublic abstract class LauncherActivityInfoCompat { 26ed13187a745866483139e2878037e1f8427ce567Kenny Guy 27ed13187a745866483139e2878037e1f8427ce567Kenny Guy LauncherActivityInfoCompat() { 28ed13187a745866483139e2878037e1f8427ce567Kenny Guy } 29ed13187a745866483139e2878037e1f8427ce567Kenny Guy 30ed13187a745866483139e2878037e1f8427ce567Kenny Guy public abstract ComponentName getComponentName(); 31ed13187a745866483139e2878037e1f8427ce567Kenny Guy public abstract UserHandleCompat getUser(); 32ed13187a745866483139e2878037e1f8427ce567Kenny Guy public abstract CharSequence getLabel(); 33ed13187a745866483139e2878037e1f8427ce567Kenny Guy public abstract Drawable getIcon(int density); 34c2bd8101b8e26b9ebb2c079ae6867229dad3f196Kenny Guy public abstract ApplicationInfo getApplicationInfo(); 35ed13187a745866483139e2878037e1f8427ce567Kenny Guy public abstract long getFirstInstallTime(); 36ed13187a745866483139e2878037e1f8427ce567Kenny Guy public abstract Drawable getBadgedIcon(int density); 370b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyal 380b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyal /** 390b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyal * Creates a LauncherActivityInfoCompat for the primary user. 400b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyal */ 410b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyal public static LauncherActivityInfoCompat fromResolveInfo(ResolveInfo info, Context context) { 420b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyal return new LauncherActivityInfoCompatV16(context, info); 430b037789662d1c16627dc5b509d1ac55bc76971bSunny Goyal } 44ed13187a745866483139e2878037e1f8427ce567Kenny Guy} 45