Fix .nomedia bug

Directories which contain a .nomedia dir (not a file) were never
considered dirty (because we would ignore IOException trying to read the
.nomedia dir). We now always consider directories that contain a .nomedia dir
as dirty (because we never mark them dirty/non-dirty).

When renaming a directory, MediaProvider should see if one of ancestor
directories has .nomedia.

When apps which can bypass database move files to new directory,
.nomedia file of old path should be dirty as well.

Bug: 207815696
Test: atest MediaProviderTests
Change-Id: I51399aa0ef806587c6bb0e451242e1909ac80b59
Merged-In: I51399aa0ef806587c6bb0e451242e1909ac80b59
5 files changed