People still need the old method signatures.

Keep the old methods around for code that expects to find them with
the ContentResolver type.

Bug: 120846329
Test: manual
Change-Id: Id9c10525e63ecc8fbf9a249bfe7a5de755a0ceb4
This commit is contained in:
Jeff Sharkey
2018-12-11 13:48:13 -07:00
parent 52fe5dd97f
commit 14101c709c
2 changed files with 86 additions and 0 deletions

View File

@@ -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";
}

View File

@@ -1259,6 +1259,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.
*
@@ -1285,6 +1291,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
@@ -1318,6 +1329,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.
* <p>
@@ -1349,6 +1366,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.
*
@@ -1371,6 +1394,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.
*
@@ -1396,6 +1425,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.
*
@@ -1423,6 +1458,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.
*
@@ -1450,6 +1492,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.
*
@@ -1467,6 +1515,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
@@ -1512,6 +1565,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.
*
@@ -1543,6 +1602,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.
*
@@ -1616,6 +1681,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