DO NOT MERGE canWrite() for top level directories am: 992e52f2b3 am: 023c14be68

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/11986976

Change-Id: Id5d06b8fa4d4ddd7e9016e6d6518d4a2a93f9cf8