OSDN Git Service

MountService: Fix android.process.media crash repeatedly problem
authorJP Abgrall <jpa@google.com>
Fri, 25 Jul 2014 01:19:12 +0000 (18:19 -0700)
committerTodd Poynor <toddpoynor@google.com>
Fri, 25 Jul 2014 02:05:36 +0000 (02:05 +0000)
When the framework restarts because of certain exception, the
external volume id will disappear. At this time, mount service
will issue "volume list" command to vold to get the status of
each storage.

The fix is to re-broadcast the uuid and user label again via
vold "volume list broadcast" command.

Bug: 16253597
Bug: 16306775
Change-Id: I227e8bc597a4f5338035d3401036490f14557211

services/core/java/com/android/server/MountService.java

index 6c3a4b4..50f2ae9 100644 (file)
@@ -775,7 +775,7 @@ class MountService extends IMountService.Stub
                  */
                 try {
                     final String[] vols = NativeDaemonEvent.filterMessageList(
-                            mConnector.executeForList("volume", "list"),
+                            mConnector.executeForList("volume", "list", "broadcast"),
                             VoldResponseCode.VolumeListResult);
                     for (String volstr : vols) {
                         String[] tok = volstr.split(" ");