Recentapps Icon Exception Analysis

Source: Internet
Author: User

    • Problem description
      Open the Gallery, click the "Send" button, select Upload to Suning, share and click the "recently applied" button to find the Cloud disk icon exception.

    • Problem analysis
      Module Systemui
      SOURCE Location: frameworks/base/packages/systemui/src/com/android/systemui/recent/

    • Icon load process (Recenttaskloader.java)

    • Get the icon from the task information

FinalResolveInfo ResolveInfo = pm.resolveactivity (Recentinfo.baseintent,0);PrivateDrawableGetfullresicon(ResolveInfo info, Packagemanager Packagemanager) {Resources resources;Try{resources = packagemanager.getresourcesforapplication (Info.activityInfo.applicationInfo); }Catch(Packagemanager.namenotfoundexception e) {resources =NULL; }if(Resources! =NULL) {inticonID = Info.activityInfo.getIconResource ();if(iconID! =0) {returnGetfullresicon (resources, iconID); }        }returnGetfullresdefaultactivityicon (); }
    • Activityinfo
publicfinalintgetIconResource() {        return0 ? icon : applicationInfo.icon;    }

If the activity has icon returned to activity, the application icon is returned.

    • Get icons from system resources
  Drawable getFullResDefaultActivityIcon() {        return getFullResIcon(Resources.getSystem(),                com.android.internal.R.mipmap.sym_def_app_icon);    }

Android. R.mipmap
Constant
int Sym_def_app_icon
Default icon for applications, that's don ' t specify an icon.
(The little robot is here!) )

    • Conclusion
      Recent Apps App icon display priority is:

    • Extended Reading
      Android Source Learning six--activitymanager framework Analysis
      Android Activitymanagerservice Source Analysis--activity Management (i)

Recentapps Icon Exception Analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.