private static boolean isIntendedException(Exception e,Class<?> clazz){
  final String message=e.getMessage();
  return (!TextUtils.isEmpty(message) && message.startsWith(clazz.getName()));
}

private static boolean isIntendedException ( Exception e , Class < ? > clazz ) { final String message = e . getMessage ( ) ; return ( ! TextUtils . isEmpty ( message ) && message . startsWith ( clazz . getName ( ) ) ) ; }
checks if the exception is one of the intended server side exception that has been thrown over the aidl layer .
