One way to change the structure to find out who turned to any content provider would be to change
enforceReadPermission and enforceWritePermission in ContentProvider.java to register a package that calls contentProvider,
Log.d(TAG,""+getCallingPackages() +" app called provider "+ uri.getAuthority());
Getcallingpackages function
private Collection<String> getCallingPackages() { int caller = Binder.getCallingUid(); if (caller == 0) { return null; } return Lists.newArrayList(mContext.getPackageManager().getPackagesForUid(caller)); }
nandeesh
source share