Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_providers_MediaProvider
Commits
3dbfd273
Commit
3dbfd273
authored
9 years ago
by
TreeHugger Robot
Committed by
Android (Google) Code Review
9 years ago
Browse files
Options
Download
Plain Diff
Merge "Scan preloads folder for content" into nyc-mr1-dev
parents
b1faa144
3145e76c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
src/com/android/providers/media/MediaScannerService.java
src/com/android/providers/media/MediaScannerService.java
+11
-2
No files found.
src/com/android/providers/media/MediaScannerService.java
View file @
3dbfd273
...
...
@@ -33,10 +33,13 @@ import android.os.Looper;
import
android.os.Message
;
import
android.os.PowerManager
;
import
android.os.Process
;
import
android.os.UserManager
;
import
android.os.storage.StorageManager
;
import
android.provider.MediaStore
;
import
android.util.Log
;
import
com.android.internal.util.ArrayUtils
;
import
java.io.File
;
import
java.util.Arrays
;
...
...
@@ -224,7 +227,7 @@ public class MediaScannerService extends Service implements Runnable {
}
else
{
String
volume
=
arguments
.
getString
(
"volume"
);
String
[]
directories
=
null
;
if
(
MediaProvider
.
INTERNAL_VOLUME
.
equals
(
volume
))
{
// scan internal media storage
directories
=
new
String
[]
{
...
...
@@ -234,7 +237,13 @@ public class MediaScannerService extends Service implements Runnable {
}
else
if
(
MediaProvider
.
EXTERNAL_VOLUME
.
equals
(
volume
))
{
// scan external storage volumes
directories
=
mExternalStoragePaths
;
if
(
getSystemService
(
UserManager
.
class
).
isDemoUser
())
{
directories
=
ArrayUtils
.
appendElement
(
String
.
class
,
mExternalStoragePaths
,
Environment
.
getDataPreloadsDirectory
().
getAbsolutePath
());
}
else
{
directories
=
mExternalStoragePaths
;
}
}
if
(
directories
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment