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

Commit 92e8869e authored by Gil Cukierman's avatar Gil Cukierman Committed by Automerger Merge Worker
Browse files

Merge "Update TelephonyManager.setAllowedNetworkTypeForReason Docs" am:...

Merge "Update TelephonyManager.setAllowedNetworkTypeForReason Docs" am: 44f53112 am: af2c8359 am: e851338f

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



Change-Id: I542eefda1e98d8a6f92614465f368d52f78cac3c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0e4fd576 e851338f
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -9540,12 +9540,13 @@ public class TelephonyManager {
    /**
     * Set the allowed network types of the device and provide the reason triggering the allowed
     * network change.
     * <p>Requires permission: android.Manifest.MODIFY_PHONE_STATE or
     * <p>Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE} or
     * that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
     *
     * This can be called for following reasons
     * This can be called for following reasons:
     * <ol>
     * <li>Allowed network types control by USER {@link #ALLOWED_NETWORK_TYPES_REASON_USER}
     * <li>Allowed network types control by USER
     * {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER}
     * <li>Allowed network types control by carrier {@link #ALLOWED_NETWORK_TYPES_REASON_CARRIER}
     * </ol>
     * This API will result in allowing an intersection of allowed network types for all reasons,
@@ -9555,7 +9556,13 @@ public class TelephonyManager {
     * @param allowedNetworkTypes The bitmask of allowed network type
     * @throws IllegalStateException if the Telephony process is not currently available.
     * @throws IllegalArgumentException if invalid AllowedNetworkTypesReason is passed.
     * @throws SecurityException if the caller does not have the required privileges
     * @throws SecurityException if the caller does not have the required privileges or if the
     * caller tries to use one of the following security-based reasons without
     * {@link android.Manifest.permission#MODIFY_PHONE_STATE} permissions.
     * <ol>
     *     <li>{@code TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G}</li>
     *     <li>{@code TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER_RESTRICTIONS}</li>
     * </ol>
     */
    @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
    @RequiresFeature(