Check dump permissions before dumping --high-priority

Bug: 383328827
Test: new cts test
Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c617d697cdbef000cb416aefc08fc4a3cda4afa1)
Merged-In: Ie4b4e0001430924674b08eabf28c656a46527727
Change-Id: Ie4b4e0001430924674b08eabf28c656a46527727
1 file changed