diff --git a/api/removed.txt b/api/removed.txt index f7106d2207ec2..e3e8b6397e6fb 100644 --- a/api/removed.txt +++ b/api/removed.txt @@ -508,6 +508,21 @@ package android.provider { field public static final deprecated java.lang.String TIMESTAMP = "timestamp"; } + public final class DocumentsContract { + method public static android.net.Uri copyDocument(android.content.ContentResolver, android.net.Uri, android.net.Uri) throws java.io.FileNotFoundException; + method public static android.net.Uri createDocument(android.content.ContentResolver, android.net.Uri, java.lang.String, java.lang.String) throws java.io.FileNotFoundException; + method public static android.content.IntentSender createWebLinkIntent(android.content.ContentResolver, android.net.Uri, android.os.Bundle) throws java.io.FileNotFoundException; + method public static boolean deleteDocument(android.content.ContentResolver, android.net.Uri) throws java.io.FileNotFoundException; + method public static void ejectRoot(android.content.ContentResolver, android.net.Uri); + method public static android.provider.DocumentsContract.Path findDocumentPath(android.content.ContentResolver, android.net.Uri) throws java.io.FileNotFoundException; + method public static android.os.Bundle getDocumentMetadata(android.content.ContentResolver, android.net.Uri) throws java.io.FileNotFoundException; + method public static android.graphics.Bitmap getDocumentThumbnail(android.content.ContentResolver, android.net.Uri, android.graphics.Point, android.os.CancellationSignal) throws java.io.FileNotFoundException; + method public static boolean isChildDocument(android.content.ContentResolver, android.net.Uri, android.net.Uri) throws java.io.FileNotFoundException; + method public static android.net.Uri moveDocument(android.content.ContentResolver, android.net.Uri, android.net.Uri, android.net.Uri) throws java.io.FileNotFoundException; + method public static boolean removeDocument(android.content.ContentResolver, android.net.Uri, android.net.Uri) throws java.io.FileNotFoundException; + method public static android.net.Uri renameDocument(android.content.ContentResolver, android.net.Uri, java.lang.String) throws java.io.FileNotFoundException; + } + public static final class Settings.Global extends android.provider.Settings.NameValueTable { field public static final deprecated java.lang.String CONTACT_METADATA_SYNC = "contact_metadata_sync"; } diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java index d9c16a700cb97..a8726e9de3d00 100644 --- a/core/java/android/provider/DocumentsContract.java +++ b/core/java/android/provider/DocumentsContract.java @@ -1275,6 +1275,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static Bitmap getDocumentThumbnail(ContentResolver content, Uri documentUri, Point size, + CancellationSignal signal) throws FileNotFoundException { + return getDocumentThumbnail((ContentInterface) content, documentUri, size, signal); + } + /** * Create a new document with given MIME type and display name. * @@ -1301,6 +1307,11 @@ public final class DocumentsContract { } } + /** @removed */ + public static Uri createDocument(ContentResolver content, Uri parentDocumentUri, + String mimeType, String displayName) throws FileNotFoundException { + return createDocument((ContentInterface) content, parentDocumentUri, mimeType, displayName); + } /** * Test if a document is descendant (child, grandchild, etc) from the given @@ -1334,6 +1345,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static boolean isChildDocument(ContentResolver content, Uri parentDocumentUri, + Uri childDocumentUri) throws FileNotFoundException { + return isChildDocument((ContentInterface) content, parentDocumentUri, childDocumentUri); + } + /** * Change the display name of an existing document. *

@@ -1365,6 +1382,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static Uri renameDocument(ContentResolver content, Uri documentUri, + String displayName) throws FileNotFoundException { + return renameDocument((ContentInterface) content, documentUri, displayName); + } + /** * Delete the given document. * @@ -1387,6 +1410,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static boolean deleteDocument(ContentResolver content, Uri documentUri) + throws FileNotFoundException { + return deleteDocument((ContentInterface) content, documentUri); + } + /** * Copies the given document. * @@ -1412,6 +1441,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static Uri copyDocument(ContentResolver content, Uri sourceDocumentUri, + Uri targetParentDocumentUri) throws FileNotFoundException { + return copyDocument((ContentInterface) content, sourceDocumentUri, targetParentDocumentUri); + } + /** * Moves the given document under a new parent. * @@ -1439,6 +1474,13 @@ public final class DocumentsContract { } } + /** @removed */ + public static Uri moveDocument(ContentResolver content, Uri sourceDocumentUri, + Uri sourceParentDocumentUri, Uri targetParentDocumentUri) throws FileNotFoundException { + return moveDocument((ContentInterface) content, sourceDocumentUri, sourceParentDocumentUri, + targetParentDocumentUri); + } + /** * Removes the given document from a parent directory. * @@ -1466,6 +1508,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static boolean removeDocument(ContentResolver content, Uri documentUri, + Uri parentDocumentUri) throws FileNotFoundException { + return removeDocument((ContentInterface) content, documentUri, parentDocumentUri); + } + /** * Ejects the given root. It throws {@link IllegalStateException} when ejection failed. * @@ -1483,6 +1531,11 @@ public final class DocumentsContract { } } + /** @removed */ + public static void ejectRoot(ContentResolver content, Uri rootUri) { + ejectRoot((ContentInterface) content, rootUri); + } + /** * Returns metadata associated with the document. The type of metadata returned * is specific to the document type. For example the data returned for an image @@ -1528,6 +1581,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static Bundle getDocumentMetadata(ContentResolver content, Uri documentUri) + throws FileNotFoundException { + return getDocumentMetadata((ContentInterface) content, documentUri); + } + /** * Finds the canonical path from the top of the document tree. * @@ -1559,6 +1618,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static Path findDocumentPath(ContentResolver content, Uri treeUri) + throws FileNotFoundException { + return findDocumentPath((ContentInterface) content, treeUri); + } + /** * Creates an intent for obtaining a web link for the specified document. * @@ -1632,6 +1697,12 @@ public final class DocumentsContract { } } + /** @removed */ + public static IntentSender createWebLinkIntent(ContentResolver content, Uri uri, + Bundle options) throws FileNotFoundException { + return createWebLinkIntent((ContentInterface) content, uri, options); + } + /** * Open the given image for thumbnail purposes, using any embedded EXIF * thumbnail if available, and providing orientation hints from the parent