From 6c753558c33e070bec71fef5e29f6062108f8078 Mon Sep 17 00:00:00 2001 From: Leland Miller Date: Tue, 22 Jan 2019 17:28:55 -0800 Subject: [PATCH] Add part ID reuse to API contract This make explicit that part IDs should not be reused to point to new parts as this may cause issues in applications that expect pars to remain consistent. Test: Documentation change, will follow up with a CTS test Change-Id: I990aa5848f59cc85c76d129701cba1ca27c78894 --- api/current.txt | 1 + telephony/java/android/provider/Telephony.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/api/current.txt b/api/current.txt index 35cedf3c3df43..092c15ec3e192 100755 --- a/api/current.txt +++ b/api/current.txt @@ -37360,6 +37360,7 @@ package android.provider { field public static final String CONTENT_ID = "cid"; field public static final String CONTENT_LOCATION = "cl"; field public static final String CONTENT_TYPE = "ct"; + field public static final android.net.Uri CONTENT_URI; field public static final String CT_START = "ctt_s"; field public static final String CT_TYPE = "ctt_t"; field public static final String FILENAME = "fn"; diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java index 51532bc8ca5ca..fb8f3e78ff842 100644 --- a/telephony/java/android/provider/Telephony.java +++ b/telephony/java/android/provider/Telephony.java @@ -2311,6 +2311,9 @@ public final class Telephony { /** * Contains message parts. + * + * To avoid issues where applications might cache a part ID, the ID of a deleted part must + * not be reused to point at a new part. */ public static final class Part implements BaseColumns { @@ -2321,6 +2324,12 @@ public final class Telephony { private Part() { } + /** + * The {@code content://} style URL for this table. Can be appended with a part ID to + * address individual parts. + */ + public static final Uri CONTENT_URI = Uri.withAppendedPath(Mms.CONTENT_URI, "part"); + /** * The identifier of the message which this part belongs to. *

Type: INTEGER