Code example for PackageManager.NameNotFoundException

Methods: e, getMessage

0
		if (intent != null) {
 
			try { 
				icon = pm.getActivityIcon(intent);
			} catch (NameNotFoundException e1) {
				Log.i("ContentListRowIcon", e1.getMessage());
				setUnknownName(); 
			} 
 
			if (icon == null) {
				List<ResolveInfo> providerInfo = null;
				try { 
					providerInfo = pm.queryIntentActivities(intent, 0);
				} catch (SecurityException e2) {
					Log.i("ContentListRowIcon", e2.getMessage());
					setSecurity(); 
				} 
 
				if (providerInfo != null && providerInfo.size() > 0) {
					try { 
						icon = pm
								.getApplicationIcon(providerInfo.get(0).activityInfo.applicationInfo.packageName);
					} catch (NameNotFoundException e) {
						Log.e("ContentListRowIcon", "bindCursor", e);
						setUnknownName(); 
					} 
				} 
			} 
		}