createAppIcon

Creates an application icon Drawable for the given AppInfo.

This function attempts to retrieve the icon in the following order:

  1. If activityName is not blank: a. Tries to get the activity icon using semGetActivityIconForIconTray. b. If (a) fails, tries to get the activity icon using getActivityIcon.

  2. If activityName is blank: a. Tries to get the application icon using semGetApplicationIconForIconTray. b. If (a) fails, tries to get the application icon using getApplicationIcon.

  3. 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.