Skip to content

Commit e02a63f

Browse files
Romain GuyAndroid Code Review
authored andcommitted
Merge "Add and document .nomedia constant for MediaStore (Issue 6365)"
2 parents 7a029da + 8ce072d commit e02a63f

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

api/current.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117955,6 +117955,17 @@
117955117955
visibility="public"
117956117956
>
117957117957
</field>
117958+
<field name="MEDIA_IGNORE_FILENAME"
117959+
type="java.lang.String"
117960+
transient="false"
117961+
volatile="false"
117962+
value="&quot;.nomedia&quot;"
117963+
static="true"
117964+
final="true"
117965+
deprecated="not deprecated"
117966+
visibility="public"
117967+
>
117968+
</field>
117958117969
<field name="MEDIA_SCANNER_VOLUME"
117959117970
type="java.lang.String"
117960117971
transient="false"

core/java/android/provider/MediaStore.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,4 +1695,12 @@ public static Uri getMediaScannerUri() {
16951695
* Name of current volume being scanned by the media scanner.
16961696
*/
16971697
public static final String MEDIA_SCANNER_VOLUME = "volume";
1698+
1699+
/**
1700+
* Name of the file signaling the media scanner to ignore media in the containing directory
1701+
* and its subdirectories. Developers should use this to avoid application graphics showing
1702+
* up in the Gallery and likewise prevent application sounds and music from showing up in
1703+
* the Music app.
1704+
*/
1705+
public static final String MEDIA_IGNORE_FILENAME = ".nomedia";
16981706
}

0 commit comments

Comments
 (0)