Usually, to allow an app to read user's data we add some lines to the android manifest stating a specific permission for that app. However, android does not have any kind of control over the raw data that an app may read. For example, if an app has the permission to read the call logs of the user, it will be able to access to all the raw call logs information without any kind of restriction. Furthermore, it happens exactly the same when an app tries to read the contacts. It can read every entry without and restriction on the raw data. The fact that apps does not have any restriction on user's raw information once they have access really concerns me. It would be more desirable that, for example, a social app would have only access to your contacts email and not phone numbers, addresses or phone office numbers.
I am trying build an app that could restrict the access to raw information in a fine-grained manner. That is, an app that could restrict the access depending on user's preferences so that two different apps that, for example, have the permission to access to the call logs could view different processed versions of the same call log. One could only see the calls made during an specific day and the other one could only see the calls during the last moth. The idea could also be applied to contacts so that sensible user information would not be disclosed.
I have been researching a lot into the topic but I have not found any answer. From all the sources that I have read, I guess this cannot be done (yet). However, if anyone could shed light on how to implement this I would be very grateful. Would it be possible to restrict the access to raw data in a fine-grained manner?