From c35c02f1eaeeab23081b94866a1903e3175fc461 Mon Sep 17 00:00:00 2001 From: Vladislav Kaznacheev Date: Thu, 20 Apr 2017 08:38:21 -0700 Subject: Change ClipData.addItem signature Make ContentResolver the first parameter. Bug: 37419379 Test: android.content.cts.ClipboardManagerTest Change-Id: I3f7772e8ddc93eec0e930b62c722a145f9e6f0fa --- core/java/android/content/ClipData.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'core/java/android/content/ClipData.java') diff --git a/core/java/android/content/ClipData.java b/core/java/android/content/ClipData.java index 6703bd426282..5bc1f183196d 100644 --- a/core/java/android/content/ClipData.java +++ b/core/java/android/content/ClipData.java @@ -846,7 +846,7 @@ public class ClipData implements Parcelable { * Add a new Item to the overall ClipData container. *

This method will not update the list of available MIME types in the * {@link ClipDescription}. It should be used only when adding items which do not add new - * MIME types to this clip. If this is not the case, use {@link #addItem(Item, ContentResolver)} + * MIME types to this clip. If this is not the case, use {@link #addItem(ContentResolver, Item)} * or call {@link #ClipData(CharSequence, String[], Item)} with a complete list of MIME types. * @param item Item to be added. */ @@ -857,15 +857,21 @@ public class ClipData implements Parcelable { mItems.add(item); } + /** @removed use #addItem(ContentResolver, Item) instead */ + @Deprecated + public void addItem(Item item, ContentResolver resolver) { + addItem(resolver, item); + } + /** * Add a new Item to the overall ClipData container. *

Unlike {@link #addItem(Item)}, this method will update the list of available MIME types * in the {@link ClipDescription}. - * @param item Item to be added. * @param resolver ContentResolver used to get information about the URI possibly contained in * the item. + * @param item Item to be added. */ - public void addItem(Item item, ContentResolver resolver) { + public void addItem(ContentResolver resolver, Item item) { addItem(item); if (item.getHtmlText() != null) { -- cgit v1.2.3