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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user