Skip to content

Commit

Permalink
Navring: fix NPE if app uninstalled and in Navring
Browse files Browse the repository at this point in the history
remove generic exception not needed.

Change-Id: Iec7f79f9d7c236d2afe3788dc35f890b2e3c4f84
  • Loading branch information
Stevespear426 authored and iGio90 committed Mar 9, 2013
1 parent e50a41c commit 4ced26a
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -102,6 +102,12 @@ public static TargetDrawable getTargetDrawable(Context context, String action) {
PackageManager pm = context.getPackageManager();
ActivityInfo info = intent.resolveActivityInfo(pm, PackageManager.GET_ACTIVITIES);

if (info == null) {
TargetDrawable drawable = new TargetDrawable(res, com.android.internal.R.drawable.ic_action_empty);
drawable.setEnabled(false);
return drawable;
}

Drawable activityIcon = info.loadIcon(pm);
Drawable iconBg = res.getDrawable(
com.android.internal.R.drawable.ic_navbar_blank);
Expand Down

0 comments on commit 4ced26a

Please sign in to comment.