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

Commit 36ba58f3 authored by Brad Ebinger's avatar Brad Ebinger Committed by Automerger Merge Worker
Browse files

Merge "Define FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION feature" am:...

Merge "Define FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION feature" am: 8cb6d958 am: a30ce7ea am: 5bbee4a0

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I65ab2d2c40512291e34f64e6ac070fbae4d20475
parents d42057fc 5bbee4a0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2520,6 +2520,7 @@ package android.content.pm {
    field public static final String FEATURE_INCREMENTAL_DELIVERY = "android.software.incremental_delivery";
    field public static final String FEATURE_REBOOT_ESCROW = "android.hardware.reboot_escrow";
    field public static final String FEATURE_TELEPHONY_CARRIERLOCK = "android.hardware.telephony.carrierlock";
    field public static final String FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION = "android.hardware.telephony.ims.singlereg";
    field public static final int FLAGS_PERMISSION_RESERVED_PERMISSION_CONTROLLER = -268435456; // 0xf0000000
    field public static final int FLAG_PERMISSION_APPLY_RESTRICTION = 16384; // 0x4000
    field public static final int FLAG_PERMISSION_AUTO_REVOKED = 131072; // 0x20000
+38 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import android.content.res.XmlResourceParser;
import android.graphics.Rect;
import android.graphics.drawable.AdaptiveIconDrawable;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Bundle;
@@ -69,6 +70,12 @@ import android.os.incremental.IncrementalManager;
import android.os.storage.StorageManager;
import android.os.storage.VolumeInfo;
import android.permission.PermissionManager;
import android.telephony.TelephonyManager;
import android.telephony.gba.GbaService;
import android.telephony.ims.ImsService;
import android.telephony.ims.ProvisioningManager;
import android.telephony.ims.RcsUceAdapter;
import android.telephony.ims.SipDelegateManager;
import android.util.AndroidException;
import android.util.Log;

@@ -2934,6 +2941,37 @@ public abstract class PackageManager {
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_TELEPHONY_IMS = "android.hardware.telephony.ims";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: The device
     * supports a single IMS registration as defined by carrier networks in the IMS service
     * implementation using the {@link ImsService} API, {@link GbaService} API, and IRadio 1.6 HAL.
     * <p>
     * When set, the device must fully support the following APIs for an application to implement
     * IMS single registration:
     * <ul>
     * <li> Updating RCS provisioning status using the {@link ProvisioningManager} API to supply an
     * RCC.14 defined XML and notify IMS applications of Auto Configuration Server (ACS) or
     * proprietary server provisioning updates.</li>
     * <li>Opening a delegate in the device IMS service to forward SIP traffic to the carrier's
     * network using the {@link SipDelegateManager} API</li>
     * <li>Listening to EPS dedicated bearer establishment via the
     * {@link ConnectivityManager#registerQosCallback}
     * API to indicate to the application when to start/stop media traffic.</li>
     * <li>Implementing Generic Bootstrapping Architecture (GBA) and providing the associated
     * authentication keys to applications
     * requesting this information via the {@link TelephonyManager#bootstrapAuthenticationRequest}
     * API</li>
     * <li>Implementing RCS User Capability Exchange using the {@link RcsUceAdapter} API</li>
     * </ul>
     * <p>
     * This feature should only be defined if {@link #FEATURE_TELEPHONY_IMS} is also defined.
     * @hide
     */
    @SystemApi
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION =
            "android.hardware.telephony.ims.singlereg";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device is capable of communicating with
+12 −9
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.annotation.SdkConstant;
import android.annotation.StringDef;
import android.annotation.SystemApi;
import android.annotation.WorkerThread;
import android.content.pm.PackageManager;
import android.os.Binder;
import android.os.RemoteException;
import android.os.ServiceSpecificException;
@@ -1325,7 +1326,7 @@ public class ProvisioningManager {
     * the RCS VoLTE single registration feature. Only default messaging application may receive
     * the intent.
     *
     * <p>Contains {@link #EXTRA_SUBSCRIPTION_INDEX} to specify the subscription index for which
     * <p>Contains {@link #EXTRA_SUBSCRIPTION_ID} to specify the subscription index for which
     * the intent is valid. and {@link #EXTRA_STATUS} to specify RCS VoLTE single registration
     * status.
     */
@@ -1371,7 +1372,7 @@ public class ProvisioningManager {
     * provisioning is done using autoconfiguration, then these parameters shall be
     * sent in the HTTP get request to fetch the RCS provisioning. RCS client
     * configuration must be provided by the application before registering for the
     * provisioning status events {@link #registerRcsProvisioningChangedCallback()}
     * provisioning status events {@link #registerRcsProvisioningChangedCallback}
     * @param rcc RCS client configuration {@link RcsClientConfiguration}
     */
    @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
@@ -1387,13 +1388,15 @@ public class ProvisioningManager {
    }

    /**
     * Returns a flag to indicate if the device software and the carrier
     * have the capability to support RCS Volte single IMS registration.
     * @return true if this single registration is capable, false otherwise
     * Returns a flag to indicate whether or not the device supports IMS single registration for
     * MMTEL and RCS features as well as if the carrier has provisioned the feature.
     * @return true if IMS single registration is capable at this time, or false otherwise
     * @throws ImsException If the remote ImsService is not available for
     * any reason or the subscription associated with this instance is no
     * longer active. See {@link ImsException#getCode()} for more
     * information.
     * @see PackageManager#FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION for whether or not this
     * device supports IMS single registration.
     */
    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public boolean isRcsVolteSingleRegistrationCapable() throws ImsException {
@@ -1430,7 +1433,7 @@ public class ProvisioningManager {
     * available. This can happen if the service crashed, for example.
     * It shall also throw this exception when the RCS client parameters for the
     * application are not valid. In that case application must set the client
     * params (See {@link #setRcsClientConfiguration()}) and re register the
     * params (See {@link #setRcsClientConfiguration}) and re register the
     * callback.
     * See {@link ImsException#getCode()} for a more detailed reason.
     */
@@ -1458,9 +1461,9 @@ public class ProvisioningManager {
     * will result in a no-op.
     * @param callback The existing {@link RcsProvisioningCallback} to be
     * removed.
     * @see #registerRcsProvisioningChangedCallback(RcsClientConfiguration,
     * Executor, RcsProvisioningCallback) @throws IllegalArgumentException
     * if the subscription associated with this callback is invalid.
     * @see #registerRcsProvisioningChangedCallback
     * @throws IllegalArgumentException if the subscription associated with this callback is
     * invalid.
     */
    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public void unregisterRcsProvisioningChangedCallback(
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.RemoteException;
import android.os.ServiceSpecificException;
import android.telephony.BinderCacheManager;
@@ -47,6 +48,9 @@ import java.util.concurrent.Executor;
 * This allows multiple IMS applications to forward SIP messages to/from their application for the
 * purposes of providing a single IMS registration to the carrier's IMS network from potentially
 * many IMS stacks implementing a subset of the supported MMTEL/RCS features.
 * <p>
 * This API is only supported if the device supports the
 * {@link PackageManager#FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION} feature.
 * @hide
 */
@SystemApi
@@ -269,6 +273,7 @@ public class SipDelegateManager {
     * {@link ImsException#getCode()} for more information.
     *
     * @see CarrierConfigManager.Ims#KEY_IMS_SINGLE_REGISTRATION_REQUIRED_BOOL
     * @see PackageManager#FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION
     */
    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public boolean isSupported() throws ImsException {