diff options
| author | 2020-01-27 19:26:19 +0000 | |
|---|---|---|
| committer | 2020-01-27 19:26:19 +0000 | |
| commit | 22b5d71fa06f6f76d52ac89df368cb1afa2cb53b (patch) | |
| tree | bee8348958bf915280e4fb6d5b1127914d3153f0 | |
| parent | 2505d60319494d27a2b5d7fbe381977e7a37c4ef (diff) | |
| parent | 47c65ba67b1d4c209f57d7770015f265c2e5765b (diff) | |
Add IMS_RCS_UCE_ENABLED column to SimInfo database am: 41c232c7bc am: 47c65ba67b
Change-Id: Ib64e43e2ea6543575767be76b6ee4570c0b14faf
| -rwxr-xr-x | api/system-current.txt | 24 | ||||
| -rw-r--r-- | api/test-current.txt | 23 | ||||
| -rw-r--r-- | core/java/android/provider/Telephony.java | 6 | ||||
| -rw-r--r-- | telephony/java/android/telephony/SubscriptionManager.java | 7 | ||||
| -rw-r--r-- | telephony/java/android/telephony/ims/RcsUceAdapter.java | 11 |
5 files changed, 70 insertions, 1 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 121f39ada70f..f997561121ae 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7217,6 +7217,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"; @@ -10581,6 +10582,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 { diff --git a/api/test-current.txt b/api/test-current.txt index fcf68dcd220b..28b7d3f98934 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -3768,6 +3768,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 { diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java index ca07c8916ace..1611d28b1be2 100644 --- a/core/java/android/provider/Telephony.java +++ b/core/java/android/provider/Telephony.java @@ -5252,6 +5252,12 @@ public final class Telephony { 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. * For example, CBRS. diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index 8adf947ec74b..ea95aacc3184 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -677,6 +677,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. * For example, CBRS. diff --git a/telephony/java/android/telephony/ims/RcsUceAdapter.java b/telephony/java/android/telephony/ims/RcsUceAdapter.java index b47bcb9b119b..e67a70f4abd7 100644 --- a/telephony/java/android/telephony/ims/RcsUceAdapter.java +++ b/telephony/java/android/telephony/ims/RcsUceAdapter.java @@ -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.content.Context; import android.net.Uri; import android.os.Binder; @@ -29,6 +31,7 @@ import android.os.RemoteException; import android.os.ServiceManager; 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; @@ -42,6 +45,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"; @@ -170,6 +175,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 { @@ -197,6 +203,7 @@ public class RcsUceAdapter { /** * Not to be instantiated directly, use * {@link ImsRcsManager#getUceAdapter()} to instantiate this manager class. + * @hide */ RcsUceAdapter(int subId) { mSubId = subId; @@ -220,6 +227,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, @@ -275,6 +283,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 { @@ -299,7 +308,7 @@ public class RcsUceAdapter { * for the associated subscription. * * @return true if the user’s 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) |