summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.xml154
-rw-r--r--core/java/android/provider/MediaStore.java41
2 files changed, 188 insertions, 7 deletions
diff --git a/api/current.xml b/api/current.xml
index 0cf46ebd1116..0df38910b457 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -157199,6 +157199,160 @@
>
</field>
</interface>
+<class name="MediaStore.Files"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="MediaStore.Files"
+ type="android.provider.MediaStore.Files"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+</method>
+<method name="getContentUri"
+ return="android.net.Uri"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="volumeName" type="java.lang.String">
+</parameter>
+<parameter name="rowId" type="long">
+</parameter>
+</method>
+</class>
+<interface name="MediaStore.Files.FileColumns"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.provider.MediaStore.MediaColumns">
+</implements>
+<field name="MEDIA_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;media_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_TYPE_AUDIO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_TYPE_IMAGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_TYPE_NONE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_TYPE_PLAYLIST"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MEDIA_TYPE_VIDEO"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MIME_TYPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;mime_type&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PARENT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;parent&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TITLE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;title&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</interface>
<class name="MediaStore.Images"
extends="java.lang.Object"
abstract="false"
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index b74e76f19864..f111ef23ad99 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -266,36 +266,62 @@ public final class MediaStore {
}
/**
- * Media provider table containing an index of all files in the storage.
- * This can be used by applications to find all documents of a particular type
- * and is also used internally by the device side MTP implementation.
- * @hide
+ * Media provider table containing an index of all files in the media storage,
+ * including non-media files. This should be used by applications that work with
+ * non-media file types (text, HTML, PDF, etc) as well as applications that need to
+ * work with multiple media file types in a single query.
*/
public static final class Files {
+ /**
+ * Get the content:// style URI for the files table on the
+ * given volume.
+ *
+ * @param volumeName the name of the volume to get the URI for
+ * @return the URI to the files table on the given volume
+ */
public static Uri getContentUri(String volumeName) {
return Uri.parse(CONTENT_AUTHORITY_SLASH + volumeName +
"/file");
}
+ /**
+ * Get the content:// style URI for a single row in the files table on the
+ * given volume.
+ *
+ * @param volumeName the name of the volume to get the URI for
+ * @param rowId the file to get the URI for
+ * @return the URI to the files table on the given volume
+ */
public static final Uri getContentUri(String volumeName,
- long fileId) {
+ long rowId) {
return Uri.parse(CONTENT_AUTHORITY_SLASH + volumeName
- + "/file/" + fileId);
+ + "/file/" + rowId);
}
+ /**
+ * For use only by the MTP implementation.
+ * @hide
+ */
public static Uri getMtpObjectsUri(String volumeName) {
return Uri.parse(CONTENT_AUTHORITY_SLASH + volumeName +
"/object");
}
+ /**
+ * For use only by the MTP implementation.
+ * @hide
+ */
public static final Uri getMtpObjectsUri(String volumeName,
long fileId) {
return Uri.parse(CONTENT_AUTHORITY_SLASH + volumeName
+ "/object/" + fileId);
}
- // Used to implement the MTP GetObjectReferences and SetObjectReferences commands.
+ /**
+ * Used to implement the MTP GetObjectReferences and SetObjectReferences commands.
+ * @hide
+ */
public static final Uri getMtpReferencesUri(String volumeName,
long fileId) {
return Uri.parse(CONTENT_AUTHORITY_SLASH + volumeName
@@ -310,6 +336,7 @@ public final class MediaStore {
/**
* The MTP format code of the file
* <P>Type: INTEGER</P>
+ * @hide
*/
public static final String FORMAT = "format";