Clean up AttachmentTable schema.

This commit is contained in:
Greyson Parrelli
2024-01-09 09:21:23 -05:00
committed by Alex Hart
parent 62b142cdeb
commit fe39b5e4e2
40 changed files with 486 additions and 502 deletions

View File

@@ -54,7 +54,7 @@ public class PartAuthority {
static {
uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
uriMatcher.addURI(AUTHORITY, "part/*/#", PART_ROW);
uriMatcher.addURI(AUTHORITY, "part/#", PART_ROW);
uriMatcher.addURI(AUTHORITY, "sticker/#", STICKER_ROW);
uriMatcher.addURI(AUTHORITY, "wallpaper/*", WALLPAPER_ROW);
uriMatcher.addURI(AUTHORITY, "emoji/*", EMOJI_ROW);
@@ -174,8 +174,7 @@ public class PartAuthority {
}
public static Uri getAttachmentDataUri(AttachmentId attachmentId) {
Uri uri = Uri.withAppendedPath(PART_CONTENT_URI, String.valueOf(attachmentId.getUniqueId()));
return ContentUris.withAppendedId(uri, attachmentId.getRowId());
return ContentUris.withAppendedId(PART_CONTENT_URI, attachmentId.id);
}
public static Uri getAttachmentThumbnailUri(AttachmentId attachmentId) {

View File

@@ -14,7 +14,7 @@ public class PartUriParser {
}
public AttachmentId getPartId() {
return new AttachmentId(getId(), getUniqueId());
return new AttachmentId(getId());
}
private long getId() {