Compute policy for read-external-storage for uid

So that when sharding a uid all packages have the same policy.

Otherwise one app might want to set the app-op to a different state than
another app in the same uid which will lead to a loop where the two apps
fight.

Test: atest --test-mapping frameworks/base/services/core/java/com/android/server/policy
Fixes: 136129296
Change-Id: I673342f4513b35854faaab993fc4233fe19217d0
(cherry picked from commit f75bb77052bbab4e23cdbfc98158af3112f2c2cc)
2 files changed