Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74f972e2 authored by Xiaoyu Jin's avatar Xiaoyu Jin
Browse files

Add documents for the required permission

In order to registerContentObserver as other user, callers need to hold
the INTERACT_ACROSS_USERS_FULL permission.

Bug: 206743591
Test: CtsContentTestCases
Change-Id: I2f373a3f064718cc87bdda35a5854b6a6fd2e7aa
parent 075254e1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2670,6 +2670,9 @@ public abstract class ContentResolver implements ContentInterface {
     * {@link ContentObserver#onChange(boolean, Collection, int, UserHandle)} should be
     * overwritten to get the corresponding {@link UserHandle} for that notification.
     *
     * <p> If you don't hold the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL}
     * permission, you can register the {@link ContentObserver} only for current user.
     *
     * @param uri                  The URI to watch for changes. This can be a specific row URI,
     *                             or a base URI for a whole class of content.
     * @param notifyForDescendants When false, the observer will be notified