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

Commit 3d7a116e authored by Brad Ebinger's avatar Brad Ebinger Committed by android-build-merger
Browse files

Define a subset of provisioning integers as public am: ad9aec35

am: 7b353e20

Change-Id: I55969aca6c0f948dc911eac8c587e322f8da6901
parents 26b4283a 7b353e20
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -7179,12 +7179,18 @@ package android.telephony.ims {
  public class ProvisioningManager {
  public class ProvisioningManager {
    method public static android.telephony.ims.ProvisioningManager createForSubscriptionId(android.content.Context, int);
    method public static android.telephony.ims.ProvisioningManager createForSubscriptionId(android.content.Context, int);
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getProvisioningIntValue(int);
    method @WorkerThread @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getProvisioningIntValue(int);
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getProvisioningStringValue(int);
    method @WorkerThread @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getProvisioningStringValue(int);
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.Callback);
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.Callback);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setProvisioningIntValue(int, int);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningIntValue(int, int);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setProvisioningStringValue(int, String);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningStringValue(int, String);
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.Callback);
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.Callback);
    field public static final int KEY_VOICE_OVER_WIFI_MODE_OVERRIDE = 27; // 0x1b
    field public static final int KEY_VOICE_OVER_WIFI_ROAMING_ENABLED_OVERRIDE = 26; // 0x1a
    field public static final int PROVISIONING_VALUE_DISABLED = 0; // 0x0
    field public static final int PROVISIONING_VALUE_ENABLED = 1; // 0x1
    field public static final String STRING_QUERY_RESULT_ERROR_GENERIC = "STRING_QUERY_RESULT_ERROR_GENERIC";
    field public static final String STRING_QUERY_RESULT_ERROR_NOT_READY = "STRING_QUERY_RESULT_ERROR_NOT_READY";
  }
  }
  public static class ProvisioningManager.Callback {
  public static class ProvisioningManager.Callback {
+0 −2
Original line number Original line Diff line number Diff line
@@ -86,9 +86,7 @@ public class ImsMmTelManager {


    /**
    /**
     * Prefer registering for IMS over IWLAN if possible if WiFi signal quality is high enough.
     * Prefer registering for IMS over IWLAN if possible if WiFi signal quality is high enough.
     * @hide
     */
     */
    @SystemApi
    public static final int WIFI_MODE_WIFI_PREFERRED = 2;
    public static final int WIFI_MODE_WIFI_PREFERRED = 2;


    /**
    /**
+82 −5
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.CallbackExecutor;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemApi;
import android.annotation.WorkerThread;
import android.content.Context;
import android.content.Context;
import android.os.Binder;
import android.os.Binder;
import android.os.RemoteException;
import android.os.RemoteException;
@@ -38,12 +39,67 @@ import java.util.concurrent.Executor;
 * to changes in these configurations.
 * to changes in these configurations.
 *
 *
 * Note: IMS provisioning keys are defined per carrier or OEM using OMA-DM or other provisioning
 * Note: IMS provisioning keys are defined per carrier or OEM using OMA-DM or other provisioning
 * applications and may vary.
 * applications and may vary. For compatibility purposes, the first 100 integer values used in
 * {@link #setProvisioningIntValue(int, int)} have been reserved for existing provisioning keys
 * previously defined in the Android framework. Some common constants have been defined in this
 * class to make integrating with other system apps easier. USE WITH CARE!
 *
 * To avoid collisions, please use String based configurations when possible:
 * {@link #setProvisioningStringValue(int, String)} and {@link #getProvisioningStringValue(int)}.
 * @hide
 * @hide
 */
 */
@SystemApi
@SystemApi
public class ProvisioningManager {
public class ProvisioningManager {


    /**
     * The query from {@link #getProvisioningStringValue(int)} has resulted in an unspecified error.
     */
    public static final String STRING_QUERY_RESULT_ERROR_GENERIC =
            "STRING_QUERY_RESULT_ERROR_GENERIC";

    /**
     * The query from {@link #getProvisioningStringValue(int)} has resulted in an error because the
     * ImsService implementation was not ready for provisioning queries.
     */
    public static final String STRING_QUERY_RESULT_ERROR_NOT_READY =
            "STRING_QUERY_RESULT_ERROR_NOT_READY";

    /**
     * The integer result of provisioning for the queried key is disabled.
     */
    public static final int PROVISIONING_VALUE_DISABLED = 0;

    /**
     * The integer result of provisioning for the queried key is enabled.
     */
    public static final int PROVISIONING_VALUE_ENABLED = 1;


    /**
     * Override the user-defined WiFi Roaming enabled setting for this subscription, defined in
     * {@link SubscriptionManager#WFC_ROAMING_ENABLED_CONTENT_URI}, for the purposes of provisioning
     * the subscription for WiFi Calling.
     *
     * @see #getProvisioningIntValue(int)
     * @see #setProvisioningIntValue(int, int)
     */
    public static final int KEY_VOICE_OVER_WIFI_ROAMING_ENABLED_OVERRIDE = 26;

    /**
     * Override the user-defined WiFi mode for this subscription, defined in
     * {@link SubscriptionManager#WFC_MODE_CONTENT_URI}, for the purposes of provisioning
     * this subscription for WiFi Calling.
     *
     * Valid values for this key are:
     * {@link ImsMmTelManager#WIFI_MODE_WIFI_ONLY},
     * {@link ImsMmTelManager#WIFI_MODE_CELLULAR_PREFERRED}, or
     * {@link ImsMmTelManager#WIFI_MODE_WIFI_PREFERRED}.
     *
     * @see #getProvisioningIntValue(int)
     * @see #setProvisioningIntValue(int, int)
     */
    public static final int KEY_VOICE_OVER_WIFI_MODE_OVERRIDE = 27;

    /**
    /**
     * Callback for IMS provisioning changes.
     * Callback for IMS provisioning changes.
     */
     */
@@ -180,10 +236,15 @@ public class ProvisioningManager {


    /**
    /**
     * Query for the integer value associated with the provided key.
     * Query for the integer value associated with the provided key.
     *
     * This operation is blocking and should not be performed on the UI thread.
     *
     * @param key An integer that represents the provisioning key, which is defined by the OEM.
     * @param key An integer that represents the provisioning key, which is defined by the OEM.
     * @return an integer value for the provided key.
     * @return an integer value for the provided key, or
     * {@link ImsConfigImplBase#CONFIG_RESULT_UNKNOWN} if the key doesn't exist.
     * @throws IllegalArgumentException if the key provided was invalid.
     * @throws IllegalArgumentException if the key provided was invalid.
     */
     */
    @WorkerThread
    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public int getProvisioningIntValue(int key) {
    public int getProvisioningIntValue(int key) {
        try {
        try {
@@ -195,10 +256,16 @@ public class ProvisioningManager {


    /**
    /**
     * Query for the String value associated with the provided key.
     * Query for the String value associated with the provided key.
     * @param key An integer that represents the provisioning key, which is defined by the OEM.
     *
     * @return a String value for the provided key, or {@code null} if the key doesn't exist.
     * This operation is blocking and should not be performed on the UI thread.
     *
     * @param key A String that represents the provisioning key, which is defined by the OEM.
     * @return a String value for the provided key, {@code null} if the key doesn't exist, or one
     * of the following error codes: {@link #STRING_QUERY_RESULT_ERROR_GENERIC},
     * {@link #STRING_QUERY_RESULT_ERROR_NOT_READY}.
     * @throws IllegalArgumentException if the key provided was invalid.
     * @throws IllegalArgumentException if the key provided was invalid.
     */
     */
    @WorkerThread
    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public String getProvisioningStringValue(int key) {
    public String getProvisioningStringValue(int key) {
        try {
        try {
@@ -210,10 +277,16 @@ public class ProvisioningManager {


    /**
    /**
     * Set the integer value associated with the provided key.
     * Set the integer value associated with the provided key.
     *
     * This operation is blocking and should not be performed on the UI thread.
     *
     * Use {@link #setProvisioningStringValue(int, String)} with proper namespacing (to be defined
     * per OEM or carrier) when possible instead to avoid key collision if needed.
     * @param key An integer that represents the provisioning key, which is defined by the OEM.
     * @param key An integer that represents the provisioning key, which is defined by the OEM.
     * @param value a integer value for the provided key.
     * @param value a integer value for the provided key.
     * @return the result of setting the configuration value.
     * @return the result of setting the configuration value.
     */
     */
    @WorkerThread
    @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
    @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
    public @ImsConfigImplBase.SetConfigResult int setProvisioningIntValue(int key, int value) {
    public @ImsConfigImplBase.SetConfigResult int setProvisioningIntValue(int key, int value) {
        try {
        try {
@@ -226,10 +299,14 @@ public class ProvisioningManager {
    /**
    /**
     * Set the String value associated with the provided key.
     * Set the String value associated with the provided key.
     *
     *
     * @param key An integer that represents the provisioning key, which is defined by the OEM.
     * This operation is blocking and should not be performed on the UI thread.
     *
     * @param key A String that represents the provisioning key, which is defined by the OEM and
     *     should be appropriately namespaced to avoid collision.
     * @param value a String value for the provided key.
     * @param value a String value for the provided key.
     * @return the result of setting the configuration value.
     * @return the result of setting the configuration value.
     */
     */
    @WorkerThread
    @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
    @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
    public @ImsConfigImplBase.SetConfigResult int setProvisioningStringValue(int key,
    public @ImsConfigImplBase.SetConfigResult int setProvisioningStringValue(int key,
            String value) {
            String value) {
+4 −2
Original line number Original line Diff line number Diff line
@@ -277,12 +277,14 @@ public class ImsConfig {
         * Wi-Fi calling roaming status.
         * Wi-Fi calling roaming status.
         * Value is in Integer format. ON (1), OFF(0).
         * Value is in Integer format. ON (1), OFF(0).
         */
         */
        public static final int VOICE_OVER_WIFI_ROAMING = 26;
        public static final int VOICE_OVER_WIFI_ROAMING =
                ProvisioningManager.KEY_VOICE_OVER_WIFI_ROAMING_ENABLED_OVERRIDE;
        /**
        /**
         * Wi-Fi calling modem - WfcModeFeatureValueConstants.
         * Wi-Fi calling modem - WfcModeFeatureValueConstants.
         * Value is in Integer format.
         * Value is in Integer format.
         */
         */
        public static final int VOICE_OVER_WIFI_MODE = 27;
        public static final int VOICE_OVER_WIFI_MODE =
                ProvisioningManager.KEY_VOICE_OVER_WIFI_MODE_OVERRIDE;
        /**
        /**
         * VOLTE Status for voice over wifi status of Enabled (1), or Disabled (0).
         * VOLTE Status for voice over wifi status of Enabled (1), or Disabled (0).
         * Value is in Integer format.
         * Value is in Integer format.