Exemple #1
0
  private PduPart getPart(Cursor cursor) {
    PduPart part = new PduPart();

    getPartValues(part, cursor);

    part.setDataUri(PartAuthority.getPartUri(part.getPartId()));

    return part;
  }
Exemple #2
0
 private Pair<File, Long> writePartData(MasterSecret masterSecret, PduPart part)
     throws MmsException {
   try {
     if (part.getData() != null) {
       Log.w(TAG, "Writing part data from buffer");
       return writePartData(masterSecret, part, new ByteArrayInputStream(part.getData()));
     } else if (part.getDataUri() != null) {
       Log.w(TAG, "Writing part data from URI");
       InputStream in = PartAuthority.getPartStream(context, masterSecret, part.getDataUri());
       return writePartData(masterSecret, part, in);
     } else {
       throw new MmsException("Part is empty!");
     }
   } catch (IOException e) {
     throw new MmsException(e);
   }
 }
Exemple #3
0
 public Uri getUri() {
   return PartAuthority.getPartUri(partId);
 }