private static boolean packageMatches(ResolveInfo app,ProcessError err){
  final String appPkg=app.activityInfo.packageName;
  final String errPkg=err.info.processName;
  Log.d(TAG,String.format("packageMatches(%s, %s)",appPkg,errPkg));
  return appPkg.equals(errPkg);
}

private static boolean packageMatches ( ResolveInfo app , ProcessError err ) { final String appPkg = app . activityInfo . packageName ; final String errPkg = err . info . processName ; Log . d ( TAG , String . format ( "packageMatches(%s, %s)" , appPkg , errPkg ) ) ; return appPkg . equals ( errPkg ) ; }
a helper function that checks whether the specified error could have been caused by the specified app .
