Remove calling UID check from ContentProvider

AttributionSource checks calling UID on unparcel (so the check is not
necessary), and some ContentProviders may clear calling identity.

Test: Manual
Fixes: 188755312
Change-Id: If629eea3ba8c1a57fd4b7aff0fec2c0acb5f69be
This commit is contained in:
Nate Myren
2021-08-04 13:22:06 -07:00
parent 308cc9919e
commit e758539f02

View File

@@ -745,9 +745,6 @@ public abstract class ContentProvider implements ContentInterface, ComponentCall
if (Binder.getCallingPid() == Process.myPid()) {
return PermissionChecker.PERMISSION_GRANTED;
}
if (!attributionSource.checkCallingUid()) {
return PermissionChecker.PERMISSION_HARD_DENIED;
}
return PermissionChecker.checkPermissionForDataDeliveryFromDataSource(getContext(),
permission, -1, new AttributionSource(getContext().getAttributionSource(),
attributionSource), /*message*/ null);