Better validation of external parameters.

Anything that ends up going into path needs to be sanitized to ensure
the underlying filesystem can represent it.  Also prevent creation
of hidden items; new media creation should always be part of the
user's visible collection.

Bug: 122314416
Test: atest MediaProviderTests
Change-Id: I092a524b78fd26fe5d1d2fe6e78073a54682b911
2 files changed