MediaProvider: allow write access to external SD

Without this, Gallery cannot delete photos on external SD.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ifbebcdb167cca92a5a05158fa4c8b81512b77ba6
MediaScanner: Don't delete entries of secondary storage on shutdown

MediaScanner deletes the entries of secondary storage whenever it
is ejected by the user. However, a shutdown also sends this eject
events. This patch ignores the eject event if the system is being
shutdown.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I0dfe4bd750c563e99b59ad6e9155b241c3228e0d
Merge "MediaProvider: allow write access to external SD" into du44
Merge branch 'du44' of https://github.com/DirtyUnicorns-KitKat/packages_providers_MediaProvider into HEAD