1. seandroid
  2. Untitled project
  3. system/vold

Commits

Jean-Baptiste Queru  committed 0e110bb Merge

am 5cf6325c: Merge "Unshare ums when SD card is removed"

* commit '5cf6325c91792dbb1bb08fa1958c1fc8a5b9c45d':
Unshare ums when SD card is removed

  • Participants
  • Parent commits e5032c4, 5cf6325
  • Branches master

Comments (0)

Files changed (1)

File DirectVolume.cpp

View file
  • Ignore whitespace
     int major = atoi(evt->findParam("MAJOR"));
     int minor = atoi(evt->findParam("MINOR"));
     char msg[255];
+    bool enabled;
+
+    if (mVm->shareEnabled(getLabel(), "ums", &enabled) == 0 && enabled) {
+        mVm->unshareVolume(getLabel(), "ums");
+    }
 
     SLOGD("Volume %s %s disk %d:%d removed\n", getLabel(), getMountpoint(), major, minor);
     snprintf(msg, sizeof(msg), "Volume %s %s disk removed (%d:%d)",