createAppIcon
Creates an application icon Drawable for the given AppInfo.
This function attempts to retrieve the icon in the following order:
If
activityName
is not blank: a. Tries to get the activity icon usingsemGetActivityIconForIconTray
. b. If (a) fails, tries to get the activity icon usinggetActivityIcon
.If
activityName
is blank: a. Tries to get the application icon usingsemGetApplicationIconForIconTray
. b. If (a) fails, tries to get the application icon usinggetApplicationIcon
.If all above attempts fail, returns an empty icon using
getEmptyIcon
.
Finally, the retrieved icon is resized using resizeDrawable
.
Return
The created application icon as a Drawable.
Parameters
appInfo
The AppInfo for which to create the icon.