what is the android exception that best fits this scenario?
PackageManager pm = context.getPackageManager();
List<ResolveInfo> apps =
pm.queryIntentActivities(viewDocIntent, PackageManager.MATCH_DEFAULT_ONLY);
if (apps.size() &开发者_Python百科gt; 0)
context.startActivity(viewDocIntent);
else
throw new ... SOMETHING
Which exception would you think should be thrown if the resulting list is empty?
ActivityNotFoundException
.
精彩评论