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

Commit 16bc9c79 authored by Hall Liu's avatar Hall Liu Committed by Automerger Merge Worker
Browse files

Merge "Add more docs about location permission" into rvc-dev am: 3263b53e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11871446

Change-Id: Ifa28d0e2db48707f15d5529e83d9fb99a33dc31c
parents 8f441a61 3263b53e
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -219,6 +219,9 @@ public class PhoneStateListener {
    /**
     * Listen for changes to observed cell info.
     *
     * Listening to this event requires the {@link Manifest.permission#ACCESS_FINE_LOCATION}
     * permission.
     *
     * @see #onCellInfoChanged
     */
    public static final int LISTEN_CELL_INFO = 0x00000400;
@@ -461,6 +464,9 @@ public class PhoneStateListener {
     * <p>Requires permission {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE} or
     * the calling app has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges}).
     *
     * <p>Also requires the {@link Manifest.permission#ACCESS_FINE_LOCATION} permission, regardless
     * of whether the calling app has carrier privileges.
     *
     * @see #onRegistrationFailed
     */
    @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE)
@@ -472,6 +478,9 @@ public class PhoneStateListener {
     * <p>Requires permission {@link android.Manifest.permission#READ_PRECISE_PHONE_STATE} or
     * the calling app has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges}).
     *
     * <p>Also requires the {@link Manifest.permission#ACCESS_FINE_LOCATION} permission, regardless
     * of whether the calling app has carrier privileges.
     *
     * @see #onBarringInfoChanged
     */
    @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE)
@@ -569,6 +578,11 @@ public class PhoneStateListener {
     * subId. Otherwise, this callback applies to
     * {@link SubscriptionManager#getDefaultSubscriptionId()}.
     *
     * The instance of {@link ServiceState} passed as an argument here will have various levels of
     * location information stripped from it depending on the location permissions that your app
     * holds. Only apps holding the {@link Manifest.permission#ACCESS_FINE_LOCATION} permission will
     * receive all the information in {@link ServiceState}.
     *
     * @see ServiceState#STATE_EMERGENCY_ONLY
     * @see ServiceState#STATE_IN_SERVICE
     * @see ServiceState#STATE_OUT_OF_SERVICE