Reputation: 864
I have written a system server/service in android framework. As far as i know it has the system level permissions. But when i call this service using an app i get the permissions of application calling that service. Could anyone explain this behaviour? Also how could i resolve this?
Upvotes: 1
Views: 343
Reputation: 20936
When in your service you try to call method from other service, try to put the code of call into the following code block:
long token = Binder.clearCallingIdentity();
//your call
Binder.restoreCallingIdentity(token);
Upvotes: 1