Created new BlobProvider.

One unified place to create blobs for different lifespans.
This commit is contained in:
Greyson Parrelli
2019-02-25 17:47:30 -08:00
parent 22ed8caed3
commit a122bb4899
19 changed files with 526 additions and 274 deletions

View File

@@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.contactshare.Contact.PostalAddress;
import org.thoughtcrime.securesms.database.Address;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.mms.PartAuthority;
import org.thoughtcrime.securesms.providers.PersistentBlobProvider;
import org.thoughtcrime.securesms.providers.BlobProvider;
import org.thoughtcrime.securesms.recipients.Recipient;
import java.io.IOException;
@@ -153,8 +153,8 @@ public class ContactRepository {
Log.w(TAG, "Failed to parse the vcard.", e);
}
if (PersistentBlobProvider.AUTHORITY.equals(uri.getAuthority())) {
PersistentBlobProvider.getInstance(context).delete(context, uri);
if (BlobProvider.AUTHORITY.equals(uri.getAuthority())) {
BlobProvider.getInstance().delete(context, uri);
}
return contact;