|
|
|
|
@@ -16,12 +16,14 @@
|
|
|
|
|
|
|
|
|
|
package android.telephony;
|
|
|
|
|
|
|
|
|
|
import android.Manifest;
|
|
|
|
|
import android.annotation.NonNull;
|
|
|
|
|
import android.annotation.Nullable;
|
|
|
|
|
import android.annotation.RequiresPermission;
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
|
|
import android.annotation.SystemApi;
|
|
|
|
|
import android.annotation.SystemService;
|
|
|
|
|
import android.annotation.TestApi;
|
|
|
|
|
import android.annotation.UnsupportedAppUsage;
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.os.PersistableBundle;
|
|
|
|
|
@@ -1222,8 +1224,8 @@ public class CarrierConfigManager {
|
|
|
|
|
public static final String KEY_SHOW_PRECISE_FAILED_CAUSE_BOOL =
|
|
|
|
|
"show_precise_failed_cause_bool";
|
|
|
|
|
|
|
|
|
|
// These variables are used by the MMS service and exposed through another API, {@link
|
|
|
|
|
// SmsManager}. The variable names and string values are copied from there.
|
|
|
|
|
// These variables are used by the MMS service and exposed through another API,
|
|
|
|
|
// SmsManager. The variable names and string values are copied from there.
|
|
|
|
|
public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled";
|
|
|
|
|
public static final String KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL = "allowAttachAudio";
|
|
|
|
|
public static final String KEY_MMS_APPEND_TRANSACTION_ID_BOOL = "enabledTransID";
|
|
|
|
|
@@ -1271,7 +1273,7 @@ public class CarrierConfigManager {
|
|
|
|
|
* network as part of the Setup Wizard flow.
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
public static final String KEY_CARRIER_SETUP_APP_STRING = "carrier_setup_app_string";
|
|
|
|
|
public static final String KEY_CARRIER_SETUP_APP_STRING = "carrier_setup_app_string";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Defines carrier-specific actions which act upon
|
|
|
|
|
@@ -2611,6 +2613,40 @@ public class CarrierConfigManager {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Overrides the carrier config of the provided subscription ID with the provided values.
|
|
|
|
|
*
|
|
|
|
|
* Any further queries to carrier config from any process will return
|
|
|
|
|
* the overriden values after this method returns. The overrides are effective for the lifetime
|
|
|
|
|
* of the phone process.
|
|
|
|
|
*
|
|
|
|
|
* May throw an {@link IllegalArgumentException} if {@code overrideValues} contains invalid
|
|
|
|
|
* values for the specified config keys.
|
|
|
|
|
*
|
|
|
|
|
* @param subscriptionId The subscription ID for which the override should be done.
|
|
|
|
|
* @param overrideValues Key-value pairs of the values that are to be overriden. If null,
|
|
|
|
|
* all previous overrides will be disabled and the config reset back to
|
|
|
|
|
* its initial state.
|
|
|
|
|
* @hide
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
|
|
|
|
|
@SystemApi
|
|
|
|
|
@TestApi
|
|
|
|
|
public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues) {
|
|
|
|
|
try {
|
|
|
|
|
ICarrierConfigLoader loader = getICarrierConfigLoader();
|
|
|
|
|
if (loader == null) {
|
|
|
|
|
Rlog.w(TAG, "Error setting config for subId " + subscriptionId
|
|
|
|
|
+ " ICarrierConfigLoader is null");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
loader.overrideConfig(subscriptionId, overrideValues);
|
|
|
|
|
} catch (RemoteException ex) {
|
|
|
|
|
Rlog.e(TAG, "Error setting config for subId " + subscriptionId + ": "
|
|
|
|
|
+ ex.toString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets the configuration values for the default subscription. After using this method to get
|
|
|
|
|
* the configuration bundle, {@link #isConfigForIdentifiedCarrier(PersistableBundle)} should be
|
|
|
|
|
|