public int getMessageCount ( ) throws VehicleServiceException { if ( mRemoteService != null ) { try { return mRemoteService . getMessageCount ( ) ; } catch ( RemoteException e ) { throw new VehicleServiceException ( "Unable to retrieve message count" , e ) ; } } else { throw new VehicleServiceException ( "Unable to retrieve message count" ) ; } }
Read the number of messages received by the vehicle service .