diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-12-15 17:40:07 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-01-03 15:58:53 -0800 |
commit | 3fe4a146cf774261ab3552dd8ab392439c771e54 (patch) | |
tree | 5df73ef8f1166bfa827f46bb40a99974e8246cca /src/com/android/launcher3/AppInfo.java | |
parent | bf8a265deb093e147a5289e0958cc9b1bc50a6e3 (diff) | |
download | android_packages_apps_Trebuchet-3fe4a146cf774261ab3552dd8ab392439c771e54.tar.gz android_packages_apps_Trebuchet-3fe4a146cf774261ab3552dd8ab392439c771e54.tar.bz2 android_packages_apps_Trebuchet-3fe4a146cf774261ab3552dd8ab392439c771e54.zip |
Simplifying IconCache access code
Providing a way to access icon cache without LauncherAcitivtiyInfo.
This allows fetching LauncherActivityInfo only when required, thus
avoiding system RPC when the icon is already in cache.
Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
Diffstat (limited to 'src/com/android/launcher3/AppInfo.java')
-rw-r--r-- | src/com/android/launcher3/AppInfo.java | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/com/android/launcher3/AppInfo.java b/src/com/android/launcher3/AppInfo.java index f7c51847e..9c9dcc5f9 100644 --- a/src/com/android/launcher3/AppInfo.java +++ b/src/com/android/launcher3/AppInfo.java @@ -19,7 +19,6 @@ package com.android.launcher3; import android.content.ComponentName; import android.content.Context; import android.content.Intent; -import android.graphics.Bitmap; import android.os.UserHandle; import android.util.Log; @@ -33,23 +32,13 @@ import java.util.ArrayList; /** * Represents an app in AllAppsView. */ -public class AppInfo extends ItemInfo { +public class AppInfo extends ItemInfoWithIcon { /** * The intent used to start the application. */ public Intent intent; - /** - * A bitmap version of the application icon. - */ - public Bitmap iconBitmap; - - /** - * Indicates whether we're using a low res icon - */ - boolean usingLowResIcon; - public ComponentName componentName; /** @@ -66,10 +55,6 @@ public class AppInfo extends ItemInfo { return intent; } - protected Intent getRestoredIntent() { - return null; - } - /** * Must not hold the Context. */ @@ -96,8 +81,8 @@ public class AppInfo extends ItemInfo { isDisabled |= ShortcutInfo.FLAG_DISABLED_QUIET_USER; } - iconCache.getTitleAndIcon(this, info, useLowResIcon); intent = makeLaunchIntent(context, info, user); + iconCache.getTitleAndIcon(this, info, useLowResIcon); } public AppInfo(AppInfo info) { |