Add IMS_RCS_UCE_ENABLED column to SimInfo database

Add the ability for the user to turn on/off UCE in settings.

Bug: 148167203
Test: atest CtsTelephonyTestCases:RcsUceAdapterTest
Change-Id: Ic53a9ef32343bfa4d96c2cf7fc0f0791265d2bd1
This commit is contained in:
Brad Ebinger
2020-01-22 16:09:57 -08:00
parent cce89e2785
commit 071d4201fc
5 changed files with 70 additions and 1 deletions

View File

@@ -9714,6 +9714,7 @@ package android.provider {
field public static final String HPLMNS = "hplmns";
field public static final String ICC_ID = "icc_id";
field public static final String IMSI = "imsi";
field public static final String IMS_RCS_UCE_ENABLED = "ims_rcs_uce_enabled";
field public static final String ISO_COUNTRY_CODE = "iso_country_code";
field public static final String IS_EMBEDDED = "is_embedded";
field public static final String IS_OPPORTUNISTIC = "is_opportunistic";
@@ -13313,6 +13314,29 @@ package android.telephony.ims {
method @NonNull public android.telephony.ims.RcsContactUceCapability build();
}
public class RcsUceAdapter {
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isUceSettingEnabled() throws android.telephony.ims.ImsException;
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUceSettingEnabled(boolean) throws android.telephony.ims.ImsException;
field public static final int ERROR_ALREADY_IN_QUEUE = 13; // 0xd
field public static final int ERROR_FORBIDDEN = 6; // 0x6
field public static final int ERROR_GENERIC_FAILURE = 1; // 0x1
field public static final int ERROR_INSUFFICIENT_MEMORY = 11; // 0xb
field public static final int ERROR_LOST_NETWORK = 12; // 0xc
field public static final int ERROR_NOT_AUTHORIZED = 5; // 0x5
field public static final int ERROR_NOT_AVAILABLE = 3; // 0x3
field public static final int ERROR_NOT_ENABLED = 2; // 0x2
field public static final int ERROR_NOT_FOUND = 7; // 0x7
field public static final int ERROR_NOT_REGISTERED = 4; // 0x4
field public static final int ERROR_REQUEST_TIMEOUT = 10; // 0xa
field public static final int ERROR_REQUEST_TOO_LARGE = 8; // 0x8
field public static final int PUBLISH_STATE_200_OK = 1; // 0x1
field public static final int PUBLISH_STATE_NOT_PUBLISHED = 2; // 0x2
field public static final int PUBLISH_STATE_OTHER_ERROR = 6; // 0x6
field public static final int PUBLISH_STATE_RCS_PROVISION_ERROR = 4; // 0x4
field public static final int PUBLISH_STATE_REQUEST_TIMEOUT = 5; // 0x5
field public static final int PUBLISH_STATE_VOLTE_PROVISION_ERROR = 3; // 0x3
}
}
package android.telephony.ims.feature {

View File

@@ -4100,6 +4100,29 @@ package android.telephony.ims {
method public void onProvisioningStringChanged(int, @NonNull String);
}
public class RcsUceAdapter {
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public boolean isUceSettingEnabled() throws android.telephony.ims.ImsException;
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUceSettingEnabled(boolean) throws android.telephony.ims.ImsException;
field public static final int ERROR_ALREADY_IN_QUEUE = 13; // 0xd
field public static final int ERROR_FORBIDDEN = 6; // 0x6
field public static final int ERROR_GENERIC_FAILURE = 1; // 0x1
field public static final int ERROR_INSUFFICIENT_MEMORY = 11; // 0xb
field public static final int ERROR_LOST_NETWORK = 12; // 0xc
field public static final int ERROR_NOT_AUTHORIZED = 5; // 0x5
field public static final int ERROR_NOT_AVAILABLE = 3; // 0x3
field public static final int ERROR_NOT_ENABLED = 2; // 0x2
field public static final int ERROR_NOT_FOUND = 7; // 0x7
field public static final int ERROR_NOT_REGISTERED = 4; // 0x4
field public static final int ERROR_REQUEST_TIMEOUT = 10; // 0xa
field public static final int ERROR_REQUEST_TOO_LARGE = 8; // 0x8
field public static final int PUBLISH_STATE_200_OK = 1; // 0x1
field public static final int PUBLISH_STATE_NOT_PUBLISHED = 2; // 0x2
field public static final int PUBLISH_STATE_OTHER_ERROR = 6; // 0x6
field public static final int PUBLISH_STATE_RCS_PROVISION_ERROR = 4; // 0x4
field public static final int PUBLISH_STATE_REQUEST_TIMEOUT = 5; // 0x5
field public static final int PUBLISH_STATE_VOLTE_PROVISION_ERROR = 3; // 0x3
}
}
package android.telephony.ims.feature {

View File

@@ -5298,6 +5298,12 @@ public final class Telephony {
/** TelephonyProvider column name for enable Wifi calling in roaming */
public static final String WFC_IMS_ROAMING_ENABLED = "wfc_ims_roaming_enabled";
/**
* Determines if the user has enabled IMS RCS User Capability Exchange (UCE) for this
* subscription.
*/
public static final String IMS_RCS_UCE_ENABLED = "ims_rcs_uce_enabled";
/**
* TelephonyProvider column name for whether a subscription is opportunistic, that is,
* whether the network it connects to is limited in functionality or coverage.

View File

@@ -676,6 +676,13 @@ public class SubscriptionManager {
*/
public static final String WFC_IMS_ROAMING_ENABLED = SimInfo.WFC_IMS_ROAMING_ENABLED;
/**
* Determines if the user has enabled IMS RCS User Capability Exchange (UCE) for this
* subscription.
* @hide
*/
public static final String IMS_RCS_UCE_ENABLED = SimInfo.IMS_RCS_UCE_ENABLED;
/**
* TelephonyProvider column name for whether a subscription is opportunistic, that is,
* whether the network it connects to is limited in functionality or coverage.

View File

@@ -21,6 +21,8 @@ import android.annotation.CallbackExecutor;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.net.Uri;
import android.os.Binder;
import android.os.IBinder;
@@ -28,6 +30,7 @@ import android.os.RemoteException;
import android.telephony.TelephonyFrameworkInitializer;
import android.telephony.ims.aidl.IImsRcsController;
import android.telephony.ims.aidl.IRcsUceControllerCallback;
import android.telephony.ims.feature.RcsFeature;
import android.util.Log;
import java.lang.annotation.Retention;
@@ -41,6 +44,8 @@ import java.util.concurrent.Executor;
* @see ImsRcsManager#getUceAdapter() for information on creating an instance of this class.
* @hide
*/
@SystemApi
@TestApi
public class RcsUceAdapter {
private static final String TAG = "RcsUceAdapter";
@@ -169,6 +174,7 @@ public class RcsUceAdapter {
* Provides a one-time callback for the response to a UCE request. After this callback is called
* by the framework, the reference to this callback will be discarded on the service side.
* @see #requestCapabilities(Executor, List, CapabilitiesCallback)
* @hide
*/
public static class CapabilitiesCallback {
@@ -196,6 +202,7 @@ public class RcsUceAdapter {
/**
* Not to be instantiated directly, use
* {@link ImsRcsManager#getUceAdapter()} to instantiate this manager class.
* @hide
*/
RcsUceAdapter(int subId) {
mSubId = subId;
@@ -219,6 +226,7 @@ public class RcsUceAdapter {
* {@link RcsUceAdapter} is valid, but the ImsService associated with the subscription is not
* available. This can happen if the ImsService has crashed, for example, or if the subscription
* becomes inactive. See {@link ImsException#getCode()} for more information on the error codes.
* @hide
*/
@RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
public void requestCapabilities(@CallbackExecutor Executor executor,
@@ -281,6 +289,7 @@ public class RcsUceAdapter {
* {@link RcsUceAdapter} is valid, but the ImsService associated with the subscription is not
* available. This can happen if the ImsService has crashed, for example, or if the subscription
* becomes inactive. See {@link ImsException#getCode()} for more information on the error codes.
* @hide
*/
@RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
public @PublishState int getUcePublishState() throws ImsException {
@@ -305,7 +314,7 @@ public class RcsUceAdapter {
* for the associated subscription.
*
* @return true if the users setting for UCE is enabled, false otherwise. If false,
* {@link ImsRcsManager#isCapable(int)} will return false for
* {@link ImsRcsManager#isCapable(int, int)} will return false for
* {@link RcsFeature.RcsImsCapabilities#CAPABILITY_TYPE_OPTIONS_UCE} and
* {@link RcsFeature.RcsImsCapabilities#CAPABILITY_TYPE_PRESENCE_UCE}
* @see #setUceSettingEnabled(boolean)