Make ContentObservers work across profiles

Currently registering for changes to a cross-user Uri does not work, as
the calling user id is used to identify the Uri. Change this to use the
userId the Uri is associated with. In order to protect Uris across
users, we only allow registration for a Uri when the caller has read
permission. We also only allow notify calls from across users when the
caller has write permission to the Uri.

Bug: 19312280
Change-Id: Ide216b09980ed5ebefe9b37c946dd8160167809f
2 files changed